/** * gtk_drag_dest_set_target_list: (method) * @widget: a #GtkWidget that’s a drag destination * @target_list: (allow-none): list of droppable targets, or %NULL for none * * Sets the target types that this widget can accept from drag-and-drop. * The widget must first be made into a drag destination with * gtk_drag_dest_set(). */ void gtk_drag_dest_set_target_list (GtkWidget *widget, GtkTargetList *target_list) { GtkDragDestSite *site; g_return_if_fail (GTK_IS_WIDGET (widget)); site = g_object_get_data (G_OBJECT (widget), I_("gtk-drag-dest")); if (!site) { g_warning ("Can't set a target list on a widget until you've called gtk_drag_dest_set() " "to make the widget into a drag destination"); return; } if (target_list) gtk_target_list_ref (target_list); if (site->target_list) gtk_target_list_unref (site->target_list); site->target_list = target_list; }
/** * gtk_drag_dest_add_uri_targets: (method) * @widget: a #GtkWidget that’s a drag destination * * Add the URI targets supported by #GtkSelectionData to * the target list of the drag destination. The targets * are added with @info = 0. If you need another value, * use gtk_target_list_add_uri_targets() and * gtk_drag_dest_set_target_list(). * * Since: 2.6 */ void gtk_drag_dest_add_uri_targets (GtkWidget *widget) { GtkTargetList *target_list; target_list = gtk_drag_dest_get_target_list (widget); if (target_list) gtk_target_list_ref (target_list); else target_list = gtk_target_list_new (NULL, 0); gtk_target_list_add_uri_targets (target_list, 0); gtk_drag_dest_set_target_list (widget, target_list); gtk_target_list_unref (target_list); }
void gevasevh_group_selector_set_drag_targets( GtkgEvasEvHGroupSelector* ev, GtkTargetList *dt ) { ev->drag_targets = dt; gtk_target_list_ref(ev->drag_targets); }