Gtk.EventController
Gtk.EventController — Self-contained handler of series of events
Object Hierarchy:
GObject
╰── Gtk.EventController
╰── Gtk.Gesture
Functions:
- get_propagation_phase
(self) -> Gtk.PropagationPhase
- set_propagation_phase
(self, phase:Gtk.PropagationPhase)
- handle_event
(self, event:Gdk.Event) -> bool
- get_widget
(self) -> Gtk.Widget
- reset
(self)
Description:
Gtk.EventController
is a base, low-level implementation for event controllers.
Those react to a series of Gdk.Events
, and possibly trigger actions as a consequence of those.
Function Details:
get_propagation_phase()
get_propagation_phase (self) -> Gtk.PropagationPhase
Gets the propagation phase at which controller
handles events.
Returns: the propagation phase
Since: 3.14
set_propagation_phase()
set_propagation_phase (self, phase:Gtk.PropagationPhase)
Sets the propagation phase at which a controller handles events.
If phase
is GTK_PHASE_NONE
, no automatic event handling will beperformed, but other additional gesture maintenance will. In that phase,the events can be managed by calling Gtk.EventController:handle_event()
.
- Since: 3.14
handle_event()
handle_event (self, event:Gdk.Event) -> bool
Feeds an events into controller
, so it can be interpretedand the controller actions triggered.
Returns:
True
if the event was potentially useful to trigger thecontroller actionSince: 3.14
get_widget()
get_widget (self) -> Gtk.Widget
Returns the Gtk.Widget
this controller relates to.
Returns: a
Gtk.Widget
.Since: 3.14
reset()
reset (self)
Resets the controller
to a clean state. Every interactionthe controller did through “handle-event”will be dropped at this point.
- Since: 3.14