Sets our main struct and passes it to the parent class.
Creates a new GtkDropTarget object.
Emitted on the drop site when a drop operation is about to begin.
Emitted on the drop site when the user drops the data onto the widget.
Emitted on the drop site when the pointer enters the widget.
Emitted on the drop site when the pointer leaves the widget.
Emitted while the pointer is moving over the drop target.
Gets the actions that this drop target supports.
Gets the currently handled drop operation.
Get the main Gtk struct
Gets the data formats that this drop target accepts.
Gets the list of supported GTypes for @self.
Gets whether data should be preloaded on hover.
the main Gtk struct as a void*
Gets the current drop data, as a GValue.
Rejects the ongoing drop operation.
Sets the actions that this drop target supports.
Sets the supported GTypes for this drop target.
Sets whether data should be preloaded on hover.
the main Gtk struct
the main Gtk struct
Get the main Gtk struct
the main Gtk struct as a void*
Returns the event that is currently being handled by the controller, and %NULL at other times.
Returns the device of the event that is currently being handled by the controller, and %NULL otherwise.
Returns the modifier state of the event that is currently being handled by the controller, and 0 otherwise.
Returns the timestamp of the event that is currently being handled by the controller, and 0 otherwise.
Gets the name of @controller.
Gets the propagation limit of the event controller.
Gets the propagation phase at which @controller handles events.
Returns the #GtkWidget this controller relates to.
Resets the @controller to a clean state.
Sets a name on the controller that can be used for debugging.
Sets the event propagation limit on the event controller.
Sets the propagation phase at which a controller handles events.
GtkDropTarget is an event controller to receive Drag-and-Drop operations.
The most basic way to use a GtkDropTarget to receive drops on a widget is to create it via [ctor@Gtk.DropTarget.new], passing in the GType of the data you want to receive and connect to the [signal@Gtk.DropTarget::drop] signal to receive the data:
GtkDropTarget supports more options, such as:
* rejecting potential drops via the [signal@Gtk.DropTarget::accept] signal and the [method@Gtk.DropTarget.reject] function to let other drop targets handle the drop * tracking an ongoing drag operation before the drop via the [signal@Gtk.DropTarget::enter], [signal@Gtk.DropTarget::motion] and [signal@Gtk.DropTarget::leave] signals * configuring how to receive data by setting the [property@Gtk.DropTarget:preload] property and listening for its availability via the [property@Gtk.DropTarget:value] property
However, GtkDropTarget is ultimately modeled in a synchronous way and only supports data transferred via GType. If you want full control over an ongoing drop, the [class@Gtk.DropTargetAsync] object gives you this ability.
While a pointer is dragged over the drop target's widget and the drop has not been rejected, that widget will receive the %GTK_STATE_FLAG_DROP_ACTIVE state, which can be used to style the widget.
If you are not interested in receiving the drop, but just want to update UI state during a Drag-and-Drop operation (e.g. switching tabs), you can use [class@Gtk.DropControllerMotion].