signal callback delegate or function to connect
void callback(gdk.drag_context.DragContext context, int x, int y, gtk.selection_data.SelectionData data, uint info, uint time, gtk.widget.Widget widget)
context the drag context (optional)
x where the drop happened (optional)
y where the drop happened (optional)
data the received data (optional)
info the info that has been registered with the target in the #GtkTargetList (optional)
time the timestamp at which the data was received (optional)
widget the instance the signal is connected to (optional)
Yes.After to execute callback after default handler, No.After to execute before (default)
Signal ID
Connect to DragDataReceived signal.
The ::drag-data-received signal is emitted on the drop site when the dragged data has been received. If the data was received in order to determine whether the drop will be accepted, the handler is expected to call gdk.global.dragStatus and not finish the drag. If the data was received in response to a #GtkWidget::drag-drop signal (and this is the last target to be received), the handler for this signal is expected to process the received data and then call gtk.global.dragFinish, setting the success parameter depending on whether the data was processed successfully.
Applications must create some means to determine why the signal was emitted and therefore whether to call gdk.global.dragStatus or gtk.global.dragFinish.
The handler may inspect the selected action with gdk.drag_context.DragContext.getSelectedAction before calling gtk.global.dragFinish, e.g. to implement gdk.types.DragAction.Ask as shown in the following example: