Gtk.Entry.prototype.set_icon_drag_source

function set_icon_drag_source(icon_pos:Gtk.EntryIconPosition, target_list:Gtk.TargetList, actions:Gdk.DragAction):void {
    // Gjs wrapper for gtk_entry_set_icon_drag_source()
}

Sets up the icon at the given position so that GTK+ will start a drag operation when the user clicks and drags the icon.

To handle the drag operation, you need to connect to the usual Gtk.drag-data-get (or possibly Gtk.drag-data-delete) signal, and use Gtk.Entry.prototype.get_current_icon_drag_source in your signal handler to find out if the drag was started from an icon.

By default, GTK+ uses the icon as the drag icon. You can use the Gtk.drag-begin signal to set a different icon. Note that you have to use g_signal_connect_after() to ensure that your signal handler gets executed after the default handler.

Since 2.16

icon_pos

icon position

target_list

the targets (data formats) in which the data can be provided

actions

a bitmask of the allowed drag actions