1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 Functions for handling inter-process communication via selections
7 <!-- ##### SECTION Long_Description ##### -->
10 The selection mechanism provides the basis for different types
11 of communication between processes. In particular, drag and drop and
12 #GtkClipboard work via selections. You will very seldom or
13 never need to use most of the functions in this section directly;
14 #GtkClipboard provides a nicer interface to the same functionality.
17 Some of the datatypes defined this section are used in
18 the #GtkClipboard and drag-and-drop API's as well. The
19 #GtkTargetEntry structure and #GtkTargetList objects represent
20 lists of data types that are supported when sending or
21 receiving data. The #GtkSelectionData object is used to
22 store a chunk of data along with the data type and other
23 associated information.
26 <!-- ##### SECTION See_Also ##### -->
31 <term>#GtkWidget</term>
32 <listitem><para>Much of the operation of selections happens via
33 signals for #GtkWidget. In particular, if you are
34 using the functions in this section, you may need
35 to pay attention to ::selection_get,
36 ::selection_received, and :selection_clear_event
37 signals.</para></listitem>
44 <!-- ##### SECTION Stability_Level ##### -->
47 <!-- ##### STRUCT GtkTargetEntry ##### -->
49 A #GtkTargetEntry structure represents a single type of
50 data than can be supplied for by a widget for a selection
51 or for supplied or received during drag-and-drop. It
52 contains a string representing the drag type, a flags
53 field (used only for drag and drop - see #GtkTargetFlags),
54 and an application assigned integer ID. The integer
55 ID will later be passed as a signal parameter for signals
56 like "selection_get". It allows the application to identify
57 the target type without extensive string compares.
64 <!-- ##### STRUCT GtkTargetList ##### -->
66 A #GtkTargetList structure is a reference counted list
67 of #GtkTargetPair. It is used to represent the same
68 information as a table of #GtkTargetEntry, but in
69 an efficient form. This structure should be treated as
76 <!-- ##### STRUCT GtkTargetPair ##### -->
78 Internally used structure in the drag-and-drop and
79 selection handling code.
86 <!-- ##### FUNCTION gtk_target_list_new ##### -->
95 <!-- ##### FUNCTION gtk_target_list_ref ##### -->
102 <!-- ##### FUNCTION gtk_target_list_unref ##### -->
109 <!-- ##### FUNCTION gtk_target_list_add ##### -->
119 <!-- ##### FUNCTION gtk_target_list_add_table ##### -->
128 <!-- ##### FUNCTION gtk_target_list_add_text_targets ##### -->
137 <!-- ##### FUNCTION gtk_target_list_add_image_targets ##### -->
147 <!-- ##### FUNCTION gtk_target_list_add_uri_targets ##### -->
156 <!-- ##### FUNCTION gtk_target_list_remove ##### -->
164 <!-- ##### FUNCTION gtk_target_list_find ##### -->
174 <!-- ##### FUNCTION gtk_selection_owner_set ##### -->
184 <!-- ##### FUNCTION gtk_selection_owner_set_for_display ##### -->
196 <!-- ##### FUNCTION gtk_selection_add_target ##### -->
206 <!-- ##### FUNCTION gtk_selection_add_targets ##### -->
216 <!-- ##### FUNCTION gtk_selection_clear_targets ##### -->
225 <!-- ##### FUNCTION gtk_selection_convert ##### -->
236 <!-- ##### FUNCTION gtk_selection_data_set ##### -->
247 <!-- ##### FUNCTION gtk_selection_data_set_text ##### -->
258 <!-- ##### FUNCTION gtk_selection_data_get_text ##### -->
267 <!-- ##### FUNCTION gtk_selection_data_set_pixbuf ##### -->
277 <!-- ##### FUNCTION gtk_selection_data_get_pixbuf ##### -->
286 <!-- ##### FUNCTION gtk_selection_data_set_uris ##### -->
296 <!-- ##### FUNCTION gtk_selection_data_get_uris ##### -->
305 <!-- ##### FUNCTION gtk_selection_data_get_targets ##### -->
316 <!-- ##### FUNCTION gtk_selection_data_targets_include_image ##### -->
326 <!-- ##### FUNCTION gtk_selection_data_targets_include_text ##### -->
335 <!-- ##### FUNCTION gtk_selection_data_targets_include_uri ##### -->
344 <!-- ##### FUNCTION gtk_targets_include_image ##### -->
355 <!-- ##### FUNCTION gtk_targets_include_text ##### -->
365 <!-- ##### FUNCTION gtk_targets_include_uri ##### -->
375 <!-- ##### FUNCTION gtk_selection_remove_all ##### -->
382 <!-- ##### FUNCTION gtk_selection_clear ##### -->
391 <!-- ##### FUNCTION gtk_selection_data_copy ##### -->
399 <!-- ##### FUNCTION gtk_selection_data_free ##### -->