EventControllerMotion

GtkEventControllerMotion is an event controller tracking the pointer position.

The event controller offers [signal@Gtk.EventControllerMotion::enter] and [signal@Gtk.EventControllerMotion::leave] signals, as well as [property@Gtk.EventControllerMotion:is-pointer] and [property@Gtk.EventControllerMotion:contains-pointer] properties which are updated to reflect changes in the pointer position as it moves over the widget.

Constructors

this
this(GtkEventControllerMotion* gtkEventControllerMotion, bool ownedRef)

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

this
this()

Creates a new event controller that will handle motion events.

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 the pointer has left the widget.

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

Emitted when the pointer moves inside the widget.

containsPointer
bool containsPointer()

Returns if a pointer is within @self or one of its children.

getEventControllerMotionStruct
GtkEventControllerMotion* getEventControllerMotionStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

isPointer
bool isPointer()

Returns if a pointer is within @self, but not one of its children.

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()
getCurrentEvent
Event getCurrentEvent()

Returns the event that is currently being handled by the controller, and %NULL at other times.

getCurrentEventDevice
Device getCurrentEventDevice()

Returns the device of the event that is currently being handled by the controller, and %NULL otherwise.

getCurrentEventState
GdkModifierType getCurrentEventState()

Returns the modifier state of the event that is currently being handled by the controller, and 0 otherwise.

getCurrentEventTime
uint getCurrentEventTime()

Returns the timestamp of the event that is currently being handled by the controller, and 0 otherwise.

getName
string getName()

Gets the name of @controller.

getPropagationLimit
GtkPropagationLimit getPropagationLimit()

Gets the propagation limit of the event controller.

getPropagationPhase
GtkPropagationPhase getPropagationPhase()

Gets the propagation phase at which @controller handles events.

getWidget
Widget getWidget()

Returns the #GtkWidget this controller relates to.

reset
void reset()

Resets the @controller to a clean state.

setName
void setName(string name)

Sets a name on the controller that can be used for debugging.

setPropagationLimit
void setPropagationLimit(GtkPropagationLimit limit)

Sets the event propagation limit on the event controller.

setPropagationPhase
void setPropagationPhase(GtkPropagationPhase phase)

Sets the propagation phase at which a controller handles events.

Meta