gtk.event_controller
Module for [EventController] class
Types 3
[gtk.event_controller.EventController] is the base class for event controllers.
These are ancillary objects associated to widgets, which react to GdkEvents, and possibly trigger actions as a consequence.
Event controllers are added to a widget with [gtk.widget.Widget.addController]. It is rarely necessary to explicitly remove a controller with [gtk.widget.Widget.removeController].
See the chapter on input handling for an overview of the basic concepts, such as the capture and bubble phases of event propagation.
Methods
EventController self()Returns `this`, for use in `with` statements.EventControllerGidBuilder builder()Get builder for [gtk.event_controller.EventController] Returns: New builder objectstring name() @propertyGet `name` property. Returns: The name for this controller, typically used for debugging purposes.void name(string propval) @propertySet `name` property. Params: propval = The name for this controller, typically used for debugging purposes.gtk.types.PropagationLimit propagationLimit() @propertyGet `propagationLimit` property. Returns: The limit for which events this controller will handle.void propagationLimit(gtk.types.PropagationLimit propval) @propertySet `propagationLimit` property. Params: propval = The limit for which events this controller will handle.gtk.types.PropagationPhase propagationPhase() @propertyGet `propagationPhase` property. Returns: The propagation phase at which this controller will handle events.void propagationPhase(gtk.types.PropagationPhase propval) @propertySet `propagationPhase` property. Params: propval = The propagation phase at which this controller will handle events.gtk.widget.Widget widget() @propertyGet `widget` property. Returns: The widget receiving the `GdkEvents` that the controller will handle.gdk.event.Event getCurrentEvent()Returns the event that is currently being handled by the controller.gdk.device.Device getCurrentEventDevice()Returns the device of the event that is currently being handled by the controller.gdk.types.ModifierType getCurrentEventState()Returns the modifier state of the event that is currently being handled by the controller.uint getCurrentEventTime()Returns the timestamp of the event that is currently being handled by the controller.string getName()Gets the name of controller. Returns: The controller namegtk.types.PropagationLimit getPropagationLimit()Gets the propagation limit of the event controller. Returns: the propagation limitgtk.types.PropagationPhase getPropagationPhase()Gets the propagation phase at which controller handles events. Returns: the propagation phasegtk.widget.Widget getWidget()Returns the [gtk.widget.Widget] this controller relates to. Returns: a [gtk.widget.Widget]void reset()Resets the controller to a clean state.void setName(string name = null)Sets a name on the controller that can be used for debugging.void setPropagationLimit(gtk.types.PropagationLimit limit)Sets the event propagation limit on the event controller.void setPropagationPhase(gtk.types.PropagationPhase phase)Sets the propagation phase at which a controller handles events.void setStaticName(string name = null)Sets a name on the controller that can be used for debugging.Methods
T name(string propval)Set `name` property. Params: propval = The name for this controller, typically used for debugging purposes. Returns: Builder instance for fluent chainingT propagationLimit(gtk.types.PropagationLimit propval)Set `propagationLimit` property. Params: propval = The limit for which events this controller will handle. Returns: Builder instance for fluent chainingT propagationPhase(gtk.types.PropagationPhase propval)Set `propagationPhase` property. Params: propval = The propagation phase at which this controller will handle events. Returns: Builder instance for fluent chainingFluent builder for [gtk.event_controller.EventController]
Methods