### Class

# GdkDrag

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

#### Hierarchy

#### Ancestors

- GObject

#### Functions

###### gdk_drag_begin

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

#### Instance methods

###### gdk_drag_drop_done

Informs GDK that the drop ended.

###### gdk_drag_get_actions

Determines the bitmask of possible actions proposed by the source.

###### gdk_drag_get_content

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

###### gdk_drag_get_device

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

###### gdk_drag_get_display

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

###### gdk_drag_get_drag_surface

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

###### gdk_drag_get_formats

Retrieves the formats supported by this `GdkDrag` object.

###### gdk_drag_get_selected_action

Determines the action chosen by the drag destination.

###### gdk_drag_get_surface

Returns the `GdkSurface` where the drag originates.

###### gdk_drag_set_hotspot

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

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

Please see GObject for a full list of methods.

#### Properties

###### Gdk.Drag:actions

The possible actions of this drag.

###### Gdk.Drag:content

The `GdkContentProvider`.

###### Gdk.Drag:device

The `GdkDevice` that is performing the drag.

###### Gdk.Drag:display

The `GdkDisplay` that the drag belongs to.

###### Gdk.Drag:formats

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

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

The currently selected action of the drag.

###### Gdk.Drag:surface

The surface where the drag originates.

#### Signals

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

Emitted when the drag operation is cancelled.

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

Emitted when the destination side has finished reading all data.

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

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

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