Package: gtk
Class gtk:drag-source
Superclassesgtk:gesture-single, gtk:gesture, gtk:event-controller, gobject:object, common-lisp:standard-object, common-lisp:t Documented Subclasses
None
Direct SlotsDetails The gtk:drag-source object is an auxiliary object that is used to
initiate Drag and Drop operations.
It can be set up with the necessary ingredients for a DND operation ahead of
time. This includes the source for the data that is being transferred, in the form of a gdk:content-provider object, the desired action, and the
icon to use during the drag operation. After setting it up, the drag source
must be added to a widget as an event controller, using the gtk:widget-add-controller function. Setting up the content provider and icon ahead of time only makes sense when the data does not change. More commonly, you will want to set them up just in time. To do so, the gtk:drag-source object has "prepare" and "drag-begin" signals. The "prepare" signal is emitted before a drag is started, and can be used to set the content provider and actions that the drag should be started with. The "drag-begin" signal is emitted after the gdk:drag object has been created, and can be used to set up the drag icon. During the DND operation, the gtk:drag-source object emits signals that can be used to obtain updates about the status of the operation, but it is not normally necessary to connect to any signals, except for one case. When the supported actions include the :move value of the gdk:drag-action flags, you need to listen for the "drag-end" signal and delete the data after it has been transferred. Signal DetailsThe "drag-begin" signallambda (source drag) :run-last
The "drag-cancel" signallambda (source drag reason) :run-last
The "drag-end" signallambda (source drag delete) :run-last
The "prepare" signallambda (source x y) :run-last
| Returned bySlot Access FunctionsInherited Slot Access Functions |
2024-11-2