Lambda Listgtk-drag-begin-with-coordinates (widget targets actions button event x y) Argumentswidget -- the gtk-widget source widget targets -- a gtk-target-list instance with the targets, data formats, in which the source can provide the data actions -- a gdk-drag-action bitmask of the allowed drag actions for this drag button -- an integer with the button the user clicked to start the drag event -- a gdk-event event that triggered the start of the drag, or nil if none can be obtained x -- an integer with the initial x coordinate to start dragging from,
in the coordinate space of the widget, if -1 is passed, the coordinates are retrieved from event or the current pointer position y -- an integer with the initial y coordinate to start dragging from,
in the coordinate space of the widget, if -1 is passed, the coordinates are retrieved from event or the current pointer position
Return ValueDetails
Initiates a drag on the source side.
The function only needs to be used when the application is starting drags itself, and is not needed when the gtk-drag-source-set function is used. The event argument is used to retrieve the timestamp that will be used internally to grab the pointer. If the event argument is nil, then the +gdk-current-time+ value will be used. However, you should try
to pass a real event in all cases, since that can be used to get information
about the drag.
Generally there are three cases when you want to start a drag by hand by
calling this function: -
During a "button-press-event" handler, if you want to start a drag
immediately when the user presses the mouse button. Pass the event that
you have in your "button-press-event" handler.
-
During a "motion-notify-event" handler, if you want to start a drag
when the mouse moves past a certain threshold distance after a button
press. Pass the event that you have in your "motion-notify-event"
handler.
-
During a timeout handler, if you want to start a drag after the mouse
button is held down for some time. Try to save the last event that you got from the mouse, using the gdk-event-copy function, and pass it
to this function. If you really cannot pass a real event, pass the nil value instead.
|
| See also |