Commit Graph

10 Commits

Author SHA1 Message Date
Matthias Clasen
955ae40cd6 event controller: Add a name property
This helps identifying controllers in the inspector.
2019-06-20 22:48:33 -04:00
Matthias Clasen
2606ca0bd1 Introduce event controller propagation limits
Limit event handlers by default to only handle
events targeting the same surface as their widget.
2019-05-28 20:25:13 +00:00
Benjamin Otte
8ddba5ffcd eventcontroller: Move declaration
This is in preparation for exposing APIs in gtkwidget.c
2018-04-26 17:59:41 +02:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05: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
2e903243c6 eventcontroller: Make the event-mask property and methods private.
This will rarely have any use if no subclassing is allowed, so just make it
private for our own.
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
Matthias Clasen
42df9eda2d Prevent subclassing of gestures
For now, at least. We do this by hiding the instance and
class structures in private headers.
2014-05-23 19:54:28 +02:00
Carlos Garnacho
759705d3e6 eventcontroller: Add propagation-phase property
This is so we don't have to specify the capture phase for
every controller. The default "bubble" value will be sane
on most situations.
2014-05-23 19:54:25 +02:00
Carlos Garnacho
e2b8ef8c66 Add GtkEventController
This is a basic abstract type that handles GdkEvents.
2014-05-23 19:54:21 +02:00