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 ##### -->
103 <!-- ##### FUNCTION gtk_target_list_unref ##### -->
110 <!-- ##### FUNCTION gtk_target_list_add ##### -->
120 <!-- ##### FUNCTION gtk_target_list_add_table ##### -->
129 <!-- ##### FUNCTION gtk_target_list_add_text_targets ##### -->
138 <!-- ##### FUNCTION gtk_target_list_add_image_targets ##### -->
148 <!-- ##### FUNCTION gtk_target_list_add_uri_targets ##### -->
157 <!-- ##### FUNCTION gtk_target_list_add_rich_text_targets ##### -->
168 <!-- ##### FUNCTION gtk_target_list_remove ##### -->
176 <!-- ##### FUNCTION gtk_target_list_find ##### -->
186 <!-- ##### FUNCTION gtk_target_table_free ##### -->
195 <!-- ##### FUNCTION gtk_target_table_new_from_list ##### -->
205 <!-- ##### FUNCTION gtk_selection_owner_set ##### -->
215 <!-- ##### FUNCTION gtk_selection_owner_set_for_display ##### -->
227 <!-- ##### FUNCTION gtk_selection_add_target ##### -->
237 <!-- ##### FUNCTION gtk_selection_add_targets ##### -->
247 <!-- ##### FUNCTION gtk_selection_clear_targets ##### -->
256 <!-- ##### FUNCTION gtk_selection_convert ##### -->
267 <!-- ##### FUNCTION gtk_selection_data_set ##### -->
278 <!-- ##### FUNCTION gtk_selection_data_set_text ##### -->
289 <!-- ##### FUNCTION gtk_selection_data_get_text ##### -->
298 <!-- ##### FUNCTION gtk_selection_data_set_pixbuf ##### -->
308 <!-- ##### FUNCTION gtk_selection_data_get_pixbuf ##### -->
317 <!-- ##### FUNCTION gtk_selection_data_set_uris ##### -->
327 <!-- ##### FUNCTION gtk_selection_data_get_uris ##### -->
336 <!-- ##### FUNCTION gtk_selection_data_get_targets ##### -->
347 <!-- ##### FUNCTION gtk_selection_data_targets_include_image ##### -->
357 <!-- ##### FUNCTION gtk_selection_data_targets_include_text ##### -->
366 <!-- ##### FUNCTION gtk_selection_data_targets_include_uri ##### -->
375 <!-- ##### FUNCTION gtk_selection_data_targets_include_rich_text ##### -->
385 <!-- ##### FUNCTION gtk_selection_data_get_selection ##### -->
394 <!-- ##### FUNCTION gtk_selection_data_get_data ##### -->
403 <!-- ##### FUNCTION gtk_selection_data_get_length ##### -->
412 <!-- ##### FUNCTION gtk_selection_data_get_data_type ##### -->
421 <!-- ##### FUNCTION gtk_selection_data_get_display ##### -->
430 <!-- ##### FUNCTION gtk_selection_data_get_format ##### -->
439 <!-- ##### FUNCTION gtk_selection_data_get_target ##### -->
448 <!-- ##### FUNCTION gtk_targets_include_image ##### -->
459 <!-- ##### FUNCTION gtk_targets_include_text ##### -->
469 <!-- ##### FUNCTION gtk_targets_include_uri ##### -->
479 <!-- ##### FUNCTION gtk_targets_include_rich_text ##### -->
490 <!-- ##### FUNCTION gtk_selection_remove_all ##### -->
497 <!-- ##### FUNCTION gtk_selection_clear ##### -->
506 <!-- ##### FUNCTION gtk_selection_data_copy ##### -->
514 <!-- ##### FUNCTION gtk_selection_data_free ##### -->