Tracks the pointer position.
The event controller offers [signalGtk.EventControllerMotion::enter] and [signalGtk.EventControllerMotion::leave] signals, as well as [propertyGtk.EventControllerMotion:is-pointer] and [propertyGtk.EventControllerMotion:contains-pointer] properties which are updated to reflect changes in the pointer position as it moves over the widget.
type Cb_GObject_Gdouble_Gdouble_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class;
X : Gdouble;
Y : Gdouble);
type Cb_GObject_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class);
type Cb_Gtk_Event_Controller_Motion_Gdouble_Gdouble_Void is not null access procedure
(Self : access Gtk_Event_Controller_Motion_Record'Class;
X : Gdouble;
Y : Gdouble);
type Cb_Gtk_Event_Controller_Motion_Void is not null access procedure
(Self : access Gtk_Event_Controller_Motion_Record'Class);
function Contains_Pointer
(Self : not null access Gtk_Event_Controller_Motion_Record)
return Boolean
Returns if a pointer is within Self or one of its children.
True if a pointer is within Self or one of its children
Contains_Pointer_Property : constant Glib.Properties.Property_Boolean;
Whether the pointer is in the controllers widget or a descendant.
See also [propertyGtk.EventControllerMotion:is-pointer].
When handling crossing events, this property is updated before [signalGtk.EventControllerMotion::enter], but after [signalGtk.EventControllerMotion::leave] is emitted.
function Get_Type return Glib.GType
type Gtk_Event_Controller_Motion is access all Gtk_Event_Controller_Motion_Record'Class;
function Gtk_Event_Controller_Motion_New return Gtk_Event_Controller_Motion
Creates a new event controller that will handle motion events.
type Gtk_Event_Controller_Motion_Record is new Gtk_Event_Controller_Record with null record;
procedure Gtk_New (Self : out Gtk_Event_Controller_Motion)
Creates a new event controller that will handle motion events. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
procedure Initialize
(Self : not null access Gtk_Event_Controller_Motion_Record'Class)
Creates a new event controller that will handle motion events. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
function Is_Pointer
(Self : not null access Gtk_Event_Controller_Motion_Record)
return Boolean
Returns if a pointer is within Self, but not one of its children.
True if a pointer is within Self but not one of its children
Is_Pointer_Property : constant Glib.Properties.Property_Boolean;
Whether the pointer is in the controllers widget itself, as opposed to in a descendent widget.
See also [propertyGtk.EventControllerMotion:contains-pointer].
When handling crossing events, this property is updated before [signalGtk.EventControllerMotion::enter], but after [signalGtk.EventControllerMotion::leave] is emitted.
procedure On_Enter
(Self : not null access Gtk_Event_Controller_Motion_Record;
Call : Cb_GObject_Gdouble_Gdouble_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Signals that the pointer has entered the widget.
Callback parameters: -- @param X coordinates of pointer location -- @param Y coordinates of pointer location
procedure On_Enter
(Self : not null access Gtk_Event_Controller_Motion_Record;
Call : Cb_Gtk_Event_Controller_Motion_Gdouble_Gdouble_Void;
After : Boolean := False)
Signals that the pointer has entered the widget.
Callback parameters: -- @param X coordinates of pointer location -- @param Y coordinates of pointer location
procedure On_Leave
(Self : not null access Gtk_Event_Controller_Motion_Record;
Call : Cb_GObject_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Signals that the pointer has left the widget.
procedure On_Leave
(Self : not null access Gtk_Event_Controller_Motion_Record;
Call : Cb_Gtk_Event_Controller_Motion_Void;
After : Boolean := False)
Signals that the pointer has left the widget.
procedure On_Motion
(Self : not null access Gtk_Event_Controller_Motion_Record;
Call : Cb_GObject_Gdouble_Gdouble_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted when the pointer moves inside the widget.
Callback parameters: -- @param X the x coordinate -- @param Y the y coordinate
procedure On_Motion
(Self : not null access Gtk_Event_Controller_Motion_Record;
Call : Cb_Gtk_Event_Controller_Motion_Gdouble_Gdouble_Void;
After : Boolean := False)
Emitted when the pointer moves inside the widget.
Callback parameters: -- @param X the x coordinate -- @param Y the y coordinate
Signal_Enter : constant Glib.Signal_Name := "enter";
Signals that the pointer has entered the widget.
Callback parameters: -- @param X coordinates of pointer location -- @param Y coordinates of pointer location
Signal_Leave : constant Glib.Signal_Name := "leave";
Signals that the pointer has left the widget.
Signal_Motion : constant Glib.Signal_Name := "motion";
Emitted when the pointer moves inside the widget.
Callback parameters: -- @param X the x coordinate -- @param Y the y coordinate