gdk.drop

Module for [Drop] class

Types 3

The gdk.drop.Drop object represents the target of an ongoing DND operation.

Possible drop sites get informed about the status of the ongoing drag operation with events of type gdk.types.EventType.DragEnter, gdk.types.EventType.DragLeave, gdk.types.EventType.DragMotion and gdk.types.EventType.DropStart. The gdk.drop.Drop object can be obtained from these gdk.event.Event types using gdk.dndevent.DNDEvent.getDrop.

The actual data transfer is initiated from the target side via an async read, using one of the gdk.drop.Drop methods for this purpose: gdk.drop.Drop.readAsync or gdk.drop.Drop.readValueAsync.

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 _getGType() static nothrow
GType _gType() @property nothrow
Drop self() nothrowReturns `this`, for use in `with` statements.
DropGidBuilder builder() static nothrowGet builder for [gdk.drop.Drop] Returns: New builder object
gdk.types.DragAction actions() @property nothrowGet `actions` property. Returns: The possible actions for this drop
gdk.device.Device device() @property nothrowGet `device` property. Returns: The [gdk.device.Device] performing the drop
gdk.display.Display display() @property nothrowGet `display` property. Returns: The [gdk.display.Display] that the drop belongs to.
gdk.drag.Drag drag() @property nothrowGet `drag` property. Returns: The [gdk.drag.Drag] that initiated this drop
gdk.content_formats.ContentFormats formats() @property nothrowGet `formats` property. Returns: The possible formats that the drop can provide its data in.
gdk.surface.Surface surface() @property nothrowGet `surface` property. Returns: The [gdk.surface.Surface] the drop happens on
void finish(gdk.types.DragAction action) nothrowEnds the drag operation after a drop.
gdk.types.DragAction getActions() nothrowReturns the possible actions for this [gdk.drop.Drop].
gdk.device.Device getDevice() nothrowReturns the [gdk.device.Device] performing the drop. Returns: The [gdk.device.Device] performing the drop.
gdk.display.Display getDisplay() nothrowGets the [gdk.display.Display] that self was created for. Returns: a [gdk.display.Display]
gdk.drag.Drag getDrag() nothrowIf this is an in-app drag-and-drop operation, returns the [gdk.drag.Drag] that corresponds to this drop.
gdk.content_formats.ContentFormats getFormats() nothrowReturns the [gdk.content_formats.ContentFormats] that the drop offers the data to be read in. Returns: The possible [gdk.content_formats.ContentFormats]
gdk.surface.Surface getSurface() nothrowReturns the [gdk.surface.Surface] performing the drop. Returns: The [gdk.surface.Surface] performing the drop.
void readAsync(string[] mimeTypes, int ioPriority, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null) nothrowAsynchronously read the dropped data from a [gdk.drop.Drop] in a format that complies with one of the mime types.
gio.input_stream.InputStream readFinish(gio.async_result.AsyncResult result, out string outMimeType)Finishes an async drop read operation.
void readValueAsync(gobject.types.GType type, int ioPriority, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null) nothrowAsynchronously request the drag operation's contents converted to the given type.
void status(gdk.types.DragAction actions, gdk.types.DragAction preferred) nothrowSelects all actions that are potentially supported by the destination.
Constructors
this(void * ptr, Flag!"Take" take)

Fluent builder implementation template for gdk.drop.Drop

Methods
T actions(gdk.types.DragAction propval) nothrowSet `actions` property. Params: propval = The possible actions for this drop Returns: Builder instance for fluent chaining
T device(gdk.device.Device propval) nothrowSet `device` property. Params: propval = The [gdk.device.Device] performing the drop Returns: Builder instance for fluent chaining
T drag(gdk.drag.Drag propval) nothrowSet `drag` property. Params: propval = The [gdk.drag.Drag] that initiated this drop Returns: Builder instance for fluent chaining
T formats(gdk.content_formats.ContentFormats propval) nothrowSet `formats` property. Params: propval = The possible formats that the drop can provide its data in. Returns: Builder instance for fluent chaining
T surface(gdk.surface.Surface propval) nothrowSet `surface` property. Params: propval = The [gdk.surface.Surface] the drop happens on Returns: Builder instance for fluent chaining

Fluent builder for gdk.drop.Drop

Methods
Drop build() nothrowCreate object from builder. Returns: New object