Top | ![]() |
![]() |
![]() |
![]() |
GtkEventControllerMotion is an event controller meant for situations where you need to track the position of the pointer.
GtkEventController *
gtk_event_controller_motion_new (void
);
Creates a new event controller that will handle motion events.
gboolean
gtk_event_controller_motion_contains_pointer
(GtkEventControllerMotion *self
);
Returns the value of the GtkEventControllerMotion:contains-pointer property.
gboolean
gtk_event_controller_motion_is_pointer
(GtkEventControllerMotion *self
);
Returns the value of the GtkEventControllerMotion:is-pointer property.
“contains-pointer”
property “contains-pointer” gboolean
Whether the pointer is in the controllers widget or a descendant. See also “is-pointer”.
When handling crossing events, this property is updated before “enter” but after “leave” is emitted.
Owner: GtkEventControllerMotion
Flags: Read
Default value: FALSE
“is-pointer”
property “is-pointer” gboolean
Whether the pointer is in the controllers widget itself, as opposed to in a descendent widget. See also “contains-pointer”.
When handling crossing events, this property is updated before “enter” but after “leave” is emitted.
Owner: GtkEventControllerMotion
Flags: Read
Default value: FALSE
“enter”
signalvoid user_function (GtkEventControllerMotion *controller, double x, double y, gpointer user_data)
Signals that the pointer has entered the widget.
controller |
the object which received the signal |
|
x |
coordinates of pointer location |
|
y |
coordinates of pointer location |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“leave”
signalvoid user_function (GtkEventControllerMotion *controller, gpointer user_data)
Signals that the pointer has left the widget.
controller |
the object which received the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“motion”
signalvoid user_function (GtkEventControllerMotion *controller, double x, double y, gpointer user_data)
Emitted when the pointer moves inside the widget.
controller |
The object that received the signal |
|
x |
the x coordinate |
|
y |
the y coordinate |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First