DragContext

Description These functions provide a low level interface for drag and drop. The X backend of GDK supports both the Xdnd and Motif drag and drop protocols transparently, the Win32 backend supports the WM_DROPFILES protocol. 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.

Constructors

this
this(GdkDragContext* gdkDragContext)

Sets our main struct and passes it to the parent class

this
this()

Warning gdk_drag_context_new has been deprecated since version 2.24 and should not be used in newly-written code. This function is not useful, you always obtain drag contexts by gdk_drag_begin() or similar. Creates a new GdkDragContext.

Members

Functions

doref
void doref()

Warning gdk_drag_context_ref has been deprecated since version 2.2 and should not be used in newly-written code. Use g_object_ref() instead. Deprecated function; use g_object_ref() instead.

dragAbort
void dragAbort(uint time)

Aborts a drag without dropping. This function is called by the drag source.

dragDrop
void dragDrop(uint time)

Drops on the current destination. This function is called by the drag source.

dragDropSucceeded
int dragDropSucceeded()

Returns whether the dropped data has been successfully transferred. This function is intended to be used while handling a GDK_DROP_FINISHED event, its return value is meaningless at other times. Since 2.6

dragFindWindow
void dragFindWindow(Window dragWindow, int xRoot, int yRoot, Window destWindow, GdkDragProtocol protocol)

Warning gdk_drag_find_window has been deprecated since version 2.24 and should not be used in newly-written code. Use gdk_drag_find_window_for_screen() instead. Finds the destination window and DND protocol to use at the given pointer position. This function is called by the drag source to obtain the dest_window and protocol parameters for gdk_drag_motion().

dragFindWindowForScreen
void dragFindWindowForScreen(Window dragWindow, Screen screen, int xRoot, int yRoot, Window destWindow, GdkDragProtocol protocol)

Finds the destination window and DND protocol to use at the given pointer position. This function is called by the drag source to obtain the dest_window and protocol parameters for gdk_drag_motion(). Since 2.2

dragGetSelection
GdkAtom dragGetSelection()

Returns the selection atom for the current source window.

dragMotion
int dragMotion(Window destWindow, GdkDragProtocol protocol, int xRoot, int yRoot, GdkDragAction suggestedAction, GdkDragAction possibleActions, uint time)

Updates the drag context when the pointer moves or the set of actions changes. This function is called by the drag source.

dragStatus
void dragStatus(GdkDragAction action, uint time)

Selects one of the actions offered by the drag source. This function is called by the drag destination in response to gdk_drag_motion() called by the drag source.

dropFinish
void dropFinish(int success, uint time)

Ends the drag operation after a drop. This function is called by the drag destination.

dropReply
void dropReply(int ok, uint time)

Accepts or rejects a drop. This function is called by the drag destination in response to a drop initiated by the drag source.

getActions
GdkDragAction getActions()

Determines the bitmask of actions proposed by the source if gdk_drag_context_suggested_action() returns GDK_ACTION_ASK. Since 2.22

getDragContextStruct
GdkDragContext* getDragContextStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getSelectedAction
GdkDragAction getSelectedAction()

Determines the action chosen by the drag destination. Since 2.22

getSourceWindow
Window getSourceWindow()

Returns the GdkWindow where the DND operation started. Since 2.22

getStruct
void* getStruct()

the main Gtk struct as a void*

getSuggestedAction
GdkDragAction getSuggestedAction()

Determines the suggested drag action of the context. Since 2.22

listTargets
ListG listTargets()

Retrieves the list of targets of the context. Since 2.22

unref
void unref()

Warning gdk_drag_context_unref has been deprecated since version 2.2 and should not be used in newly-written code. Use g_object_unref() instead. Deprecated function; use g_object_unref() instead.

Static functions

dragBegin
DragContext dragBegin(Window window, ListG targets)

Starts a drag and creates a new drag context for it. This function is called by the drag source.

dragGetProtocol
GdkNativeWindow dragGetProtocol(GdkNativeWindow xid, GdkDragProtocol protocol)

Warning gdk_drag_get_protocol has been deprecated since version 2.24 and should not be used in newly-written code. Use gdk_drag_get_protocol_for_display() instead Finds out the DND protocol supported by a window.

dragGetProtocolForDisplay
GdkNativeWindow dragGetProtocolForDisplay(Display display, GdkNativeWindow xid, GdkDragProtocol protocol)

Finds out the DND protocol supported by a window. Since 2.2

Variables

gdkDragContext
GdkDragContext* gdkDragContext;

the main Gtk struct

Meta