gdk.drag

Module for [Drag] class

Types 3

The [gdk.drag.Drag] object represents the source of an ongoing DND operation.

A [gdk.drag.Drag] is created when a drag is started, and stays alive for duration of the DND operation. After a drag has been started with [gdk.drag.Drag.begin], the caller gets informed about the status of the ongoing drag operation with signals on the [gdk.drag.Drag] object.

GTK provides a higher level abstraction based on top of these functions, and so they are not normally needed in GTK applications. See the "Drag and Drop" section of the GTK documentation for more information.

Methods
GType _gType() @property
Drag self()Returns `this`, for use in `with` statements.
DragGidBuilder builder()Get builder for [gdk.drag.Drag] Returns: New builder object
gdk.types.DragAction actions() @propertyGet `actions` property. Returns: The possible actions of this drag.
void actions(gdk.types.DragAction propval) @propertySet `actions` property. Params: propval = The possible actions of this drag.
gdk.content_provider.ContentProvider content() @propertyGet `content` property. Returns: The [gdk.content_provider.ContentProvider].
gdk.device.Device device() @propertyGet `device` property. Returns: The [gdk.device.Device] that is performing the drag.
gdk.display.Display display() @propertyGet `display` property. Returns: The [gdk.display.Display] that the drag belongs to.
gdk.content_formats.ContentFormats formats() @propertyGet `formats` property. Returns: The possible formats that the drag can provide its data in.
gdk.types.DragAction selectedAction() @propertyGet `selectedAction` property. Returns: The currently selected action of the drag.
void selectedAction(gdk.types.DragAction propval) @propertySet `selectedAction` property. Params: propval = The currently selected action of the drag.
gdk.surface.Surface surface() @propertyGet `surface` property. Returns: The surface where the drag originates.
gdk.drag.Drag begin(gdk.surface.Surface surface, gdk.device.Device device, gdk.content_provider.ContentProvider content, gdk.types.DragAction actions, double dx, double dy)Starts a drag and creates a new drag context for it.
void dropDone(bool success)Informs GDK that the drop ended.
gdk.types.DragAction getActions()Determines the bitmask of possible actions proposed by the source. Returns: the [gdk.types.DragAction] flags
gdk.content_provider.ContentProvider getContent()Returns the [gdk.contentprovider.ContentProvider] associated to the [gdk.drag.Drag] object. Returns: The [gdk.contentprovider.ContentProvider] associated to drag.
gdk.device.Device getDevice()Returns the [gdk.device.Device] associated to the [gdk.drag.Drag] object. Returns: The [gdk.device.Device] associated to drag.
gdk.display.Display getDisplay()Gets the [gdk.display.Display] that the drag object was created for. Returns: a [gdk.display.Display]
gdk.surface.Surface getDragSurface()Returns the surface on which the drag icon should be rendered during the drag operation.
gdk.content_formats.ContentFormats getFormats()Retrieves the formats supported by this [gdk.drag.Drag] object. Returns: a [gdk.content_formats.ContentFormats]
gdk.types.DragAction getSelectedAction()Determines the action chosen by the drag destination. Returns: a [gdk.types.DragAction] value
gdk.surface.Surface getSurface()Returns the [gdk.surface.Surface] where the drag originates. Returns: The [gdk.surface.Surface] where the drag originates
void setHotspot(int hotX, int hotY)Sets the position of the drag surface that will be kept under the cursor hotspot.
gulong connectCancel(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == gdk.types.DragCancelReason))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gdk.drag.Drag))) && Parameters!T.length < 3)Connect to `Cancel` signal.
gulong connectDndFinished(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gdk.drag.Drag))) && Parameters!T.length < 2)Connect to `DndFinished` signal.
gulong connectDropPerformed(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gdk.drag.Drag))) && Parameters!T.length < 2)Connect to `DropPerformed` signal.
Constructors
this(void * ptr, Flag!"Take" take)
Methods
T actions(gdk.types.DragAction propval)Set `actions` property. Params: propval = The possible actions of this drag. Returns: Builder instance for fluent chaining
T content(gdk.content_provider.ContentProvider propval)Set `content` property. Params: propval = The [gdk.content_provider.ContentProvider]. Returns: Builder instance for fluent chaining
T device(gdk.device.Device propval)Set `device` property. Params: propval = The [gdk.device.Device] that is performing the drag. Returns: Builder instance for fluent chaining
T formats(gdk.content_formats.ContentFormats propval)Set `formats` property. Params: propval = The possible formats that the drag can provide its data in. Returns: Builder instance for fluent chaining
T selectedAction(gdk.types.DragAction propval)Set `selectedAction` property. Params: propval = The currently selected action of the drag. Returns: Builder instance for fluent chaining
T surface(gdk.surface.Surface propval)Set `surface` property. Params: propval = The surface where the drag originates. Returns: Builder instance for fluent chaining

Fluent builder for [gdk.drag.Drag]

Methods