Package: gdk

Function gdk:drag-begin

Lambda List

gdk:drag-begin (surface device content actions dx dy)

Arguments

surface -- a gdk:surface object for this drag object
device -- a gdk:device object that controls the drag object
content -- a gdk:content-provider object with the offered content
actions -- a gdk:drag-action value with the actions supported by this drag object
dx -- a double float with the x offset to the position of the device where the drag nominally started
dy -- a double float with the y offset to the position of the device where the drag nominally started

Return Value

The newly created gdk:drag object of nil on error.

Details

Starts a drag and creates a new drag context for it. This function is called by the drag source. After this call, you probably want to set up the drag icon using the surface returned by the gdk:drag-drag-surface function.

This function returns a reference to the gdk:drag object, but GTK keeps its own reference as well, as long as the DND operation is going on.

Note: If actions include :move, you need to listen for the "dnd-finished" signal and delete the data at the source if the gdk:drag-selected-action function returns :move.
 

See also

#2024-1-7