begin


Description:

public static Drag? begin (Surface surface, Device device, ContentProvider content, DragAction actions, double dx, double dy)

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 [ [email protected]_drag_surface].

This function returns a reference to the [[email protected]] object, but GTK keeps its own reference as well, as long as the DND operation is going on.

Note: if actions include gdk_action_move, you need to listen for the [[email protected]: GdkDrag:dnd-finished] signal and delete the data at the source if [[email protected]_selected_action] returns gdk_action_move.

Parameters:

surface

the source surface for this drag

device

the device that controls this drag

content

the offered content

actions

the actions supported by this drag

dx

the x offset to device's position where the drag nominally started

dy

the y offset to device's position where the drag nominally started

Returns:

a newly created `GdkDrag`




2022 vala-language.org