Commit Graph

21 Commits

Author SHA1 Message Date
Benjamin Otte
a278edab22 window: Remove type argument from gtk_window_new() 2020-02-14 21:18:49 +01:00
Yariv Barkan
1a9b1f38a4 demo: Use pinch translation in the gestures demo
Add the pinch translation offset to the pinch gesture demo. That allows
moving the square around in addition to the already-supported rotate and
zoom.
2020-01-17 22:34:48 +02:00
Timm Bäder
f71b2ee79f gestures demo: widget property is not writable
Use gtk_widget_add_controller instead.
2018-05-19 10:18:50 +02:00
Benjamin Otte
bf82149271 longpressgesture: Port to new API model 2018-04-26 17:59:42 +02:00
Benjamin Otte
66223aaa08 swipegesture: Port to new API model 2018-04-26 17:59:41 +02:00
Benjamin Otte
91efa37fcb zoomgesture: Port to new API model 2018-04-26 17:59:41 +02:00
Benjamin Otte
703d5340f1 rotategesture: Port to new API model 2018-04-26 17:59:41 +02:00
Carlos Garnacho
a72404dd5a gtk: Mass delete all GtkWidget event mask API
We now rely on toplevels receiving and forwarding all the events
the windowing should be able to handle. Event masks are no longer a
way to determine whether an event is deliverable ot a widget.

Events will always be delivered in the three captured/target/bubbled
phases, widgets can now just attach GtkEventControllers and let those
handle the events.
2017-05-25 16:25:58 +02:00
Carlos Garnacho
8c707e29ff gtk-demo: Add 3fg touchpad swipe handling to gestures demo
We can handle those on wayland, so we should show it's possible.
2017-03-02 18:25:04 +01:00
Timm Bäder
ea897c6df4 Remove gtk_widget_show_all 2017-01-20 21:37:04 +01:00
Benjamin Otte
979b56e86f gtk-demo: Update drawing area usage to new APIs
A few demos are broken because they do input on drawing areas.
2016-11-18 06:40:53 +01:00
Carlos Garnacho
d9a738dfac gtk-demo: Fix drawing of gestures demo feedback on CSD windows
It was wiping the translation initially applied to the cairo_t, so
pick that up first before applying our own matrix changes.
2015-09-15 13:23:53 +02:00
Matthias Clasen
609e04ddcf gtk-demo: Cosmetic changes
Clean up the code of many examples in minor ways, fix some memory
leaks, and avoid the use of dialogs where a regular toplevel works
just as well.
2015-06-28 17:41:35 -04:00
Matthias Clasen
0a601b093c gtk-demo: Many cosmetic fixes
Mostly update window titles, and some addition to descriptions.
2015-06-19 21:59:15 -04:00
Carlos Garnacho
9f8bd7a2bc gesturezoom: Just return a double in get_scale_delta()
Checking whether the gesture is active is a responsibility of the caller.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
8f7d5fb2c0 gesturerotate: Just return a double in get_angle_delta()
Whether the gesture is active or recognized should be checked before in
callers, or just not used naively.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
d05a9f9a7b gesture: Replace gtk_gesture_attach/detach with event controller API
Event controllers now auto-attach, and the GtkCapturePhase only determines
when are events dispatched, but all controllers are managed by the widget wrt
grabs.

All callers have been updated.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
5369c77029 gesture: Simplify gesture/widget interaction public API
The propagation phase property/methods in GtkEventController are gone,
This is now set directly on the GtkWidget add/remove controller API,
which has been made private.

The only public bit now are the new functions gtk_gesture_attach() and
gtk_gesture_detach() that will use the private API underneath.

All callers have been updated.
2014-05-23 19:54:29 +02:00
Carlos Garnacho
51b5fa3bf0 demo: Update to gesture widget-level API changes 2014-05-23 19:54:25 +02:00
Carlos Garnacho
84885c6e26 demo: Update to gesture API change 2014-05-23 19:54:23 +02:00
Carlos Garnacho
71e382cf42 gtk-demo: Add simple gestures demo 2014-05-23 19:54:22 +02:00