Method
GtkEntryset_icon_drag_source
since: 2.16
Declaration [src]
void
gtk_entry_set_icon_drag_source (
GtkEntry* entry,
GtkEntryIconPosition icon_pos,
GtkTargetList* target_list,
GdkDragAction actions
)
Description [src]
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
GtkWidget::drag-data-get
(or possibly GtkWidget::drag-data-delete
)
signal, and use gtk_entry_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
GtkWidget::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.
Available since: 2.16
Parameters
icon_pos
-
Type:
GtkEntryIconPosition
Icon position.
target_list
-
Type:
GtkTargetList
The targets (data formats) in which the data can be provided.
The data is owned by the caller of the method. actions
-
Type:
GdkDragAction
A bitmask of the allowed drag actions.