Libraries:Gtk:Gdk:Drag
Functions
Abort(context @ Gtk.Gdk.DragContext.T, time_ @ Std.Integer.SmallT) : Std.Object.T
Begin(window @ Gtk.Gdk.Window.T, targets @ Std.Object.T) : Gtk.Gdk.DragContext.T
Starts a drag and creates a new drag context for it.
This function is called by the drag source.
| window | the source window for this drag. |
| targets | the offered targets, as list of Gtk.Gdk.Atom.Ts. [transfer none][element-type GdkAtom] |
| Returns | a newly created Gtk.Gdk.DragContext.T. |
Drop(context @ Gtk.Gdk.DragContext.T, time_ @ Std.Integer.SmallT) : Std.Object.T
Drops on the current destination.
This function is called by the drag source.
| context | a Gtk.Gdk.DragContext.T. |
| time_ | the timestamp for this operation. |
DropSucceeded(context @ Gtk.Gdk.DragContext.T) : Std.Symbol.T
Returns whether the dropped data has been successfully transferred. This function is intended to be used while handling a Gtk.Gdk.EventType.DropFinished event, its return value is meaningless at other times.
| context | a Gtk.Gdk.DragContext.T |
| Returns | TRUE if the drop was successful. |
FindWindow(context @ Gtk.Gdk.DragContext.T, drag_window @ Gtk.Gdk.Window.T, x_root @ Std.Integer.SmallT, y_root @ Std.Integer.SmallT, dest_window @ Std.Object.T, protocol @ Std.Object.T) : Std.Object.T
Warning
FindWindow has been deprecated since version 2.24 and should not be used in newly-written code. Use FindWindowForScreen instead.
FindWindowForScreen(context @ Gtk.Gdk.DragContext.T, drag_window @ Gtk.Gdk.Window.T, screen @ Gtk.Gdk.Screen.T, x_root @ Std.Integer.SmallT, y_root @ Std.Integer.SmallT, dest_window @ Std.Object.T, protocol @ Std.Object.T) : Std.Object.T
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 Motion.
| context | a Gtk.Gdk.DragContext.T |
| drag_window | a window which may be at the pointer position, but should be ignored, since it is put up by the drag source as an icon. |
| screen | the screen where the destination window is sought. |
| x_root | the x position of the pointer in root coordinates. |
| y_root | the y position of the pointer in root coordinates. |
| dest_window | location to store the destination window in. [out] |
| protocol | location to store the DND protocol in. [out] |
GetProtocol(xid @ Std.Integer.SmallT, protocol @ Std.Object.T) : Std.Integer.SmallT
Warning
GetProtocol has been deprecated since version 2.24 and should not be used in newly-written code. Use GetProtocolForDisplay instead
GetProtocolForDisplay(display @ Gtk.Gdk.Display.T, xid @ Std.Integer.SmallT, protocol @ Std.Object.T) : Std.Integer.SmallT
Finds out the DND protocol supported by a window.
| display | the Gtk.Gdk.Display.T where the destination window resides |
| xid | the windowing system id of the destination window. |
| protocol | location where the supported DND protocol is returned. |
| Returns | the windowing system id of the window where the drop should happen. This may be xid or the id of a proxy window, or zero if xid doesn't support Drag and Drop. |
GetSelection(context @ Gtk.Gdk.DragContext.T) : Gtk.Gdk.Atom.T
Returns the selection atom for the current source window.
| context | a Gtk.Gdk.DragContext.T. |
| Returns | the selection atom. |
Motion(context @ Gtk.Gdk.DragContext.T, dest_window @ Gtk.Gdk.Window.T, protocol @ Gtk.Gdk.DragProtocol.T, x_root @ Std.Integer.SmallT, y_root @ Std.Integer.SmallT, suggested_action @ Std.Integer.SmallT, possible_actions @ Std.Integer.SmallT, time_ @ Std.Integer.SmallT) : Std.Symbol.T
Updates the drag context when the pointer moves or the set of actions changes.
This function is called by the drag source.
| context | a Gtk.Gdk.DragContext.T. |
| dest_window | the new destination window, obtained by FindWindow. |
| protocol | the DND protocol in use, obtained by FindWindow. |
| 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. |
| Returns | FIXME |
Status(context @ Gtk.Gdk.DragContext.T, action @ Std.Integer.SmallT, time_ @ Std.Integer.SmallT) : Std.Object.T
Selects one of the actions offered by the drag source.
This function is called by the drag destination in response to Motion called by the drag source.
| context | a Gtk.Gdk.DragContext.T. |
| 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. |
Wrapl, The Programming Language
Aborts a drag without dropping.
This function is called by the drag source.