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 <!-- ##### SECTION Image ##### -->
50 <!-- ##### STRUCT GtkTargetEntry ##### -->
52 A #GtkTargetEntry structure represents a single type of
53 data than can be supplied for by a widget for a selection
54 or for supplied or received during drag-and-drop. It
55 contains a string representing the drag type, a flags
56 field (used only for drag and drop - see #GtkTargetFlags),
57 and an application assigned integer ID. The integer
58 ID will later be passed as a signal parameter for signals
59 like "selection_get". It allows the application to identify
60 the target type without extensive string compares.
67 <!-- ##### STRUCT GtkTargetList ##### -->
69 A #GtkTargetList structure is a reference counted list
70 of #GtkTargetPair. It is used to represent the same
71 information as a table of #GtkTargetEntry, but in
72 an efficient form. This structure should be treated as
79 <!-- ##### STRUCT GtkTargetPair ##### -->
81 Internally used structure in the drag-and-drop and
82 selection handling code.
89 <!-- ##### FUNCTION gtk_target_list_new ##### -->
98 <!-- ##### FUNCTION gtk_target_list_ref ##### -->
106 <!-- ##### FUNCTION gtk_target_list_unref ##### -->
113 <!-- ##### FUNCTION gtk_target_list_add ##### -->
123 <!-- ##### FUNCTION gtk_target_list_add_table ##### -->
132 <!-- ##### FUNCTION gtk_target_list_add_text_targets ##### -->
141 <!-- ##### FUNCTION gtk_target_list_add_image_targets ##### -->
151 <!-- ##### FUNCTION gtk_target_list_add_uri_targets ##### -->
160 <!-- ##### FUNCTION gtk_target_list_add_rich_text_targets ##### -->
171 <!-- ##### FUNCTION gtk_target_list_remove ##### -->
179 <!-- ##### FUNCTION gtk_target_list_find ##### -->
189 <!-- ##### FUNCTION gtk_target_table_free ##### -->
198 <!-- ##### FUNCTION gtk_target_table_new_from_list ##### -->
208 <!-- ##### FUNCTION gtk_selection_owner_set ##### -->
218 <!-- ##### FUNCTION gtk_selection_owner_set_for_display ##### -->
230 <!-- ##### FUNCTION gtk_selection_add_target ##### -->
240 <!-- ##### FUNCTION gtk_selection_add_targets ##### -->
250 <!-- ##### FUNCTION gtk_selection_clear_targets ##### -->
259 <!-- ##### FUNCTION gtk_selection_convert ##### -->
270 <!-- ##### FUNCTION gtk_selection_data_set ##### -->
281 <!-- ##### FUNCTION gtk_selection_data_set_text ##### -->
292 <!-- ##### FUNCTION gtk_selection_data_get_text ##### -->
301 <!-- ##### FUNCTION gtk_selection_data_set_pixbuf ##### -->
311 <!-- ##### FUNCTION gtk_selection_data_get_pixbuf ##### -->
320 <!-- ##### FUNCTION gtk_selection_data_set_uris ##### -->
330 <!-- ##### FUNCTION gtk_selection_data_get_uris ##### -->
339 <!-- ##### FUNCTION gtk_selection_data_get_targets ##### -->
350 <!-- ##### FUNCTION gtk_selection_data_targets_include_image ##### -->
360 <!-- ##### FUNCTION gtk_selection_data_targets_include_text ##### -->
369 <!-- ##### FUNCTION gtk_selection_data_targets_include_uri ##### -->
378 <!-- ##### FUNCTION gtk_selection_data_targets_include_rich_text ##### -->
388 <!-- ##### FUNCTION gtk_selection_data_get_selection ##### -->
397 <!-- ##### FUNCTION gtk_selection_data_get_data ##### -->
406 <!-- ##### FUNCTION gtk_selection_data_get_length ##### -->
415 <!-- ##### FUNCTION gtk_selection_data_get_data_type ##### -->
424 <!-- ##### FUNCTION gtk_selection_data_get_display ##### -->
433 <!-- ##### FUNCTION gtk_selection_data_get_format ##### -->
442 <!-- ##### FUNCTION gtk_selection_data_get_target ##### -->
451 <!-- ##### FUNCTION gtk_targets_include_image ##### -->
462 <!-- ##### FUNCTION gtk_targets_include_text ##### -->
472 <!-- ##### FUNCTION gtk_targets_include_uri ##### -->
482 <!-- ##### FUNCTION gtk_targets_include_rich_text ##### -->
493 <!-- ##### FUNCTION gtk_selection_remove_all ##### -->
500 <!-- ##### FUNCTION gtk_selection_data_copy ##### -->
508 <!-- ##### FUNCTION gtk_selection_data_free ##### -->