Signal

GtkWidget::drag-drop

Declaration

gboolean
drag_drop (
  GtkWidget* self,
  GdkDragContext* context,
  gint x,
  gint y,
  guint time,
  gpointer user_data
)

Description [src]

The ::drag-drop signal is emitted on the drop site when the user drops the data onto the widget. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns FALSE and no further processing is necessary. Otherwise, the handler returns TRUE. In this case, the handler must ensure that gtk_drag_finish() is called to let the source know that the drop is done. The call to gtk_drag_finish() can be done either directly or in a GtkWidget::drag-data-received handler which gets triggered by calling gtk_drag_get_data() to receive the data for one or more of the supported targets.

Default handler:

The default handler is called after the handlers added via g_signal_connect().

Parameters

context GdkDragContext
 

The drag context.

 The data is owned by the caller of the function.
x gint
 

The x coordinate of the current cursor position.

y gint
 

The y coordinate of the current cursor position.

time guint
 

The timestamp of the motion event.

Return value

Returns: gboolean
 

Whether the cursor position is in a drop zone.