gdk.drag
Module for [Drag] class
Types 3
classDrag : gobject.object.ObjectWrap
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
gdk.types.DragAction actions() @property nothrowGet `actions` property. Returns: The possible actions of this drag.void actions(gdk.types.DragAction propval) @property nothrowSet `actions` property. Params: propval = The possible actions of this drag.gdk.content_provider.ContentProvider content() @property nothrowGet `content` property. Returns: The [gdk.content_provider.ContentProvider].gdk.device.Device device() @property nothrowGet `device` property. Returns: The [gdk.device.Device] that is performing the drag.gdk.display.Display display() @property nothrowGet `display` property. Returns: The [gdk.display.Display] that the drag belongs to.gdk.content_formats.ContentFormats formats() @property nothrowGet `formats` property. Returns: The possible formats that the drag can provide its data in.gdk.types.DragAction selectedAction() @property nothrowGet `selectedAction` property. Returns: The currently selected action of the drag.void selectedAction(gdk.types.DragAction propval) @property nothrowSet `selectedAction` property. Params: propval = The currently selected action of the drag.gdk.surface.Surface surface() @property nothrowGet `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) static nothrowStarts a drag and creates a new drag context for it.gdk.types.DragAction getActions() nothrowDetermines the bitmask of possible actions proposed by the source. Returns: the [gdk.types.DragAction] flagsgdk.content_provider.ContentProvider getContent() nothrowReturns the [gdk.content_provider.ContentProvider] associated to the [gdk.drag.Drag] object. Returns: The [gdk.content_provider.ContentProvider] associated to drag.gdk.device.Device getDevice() nothrowReturns the [gdk.device.Device] associated to the [gdk.drag.Drag] object. Returns: The [gdk.device.Device] associated to drag.gdk.display.Display getDisplay() nothrowGets the [gdk.display.Display] that the drag object was created for. Returns: a [gdk.display.Display]gdk.surface.Surface getDragSurface() nothrowReturns the surface on which the drag icon should be rendered during the drag operation.gdk.content_formats.ContentFormats getFormats() nothrowRetrieves the formats supported by this [gdk.drag.Drag] object. Returns: a [gdk.content_formats.ContentFormats]gdk.types.DragAction getSelectedAction() nothrowDetermines the action chosen by the drag destination. Returns: a [gdk.types.DragAction] valuegdk.surface.Surface getSurface() nothrowReturns the [gdk.surface.Surface] where the drag originates. Returns: The [gdk.surface.Surface] where the drag originatesvoid setHotspot(int hotX, int hotY) nothrowSets 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) nothrowConnect 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) nothrowConnect 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) nothrowConnect to `DropPerformed` signal.Fluent builder implementation template for gdk.drag.Drag
Methods
T actions(gdk.types.DragAction propval) nothrowSet `actions` property. Params: propval = The possible actions of this drag. Returns: Builder instance for fluent chainingT content(gdk.content_provider.ContentProvider propval) nothrowSet `content` property. Params: propval = The [gdk.content_provider.ContentProvider]. Returns: Builder instance for fluent chainingT device(gdk.device.Device propval) nothrowSet `device` property. Params: propval = The [gdk.device.Device] that is performing the drag. Returns: Builder instance for fluent chainingT formats(gdk.content_formats.ContentFormats propval) nothrowSet `formats` property. Params: propval = The possible formats that the drag can provide its data in. Returns: Builder instance for fluent chainingT selectedAction(gdk.types.DragAction propval) nothrowSet `selectedAction` property. Params: propval = The currently selected action of the drag. Returns: Builder instance for fluent chainingT surface(gdk.surface.Surface propval) nothrowSet `surface` property. Params: propval = The surface where the drag originates. Returns: Builder instance for fluent chainingFluent builder for gdk.drag.Drag