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
GType _getGType() static nothrow
GType _gType() @property nothrow
EventController self() nothrowReturns `this`, for use in `with` statements.
EventControllerGidBuilder builder() static nothrowGet builder for [gtk.event_controller.EventController] Returns: New builder object
string name() @property nothrowGet `name` property. Returns: The name for this controller, typically used for debugging purposes.
void name(string propval) @property nothrowSet `name` property. Params: propval = The name for this controller, typically used for debugging purposes.
gtk.types.PropagationLimit propagationLimit() @property nothrowGet `propagationLimit` property. Returns: The limit for which events this controller will handle.
void propagationLimit(gtk.types.PropagationLimit propval) @property nothrowSet `propagationLimit` property. Params: propval = The limit for which events this controller will handle.
gtk.types.PropagationPhase propagationPhase() @property nothrowGet `propagationPhase` property. Returns: The propagation phase at which this controller will handle events.
void propagationPhase(gtk.types.PropagationPhase propval) @property nothrowSet `propagationPhase` property. Params: propval = The propagation phase at which this controller will handle events.
gtk.widget.Widget widget() @property nothrowGet `widget` property. Returns: The widget receiving the `GdkEvents` that the controller will handle.
gdk.event.Event getCurrentEvent() nothrowReturns the event that is currently being handled by the controller.
gdk.device.Device getCurrentEventDevice() nothrowReturns the device of the event that is currently being handled by the controller.
gdk.types.ModifierType getCurrentEventState() nothrowReturns the modifier state of the event that is currently being handled by the controller.
uint getCurrentEventTime() nothrowReturns the timestamp of the event that is currently being handled by the controller.
string getName() nothrowGets the name of controller. Returns: The controller name
gtk.types.PropagationLimit getPropagationLimit() nothrowGets the propagation limit of the event controller. Returns: the propagation limit
gtk.types.PropagationPhase getPropagationPhase() nothrowGets the propagation phase at which controller handles events. Returns: the propagation phase
gtk.widget.Widget getWidget() nothrowReturns the [gtk.widget.Widget] this controller relates to. Returns: a [gtk.widget.Widget]
void reset() nothrowResets the controller to a clean state.
void setName(string name = null) nothrowSets a name on the controller that can be used for debugging.
void setPropagationLimit(gtk.types.PropagationLimit limit) nothrowSets the event propagation limit on the event controller.
void setPropagationPhase(gtk.types.PropagationPhase phase) nothrowSets the propagation phase at which a controller handles events.
void setStaticName(string name = null) nothrowSets a name on the controller that can be used for debugging.
Constructors
this(void * ptr, Flag!"Take" take)

Fluent builder implementation template for gtk.event_controller.EventController

Methods
T name(string propval) nothrowSet `name` property. Params: propval = The name for this controller, typically used for debugging purposes. Returns: Builder instance for fluent chaining
T propagationLimit(gtk.types.PropagationLimit propval) nothrowSet `propagationLimit` property. Params: propval = The limit for which events this controller will handle. Returns: Builder instance for fluent chaining
T propagationPhase(gtk.types.PropagationPhase propval) nothrowSet `propagationPhase` property. Params: propval = The propagation phase at which this controller will handle events. Returns: Builder instance for fluent chaining
Methods
EventController build() nothrowCreate object from builder. Returns: New object