Sets our main struct and passes it to the parent class.
Creates a new GtkDragSource object.
Emitted on the drag source when a drag is started.
Emitted on the drag source when a drag has failed.
Emitted on the drag source when a drag is finished.
Emitted when a drag is about to be initiated.
Cancels a currently ongoing drag operation.
Gets the actions that are currently set on the GtkDragSource.
Gets the current content provider of a GtkDragSource.
Returns the underlying GdkDrag object for an ongoing drag.
Get the main Gtk struct
the main Gtk struct as a void*
Sets the actions on the GtkDragSource.
Sets a content provider on a GtkDragSource.
Sets a paintable to use as icon during DND operations.
the main Gtk struct
the main Gtk struct
Get the main Gtk struct
the main Gtk struct as a void*
Returns the button number @gesture listens for.
Returns the button number currently interacting with @gesture, or 0 if there is none.
Returns the event sequence currently interacting with @gesture.
Gets whether a gesture is exclusive.
Returns %TRUE if the gesture is only triggered by touch events.
Sets the button number @gesture listens to.
Sets whether @gesture is exclusive.
Sets whether to handle only touch events.
GtkDragSource is an event controller to initiate Drag-And-Drop operations.
GtkDragSource 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 [class@Gdk.ContentProvider], 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 [method@Gtk.Widget.add_controller].
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, GtkDragSource has [signal@Gtk.DragSource::prepare] and [signal@Gtk.DragSource::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 GdkDrag object has been created, and can be used to set up the drag icon.
During the DND operation, GtkDragSource 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 %GDK_ACTION_MOVE, you need to listen for the [signal@Gtk.DragSource::drag-end] signal and delete the data after it has been transferred.