GtkEventControllerMotion — Event controller for motion events
GObject ╰── GtkEventController ╰── GtkEventControllerMotion
#include <gtk/gtk.h>
GtkEventControllerMotion is an event controller meant for situations where you need to track the position of the pointer.
This object was added in 3.24.
GtkEventController *
gtk_event_controller_motion_new (GtkWidget *widget
);
Creates a new event controller that will handle motion events for the given widget
.
widget |
a new GtkEventControllerMotion
Since: 3.24
typedef struct _GtkEventControllerMotion GtkEventControllerMotion;
“enter”
signalvoid user_function (GtkEventControllerMotion *controller, double x, double y, gpointer user_data)
Signals that the pointer has entered 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
“leave”
signalvoid user_function (GtkEventControllerMotion *controller, gpointer user_data)
Signals that pointer has left the widget.
controller | The object that received the signal | |
user_data | user data set when the signal handler was connected. |
Flags: Run First
“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
© 2005–2020 The GNOME Project
Licensed under the GNU Lesser General Public License version 2.1 or later.
https://developer.gnome.org/gtk3/3.24/GtkEventControllerMotion.html