Drag

abstract class Drag(val gdkDragPointer: <Error class: unknown class><<Error class: unknown class>>)(source)

The GdkDrag object represents the source of an ongoing DND operation.

A GdkDrag is created when a drag is started, and stays alive for duration of the DND operation. After a drag has been started with func@Gdk.Drag.begin, the caller gets informed about the status of the ongoing drag operation with signals on the GdkDrag 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.

Inheritors

Constructors

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

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class DragImpl(pointer: <Error class: unknown class><<Error class: unknown class>>) : Drag

The DragImpl type represents a native instance of the abstract Drag class.

Properties

Link copied to clipboard

The possible actions of this drag.

Link copied to clipboard

The GdkContentProvider.

Link copied to clipboard
open val device: Device

The GdkDevice that is performing the drag.

Link copied to clipboard
open val display: Display

The GdkDisplay that the drag belongs to.

Link copied to clipboard

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

Link copied to clipboard
val gdkDragPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard

The currently selected action of the drag.

Link copied to clipboard
open val surface: Surface

The surface where the drag originates.

Functions

Link copied to clipboard
open fun dropDone(success: Boolean)

Informs GDK that the drop ended.

Link copied to clipboard

Emits the "cancel" signal. See onCancel.

Link copied to clipboard

Emits the "dnd-finished" signal. See onDndFinished.

Link copied to clipboard

Emits the "drop-performed" signal. See onDropPerformed.

Link copied to clipboard
open fun getDragSurface(): Surface?

Returns the surface on which the drag icon should be rendered during the drag operation.

Link copied to clipboard
fun onCancel(    connectFlags: <Error class: unknown class> = ConnectFlags(0u),     handler: (reason: DragCancelReason) -> Unit): <Error class: unknown class>

Emitted when the drag operation is cancelled.

Link copied to clipboard
fun onDndFinished(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Emitted when the destination side has finished reading all data.

Link copied to clipboard
fun onDropPerformed(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Emitted when the drop operation is performed on an accepting client.

Link copied to clipboard
open fun setHotspot(hotX: <Error class: unknown class>, hotY: <Error class: unknown class>)

Sets the position of the drag surface that will be kept under the cursor hotspot.