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 [methodGtk.Widget.add_controller]. It is rarely necessary to explicitly remove a controller with [methodGtk.Widget.remove_controller].
See the chapter on input handling for an overview of the basic concepts, such as the capture and bubble phases of event propagation.
function Get_Current_Event
(Self : not null access Gtk_Event_Controller_Record)
return Gdk.Event.Gdk_Event
Returns the event that is currently being handled by the controller. At other times, null is returned.
the event that is currently handled by Controller. Has transfer-ownership='none'.
function Get_Current_Event_Device
(Self : not null access Gtk_Event_Controller_Record)
return Gdk.Gdk_Device
Returns the device of the event that is currently being handled by the controller. At other times, null is returned.
device of the event is currently handled by Controller. Has transfer-ownership='none'.
function Get_Current_Event_State
(Self : not null access Gtk_Event_Controller_Record)
return Gdk.Enums.Gdk_Modifier_Type
Returns the modifier state of the event that is currently being handled by the controller. At other times, 0 is returned.
modifier state of the event is currently handled by Controller
function Get_Current_Event_Time
(Self : not null access Gtk_Event_Controller_Record) return Guint32
Returns the timestamp of the event that is currently being handled by the controller. At other times, 0 is returned.
timestamp of the event is currently handled by Controller
function Get_Name
(Self : not null access Gtk_Event_Controller_Record)
return UTF8_String
Gets the name of Controller.
The controller name
function Get_Propagation_Limit
(Self : not null access Gtk_Event_Controller_Record)
return Gtk.Enums.Gtk_Propagation_Limit
Gets the propagation limit of the event controller.
the propagation limit
function Get_Propagation_Phase
(Self : not null access Gtk_Event_Controller_Record)
return Gtk.Enums.Gtk_Propagation_Phase
Gets the propagation phase at which Controller handles events.
the propagation phase
function Get_Type return Glib.GType
function Get_Widget
(Self : not null access Gtk_Event_Controller_Record)
return Gtk.Widget.Gtk_Widget
Returns the GtkWidget this controller relates to.
a GtkWidget. Has transfer-ownership='none'.
type Gtk_Event_Controller is access all Gtk_Event_Controller_Record'Class;
type Gtk_Event_Controller_Record is new GObject_Record with null record;
Name_Property : constant Glib.Properties.Property_String;
The name for this controller, typically used for debugging purposes.
Propagation_Limit_Property : constant Gtk.Enums.Property_Gtk_Propagation_Limit;
The limit for which events this controller will handle.
Propagation_Phase_Property : constant Gtk.Enums.Property_Gtk_Propagation_Phase;
The propagation phase at which this controller will handle events.
procedure Reset (Self : not null access Gtk_Event_Controller_Record)
Resets the Controller to a clean state.
procedure Set_Name
(Self : not null access Gtk_Event_Controller_Record;
Name : UTF8_String := "")
Sets a name on the controller that can be used for debugging.
a name for Controller
procedure Set_Propagation_Limit
(Self : not null access Gtk_Event_Controller_Record;
Limit : Gtk.Enums.Gtk_Propagation_Limit)
Sets the event propagation limit on the event controller. If the limit is set to Gtk.Enums.Limit_Same_Native, the controller won't handle events that are targeted at widgets on a different surface, such as popovers.
the propagation limit
procedure Set_Propagation_Phase
(Self : not null access Gtk_Event_Controller_Record;
Phase : Gtk.Enums.Gtk_Propagation_Phase)
Sets the propagation phase at which a controller handles events. If Phase is Gtk.Enums.Phase_None, no automatic event handling will be performed, but other additional gesture maintenance will.
a propagation phase
Widget_Property : constant Glib.Properties.Property_Object;
Type: Gtk.Widget.Gtk_Widget The widget receiving the GdkEvents that the controller will handle.