GtkDropControllerMotion

GtkDropControllerMotion — Event controller for motion events during a drop

Types and Values

Includes

#include <gtk/gtk.h>

Description

GtkDropControllerMotion is an event controller meant for tracking the pointer hovering over a widget during a drag and drop operation.

It is modeled after GtkEventControllerMotion so if you have used that, this should feel really familiar.

The drop controller is not able to accept drops, use GtkDropTarget for that purpose.

Functions

gtk_drop_controller_motion_new ()

GtkEventController *
gtk_drop_controller_motion_new (void);

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

Returns

a new GtkDropControllerMotion


gtk_drop_controller_motion_contains_pointer ()

gboolean
gtk_drop_controller_motion_contains_pointer
                               (GtkDropControllerMotion *self);

Returns the value of the GtkDropControllerMotion:contains-pointer property.

Parameters

Returns

TRUE if a dragging pointer is within self or one of its children.


gtk_drop_controller_motion_is_pointer ()

gboolean
gtk_drop_controller_motion_is_pointer (GtkDropControllerMotion *self);

Returns the value of the GtkDropControllerMotion:is-pointer property.

Parameters

Returns

TRUE if a dragging pointer is within self but not one of its children


gtk_drop_controller_motion_get_drop ()

GdkDrop *
gtk_drop_controller_motion_get_drop (GtkDropControllerMotion *self);

Returns the value of the GtkDropControllerMotion:drop property.

Parameters

Returns

The GdkDrop currently happening within self or NULL if none.

[transfer none][nullable]

Types and Values

GtkDropControllerMotion

typedef struct _GtkDropControllerMotion GtkDropControllerMotion;