Gtk.EventController¶
- Subclasses:
Gtk.EventControllerKey
,Gtk.EventControllerMotion
,Gtk.EventControllerScroll
,Gtk.Gesture
,Gtk.PadController
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
Propagation phase at which this controller is run |
||
r/w/co |
Widget the gesture relates to |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gtk.EventController(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
Gtk.EventController
is a base, low-level implementation for event controllers. Those react to a series ofGdk.Events
, and possibly trigger actions as a consequence of those.- get_propagation_phase()[source]¶
- Returns:
the propagation phase
- Return type:
Gets the propagation phase at which self handles events.
New in version 3.14.
- get_widget()[source]¶
- Returns:
- Return type:
Returns the
Gtk.Widget
this controller relates to.New in version 3.14.
- handle_event(event)[source]¶
- Parameters:
- Returns:
True
if the event was potentially useful to trigger the controller action- Return type:
Feeds an events into self, so it can be interpreted and the controller actions triggered.
New in version 3.14.
- reset()[source]¶
Resets the self to a clean state. Every interaction the controller did through
Gtk.EventController
::handle-event
will be dropped at this point.New in version 3.14.
- set_propagation_phase(phase)[source]¶
- Parameters:
phase (
Gtk.PropagationPhase
) – a propagation phase
Sets the propagation phase at which a controller handles events.
If phase is
Gtk.PropagationPhase.NONE
, no automatic event handling will be performed, but other additional gesture maintenance will. In that phase, the events can be managed by callingGtk.EventController.handle_event
().New in version 3.14.
Property Details¶
- Gtk.EventController.props.propagation_phase¶
- Name:
propagation-phase
- Type:
- Default Value:
- Flags:
The propagation phase at which this controller will handle events.
New in version 3.14.
- Gtk.EventController.props.widget¶
- Name:
widget
- Type:
- Default Value:
- Flags:
The widget receiving the
Gdk.Events
that the controller will handle.New in version 3.14.