EventControllerMotion

gtk.EventControllerMotion is an event controller meant for situations where you need to track the position of the pointer.

This object was added in 3.24.

Constructors

this
this(GtkEventControllerMotion* gtkEventControllerMotion, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(Widget widget)

Creates a new event controller that will handle motion events for the given widget.

Members

Functions

addOnEnter
gulong addOnEnter(void delegate(double, double, EventControllerMotion) dlg, ConnectFlags connectFlags)

Signals that the pointer has entered the widget.

addOnLeave
gulong addOnLeave(void delegate(EventControllerMotion) dlg, ConnectFlags connectFlags)

Signals that pointer has left the widget.

addOnMotion
gulong addOnMotion(void delegate(double, double, EventControllerMotion) dlg, ConnectFlags connectFlags)

Emitted when the pointer moves inside the widget.

getEventControllerMotionStruct
GtkEventControllerMotion* getEventControllerMotionStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

Static functions

getType
GType getType()

Variables

gtkEventControllerMotion
GtkEventControllerMotion* gtkEventControllerMotion;

the main Gtk struct

Inherited Members

From EventController

gtkEventController
GtkEventController* gtkEventController;

the main Gtk struct

getEventControllerStruct
GtkEventController* getEventControllerStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
getPropagationPhase
GtkPropagationPhase getPropagationPhase()

Gets the propagation phase at which controller handles events.

getWidget
Widget getWidget()

Returns the gtk.Widget this controller relates to.

handleEvent
bool handleEvent(Event event)

Feeds an events into controller, so it can be interpreted and the controller actions triggered.

reset
void reset()

Resets the controller to a clean state. Every interaction the controller did through handle-event will be dropped at this point.

setPropagationPhase
void setPropagationPhase(GtkPropagationPhase phase)

Sets the propagation phase at which a controller handles events.