DropControllerMotion

GtkDropControllerMotion is an event controller tracking the pointer during Drag-and-Drop operations.

It is modeled after [class@Gtk.EventControllerMotion] so if you have used that, this should feel really familiar.

This controller is not able to accept drops, use [class@Gtk.DropTarget] for that purpose.

Constructors

this
this(GtkDropControllerMotion* gtkDropControllerMotion, bool ownedRef)

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

this
this()

Creates a new event controller that will handle pointer motion events during drag and drop.

Members

Functions

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

Signals that the pointer has entered the widget.

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

Signals that the pointer has left the widget.

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

Emitted when the pointer moves inside the widget.

containsPointer
bool containsPointer()

Returns if a Drag-and-Drop operation is within the widget @self or one of its children.

getDrop
Drop getDrop()

Returns the GdkDrop of a current Drag-and-Drop operation over the widget of @self.

getDropControllerMotionStruct
GtkDropControllerMotion* getDropControllerMotionStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

isPointer
bool isPointer()

Returns if a Drag-and-Drop operation is within the widget @self, not one of its children.

Static functions

getType
GType getType()

Variables

gtkDropControllerMotion
GtkDropControllerMotion* gtkDropControllerMotion;

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