Drop

abstract class Drop(val gdkDropPointer: <Error class: unknown class><<Error class: unknown class>>)(source)

The GdkDrop 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_DRAG_ENTER, %GDK_DRAG_LEAVE, %GDK_DRAG_MOTION and %GDK_DROP_START. The GdkDrop object can be obtained from these class@Gdk.Event types using method@Gdk.DNDEvent.get_drop.

The actual data transfer is initiated from the target side via an async read, using one of the GdkDrop methods for this purpose: method@Gdk.Drop.read_async or method@Gdk.Drop.read_value_async.

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.

Skipped during bindings generation

  • parameter out_mime_type: out_mime_type: Out parameter is not supported

Inheritors

Constructors

Link copied to clipboard
constructor(gdkDropPointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class DropImpl(pointer: <Error class: unknown class><<Error class: unknown class>>) : Drop

The DropImpl type represents a native instance of the abstract Drop class.

Properties

Link copied to clipboard

The possible actions for this drop

Link copied to clipboard
open val device: Device

The GdkDevice performing the drop

Link copied to clipboard
open val display: Display

The GdkDisplay that the drop belongs to.

Link copied to clipboard
open val drag: Drag?

The GdkDrag that initiated this drop

Link copied to clipboard

The possible formats that the drop can provide its data in.

Link copied to clipboard
val gdkDropPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val surface: Surface

The GdkSurface the drop happens on

Functions

Link copied to clipboard
open fun finish(action: DragAction)

Ends the drag operation after a drop.

Link copied to clipboard
open fun readAsync(    mimeTypes: List<String>,     ioPriority: <Error class: unknown class>,     cancellable: <Error class: unknown class>? = null,     callback: <Error class: unknown class>?)

Asynchronously read the dropped data from a GdkDrop in a format that complies with one of the mime types.

Link copied to clipboard
open fun readValueAsync(    type: <Error class: unknown class>,     ioPriority: <Error class: unknown class>,     cancellable: <Error class: unknown class>? = null,     callback: <Error class: unknown class>?)

Asynchronously request the drag operation's contents converted to the given @type.

Link copied to clipboard
open fun readValueFinish(result: <Error class: unknown class>): <Error class: unknown class><<Error class: unknown class>>

Finishes an async drop read.

Link copied to clipboard
open fun status(actions: DragAction, preferred: DragAction)

Selects all actions that are potentially supported by the destination.