Package: gtk

Function gtk-entry-set-icon-drag-source

Lambda List

gtk-entry-set-icon-drag-source (entry pos tlist actions)

Arguments

entry -- a gtk-entry widget
pos -- icon position of type gtk-entry-icon-position
tlist -- the targets of type gtk-target-list (data formats) in which the data can be provided
actions -- a bitmask of type gdk-drag-action of the allowed drag actions

Details

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 "drag-data-get", or possibly "drag-data-delete", signal, and use the function gtk-entry-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 "drag-begin" signal to set a different icon. Note that you have to use the function g-signal-connect-after to ensure that your signal handler gets executed after the default handler.
 

See also

2021-11-4