### Class

# Gdk Drag

since: 4.0

#### Description [src]

    abstract class Gdk.Drag : GObject.Object
    {
      /* No available fields */
    }

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 `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.

Available since: 4.0

#### Ancestors

- GObject

#### Functions

###### gdk_drag_begin

Starts a drag and creates a new drag context for it.

since: 4.0

#### Instance methods

###### gdk_drag_drop_done

Informs GDK that the drop ended.

since: 4.0

###### gdk_drag_get_actions

Determines the bitmask of possible actions proposed by the source.

since: 4.0

###### gdk_drag_get_content

Returns the `GdkContentProvider` associated to the `GdkDrag` object.

since: 4.0

###### gdk_drag_get_device

Returns the `GdkDevice` associated to the `GdkDrag` object.

since: 4.0

###### gdk_drag_get_display

Gets the `GdkDisplay` that the drag object was created for.

since: 4.0

###### gdk_drag_get_drag_surface

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

since: 4.0

###### gdk_drag_get_formats

Retrieves the formats supported by this `GdkDrag` object.

since: 4.0

###### gdk_drag_get_selected_action

Determines the action chosen by the drag destination.

since: 4.0

###### gdk_drag_get_surface

Returns the `GdkSurface` where the drag originates.

since: 4.0

###### gdk_drag_set_hotspot

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

since: 4.0

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Gdk.Drag:actions

The possible actions of this drag.

since: 4.0

###### Gdk.Drag:content

The `GdkContentProvider`.

since: 4.0

###### Gdk.Drag:device

The `GdkDevice` that is performing the drag.

since: 4.0

###### Gdk.Drag:display

The `GdkDisplay` that the drag belongs to.

since: 4.0

###### Gdk.Drag:formats

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

since: 4.0

###### Gdk.Drag:selected-action

The currently selected action of the drag.

since: 4.0

###### Gdk.Drag:surface

The surface where the drag originates.

since: 4.0

#### Signals

###### Gdk.Drag::cancel

Emitted when the drag operation is cancelled.

since: 4.0

###### Gdk.Drag::dnd-finished

Emitted when the destination side has finished reading all data.

since: 4.0

###### Gdk.Drag::drop-performed

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

since: 4.0

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

since: 2.0