Next: Properties and Atoms, Previous: Selections, Up: Top
Functions for controlling drag and drop handling
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.
Derives from
<gobject>.This class defines no direct slots.
<gdk-drag-context>) ⇒ (ret <gdk-atom>)Returns the selection atom for the current source window.
- context
- a
<gdk-drag-context>.- ret
- the selection atom.
<gdk-drag-context>) (time_ unsigned-int32)Aborts a drag without dropping.
This function is called by the drag source.
- context
- a
<gdk-drag-context>.- time
- the timestamp for this operation.
<gdk-drag-context>) (ok bool) (time_ unsigned-int32)Accepts or rejects a drop.
This function is called by the drag destination in response to a drop initiated by the drag source.
- context
- a
<gdk-drag-context>.- ok
- ‘
#t’ if the drop is accepted.- time
- the timestamp for this operation.
<gdk-drag-context>)Creates a new
<gdk-drag-context>.
- ret
- the newly created
<gdk-drag-context>.
<gdk-drag-context>) (time_ unsigned-int32)Drops on the current destination.
This function is called by the drag source.
- context
- a
<gdk-drag-context>.- time
- the timestamp for this operation.
<gdk-drag-context>) (dest_window <gdk-window>) (protocol <gdk-drag-protocol>) (x_root int) (y_root int) (suggested_action <gdk-drag-action>) (possible_actions <gdk-drag-action>) (time_ unsigned-int32) ⇒ (ret bool)Updates the drag context when the pointer moves or the set of actions changes.
This function is called by the drag source.
- context
- a
<gdk-drag-context>.- dest-window
- the new destination window, obtained by
gdk-drag-find-window.- protocol
- the DND protocol in use, obtained by
gdk-drag-find-window.- x-root
- the x position of the pointer in root coordinates.
- y-root
- the y position of the pointer in root coordinates.
- suggested-action
- the suggested action.
- possible-actions
- the possible actions.
- time
- the timestamp for this operation.
- ret
- FIXME
<gdk-drag-context>) (success bool) (time_ unsigned-int32)Ends the drag operation after a drop.
This function is called by the drag destination.
- context
- a
<gtk-drag-context>.- success
- ‘
#t’ if the data was successfully received.- time
- the timestamp for this operation.
<gdk-drag-context>) (action <gdk-drag-action>) (time_ unsigned-int32)Selects one of the actions offered by the drag source.
This function is called by the drag destination in response to
gdk-drag-motioncalled by the drag source.
- context
- a
<gdk-drag-context>.- action
- the selected action which will be taken when a drop happens, or 0 to indicate that a drop will not be accepted.
- time
- the timestamp for this operation.
<gdk-drag-context>) ⇒ (ret bool)Returns wether 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.
- context
- a
<gdk-drag-context>- ret
- ‘
#t’ if the drop was successful.Since 2.6