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.
DropGidBuilder builder()Get builder for [gdk.drop.Drop] Returns: New builder objectgdk.types.DragAction actions() @propertyGet `actions` property. Returns: The possible actions for this dropgdk.device.Device device() @propertyGet `device` property. Returns: The [gdk.device.Device] performing the dropgdk.display.Display display() @propertyGet `display` property. Returns: The [gdk.display.Display] that the drop belongs to.gdk.drag.Drag drag() @propertyGet `drag` property. Returns: The [gdk.drag.Drag] that initiated this dropgdk.content_formats.ContentFormats formats() @propertyGet `formats` property. Returns: The possible formats that the drop can provide its data in.gdk.surface.Surface surface() @propertyGet `surface` property. Returns: The [gdk.surface.Surface] the drop happens onvoid finish(gdk.types.DragAction action)Ends the drag operation after a drop.gdk.types.DragAction getActions()Returns the possible actions for this [gdk.drop.Drop].gdk.device.Device getDevice()Returns the [gdk.device.Device] performing the drop. Returns: The [gdk.device.Device] performing the drop.gdk.display.Display getDisplay()Gets the [gdk.display.Display] that self was created for. Returns: a [gdk.display.Display]gdk.drag.Drag getDrag()If this is an in-app drag-and-drop operation, returns the [gdk.drag.Drag] that corresponds to this drop.gdk.content_formats.ContentFormats getFormats()Returns the [gdk.contentformats.ContentFormats] that the drop offers the data to be read in. Returns: The possible [gdk.contentformats.ContentFormats]gdk.surface.Surface getSurface()Returns 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)Asynchronously 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)Asynchronously request the drag operation's contents converted to the given type.gobject.value.Value readValueFinish(gio.async_result.AsyncResult result)Finishes an async drop read.void status(gdk.types.DragAction actions, gdk.types.DragAction preferred)Selects all actions that are potentially supported by the destination.T actions(gdk.types.DragAction propval)Set `actions` property. Params: propval = The possible actions for this drop Returns: Builder instance for fluent chainingT device(gdk.device.Device propval)Set `device` property. Params: propval = The [gdk.device.Device] performing the drop Returns: Builder instance for fluent chainingT drag(gdk.drag.Drag propval)Set `drag` property. Params: propval = The [gdk.drag.Drag] that initiated this drop Returns: Builder instance for fluent chainingT formats(gdk.content_formats.ContentFormats propval)Set `formats` property. Params: propval = The possible formats that the drop can provide its data in. Returns: Builder instance for fluent chainingT surface(gdk.surface.Surface propval)Set `surface` property. Params: propval = The [gdk.surface.Surface] the drop happens on Returns: Builder instance for fluent chaining