1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>Selections</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
7
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
8
<link rel="up" href="gtkbase.html" title="Part II. GTK+ Core Reference">
9
<link rel="prev" href="GtkStyle.html" title="Styles">
10
<link rel="next" href="gtk2-Feature-Test-Macros.html" title="Version Information">
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17
<td><a accesskey="p" href="GtkStyle.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="gtkbase.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
<th width="100%" align="center">GTK+ 2 Reference Manual</th>
21
<td><a accesskey="n" href="gtk2-Feature-Test-Macros.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#gtk2-Selections.synopsis" class="shortcut">Top</a>
26
<a href="#gtk2-Selections.description" class="shortcut">Description</a>
28
<a href="#gtk2-Selections.object-hierarchy" class="shortcut">Object Hierarchy</a>
31
<div class="refentry">
32
<a name="gtk2-Selections"></a><div class="titlepage"></div>
33
<div class="refnamediv"><table width="100%"><tr>
35
<h2><span class="refentrytitle"><a name="gtk2-Selections.top_of_page"></a>Selections</span></h2>
36
<p>Selections — Functions for handling inter-process communication via selections</p>
38
<td valign="top" align="right"></td>
40
<div class="refsynopsisdiv">
41
<a name="gtk2-Selections.synopsis"></a><h2>Synopsis</h2>
42
<a name="GtkTargetList"></a><pre class="synopsis">
43
#include <gtk/gtk.h>
45
struct <a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry">GtkTargetEntry</a>;
46
struct <a class="link" href="gtk2-Selections.html#GtkTargetList-struct" title="struct GtkTargetList">GtkTargetList</a>;
47
struct <a class="link" href="gtk2-Selections.html#GtkTargetPair" title="struct GtkTargetPair">GtkTargetPair</a>;
48
<a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="returnvalue">GtkTargetList</span></a> * <a class="link" href="gtk2-Selections.html#gtk-target-list-new" title="gtk_target_list_new ()">gtk_target_list_new</a> (<em class="parameter"><code>const <a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> *targets</code></em>,
49
<em class="parameter"><code><span class="type">guint</span> ntargets</code></em>);
50
<a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="returnvalue">GtkTargetList</span></a> * <a class="link" href="gtk2-Selections.html#gtk-target-list-ref" title="gtk_target_list_ref ()">gtk_target_list_ref</a> (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>);
51
<span class="returnvalue">void</span> <a class="link" href="gtk2-Selections.html#gtk-target-list-unref" title="gtk_target_list_unref ()">gtk_target_list_unref</a> (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>);
52
<span class="returnvalue">void</span> <a class="link" href="gtk2-Selections.html#gtk-target-list-add" title="gtk_target_list_add ()">gtk_target_list_add</a> (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>,
53
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> target</code></em>,
54
<em class="parameter"><code><span class="type">guint</span> flags</code></em>,
55
<em class="parameter"><code><span class="type">guint</span> info</code></em>);
56
<span class="returnvalue">void</span> <a class="link" href="gtk2-Selections.html#gtk-target-list-add-table" title="gtk_target_list_add_table ()">gtk_target_list_add_table</a> (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>,
57
<em class="parameter"><code>const <a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> *targets</code></em>,
58
<em class="parameter"><code><span class="type">guint</span> ntargets</code></em>);
59
<span class="returnvalue">void</span> <a class="link" href="gtk2-Selections.html#gtk-target-list-add-text-targets" title="gtk_target_list_add_text_targets ()">gtk_target_list_add_text_targets</a> (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>,
60
<em class="parameter"><code><span class="type">guint</span> info</code></em>);
61
<span class="returnvalue">void</span> <a class="link" href="gtk2-Selections.html#gtk-target-list-add-image-targets" title="gtk_target_list_add_image_targets ()">gtk_target_list_add_image_targets</a> (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>,
62
<em class="parameter"><code><span class="type">guint</span> info</code></em>,
63
<em class="parameter"><code><span class="type">gboolean</span> writable</code></em>);
64
<span class="returnvalue">void</span> <a class="link" href="gtk2-Selections.html#gtk-target-list-add-uri-targets" title="gtk_target_list_add_uri_targets ()">gtk_target_list_add_uri_targets</a> (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>,
65
<em class="parameter"><code><span class="type">guint</span> info</code></em>);
66
<span class="returnvalue">void</span> <a class="link" href="gtk2-Selections.html#gtk-target-list-add-rich-text-targets" title="gtk_target_list_add_rich_text_targets ()">gtk_target_list_add_rich_text_targets</a>
67
(<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>,
68
<em class="parameter"><code><span class="type">guint</span> info</code></em>,
69
<em class="parameter"><code><span class="type">gboolean</span> deserializable</code></em>,
70
<em class="parameter"><code><a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a> *buffer</code></em>);
71
<span class="returnvalue">void</span> <a class="link" href="gtk2-Selections.html#gtk-target-list-remove" title="gtk_target_list_remove ()">gtk_target_list_remove</a> (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>,
72
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> target</code></em>);
73
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Selections.html#gtk-target-list-find" title="gtk_target_list_find ()">gtk_target_list_find</a> (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>,
74
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> target</code></em>,
75
<em class="parameter"><code><span class="type">guint</span> *info</code></em>);
76
<span class="returnvalue">void</span> <a class="link" href="gtk2-Selections.html#gtk-target-table-free" title="gtk_target_table_free ()">gtk_target_table_free</a> (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> *targets</code></em>,
77
<em class="parameter"><code><span class="type">gint</span> n_targets</code></em>);
78
<a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="returnvalue">GtkTargetEntry</span></a> * <a class="link" href="gtk2-Selections.html#gtk-target-table-new-from-list" title="gtk_target_table_new_from_list ()">gtk_target_table_new_from_list</a> (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>,
79
<em class="parameter"><code><span class="type">gint</span> *n_targets</code></em>);
80
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Selections.html#gtk-selection-owner-set" title="gtk_selection_owner_set ()">gtk_selection_owner_set</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
81
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
82
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);
83
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Selections.html#gtk-selection-owner-set-for-display" title="gtk_selection_owner_set_for_display ()">gtk_selection_owner_set_for_display</a> (<em class="parameter"><code><a href="../gdk2/GdkDisplay.html"><span class="type">GdkDisplay</span></a> *display</code></em>,
84
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
85
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
86
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);
87
<span class="returnvalue">void</span> <a class="link" href="gtk2-Selections.html#gtk-selection-add-target" title="gtk_selection_add_target ()">gtk_selection_add_target</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
88
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
89
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> target</code></em>,
90
<em class="parameter"><code><span class="type">guint</span> info</code></em>);
91
<span class="returnvalue">void</span> <a class="link" href="gtk2-Selections.html#gtk-selection-add-targets" title="gtk_selection_add_targets ()">gtk_selection_add_targets</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
92
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
93
<em class="parameter"><code>const <a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> *targets</code></em>,
94
<em class="parameter"><code><span class="type">guint</span> ntargets</code></em>);
95
<span class="returnvalue">void</span> <a class="link" href="gtk2-Selections.html#gtk-selection-clear-targets" title="gtk_selection_clear_targets ()">gtk_selection_clear_targets</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
96
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>);
97
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Selections.html#gtk-selection-convert" title="gtk_selection_convert ()">gtk_selection_convert</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
98
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
99
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> target</code></em>,
100
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);
101
<span class="returnvalue">void</span> <a class="link" href="gtk2-Selections.html#gtk-selection-data-set" title="gtk_selection_data_set ()">gtk_selection_data_set</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>,
102
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> type</code></em>,
103
<em class="parameter"><code><span class="type">gint</span> format</code></em>,
104
<em class="parameter"><code>const <span class="type">guchar</span> *data</code></em>,
105
<em class="parameter"><code><span class="type">gint</span> length</code></em>);
106
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Selections.html#gtk-selection-data-set-text" title="gtk_selection_data_set_text ()">gtk_selection_data_set_text</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>,
107
<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>,
108
<em class="parameter"><code><span class="type">gint</span> len</code></em>);
109
<span class="returnvalue">guchar</span> * <a class="link" href="gtk2-Selections.html#gtk-selection-data-get-text" title="gtk_selection_data_get_text ()">gtk_selection_data_get_text</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);
110
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Selections.html#gtk-selection-data-set-pixbuf" title="gtk_selection_data_set_pixbuf ()">gtk_selection_data_set_pixbuf</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>,
111
<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);
112
<a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gtk2-Selections.html#gtk-selection-data-get-pixbuf" title="gtk_selection_data_get_pixbuf ()">gtk_selection_data_get_pixbuf</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);
113
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Selections.html#gtk-selection-data-set-uris" title="gtk_selection_data_set_uris ()">gtk_selection_data_set_uris</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>,
114
<em class="parameter"><code><span class="type">gchar</span> **uris</code></em>);
115
<span class="returnvalue">gchar</span> ** <a class="link" href="gtk2-Selections.html#gtk-selection-data-get-uris" title="gtk_selection_data_get_uris ()">gtk_selection_data_get_uris</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);
116
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Selections.html#gtk-selection-data-get-targets" title="gtk_selection_data_get_targets ()">gtk_selection_data_get_targets</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>,
117
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> **targets</code></em>,
118
<em class="parameter"><code><span class="type">gint</span> *n_atoms</code></em>);
119
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Selections.html#gtk-selection-data-targets-include-image" title="gtk_selection_data_targets_include_image ()">gtk_selection_data_targets_include_image</a>
120
(<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>,
121
<em class="parameter"><code><span class="type">gboolean</span> writable</code></em>);
122
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Selections.html#gtk-selection-data-targets-include-text" title="gtk_selection_data_targets_include_text ()">gtk_selection_data_targets_include_text</a>
123
(<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);
124
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Selections.html#gtk-selection-data-targets-include-uri" title="gtk_selection_data_targets_include_uri ()">gtk_selection_data_targets_include_uri</a>
125
(<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);
126
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Selections.html#gtk-selection-data-targets-include-rich-text" title="gtk_selection_data_targets_include_rich_text ()">gtk_selection_data_targets_include_rich_text</a>
127
(<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>,
128
<em class="parameter"><code><a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a> *buffer</code></em>);
129
<a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="returnvalue">GdkAtom</span></a> <a class="link" href="gtk2-Selections.html#gtk-selection-data-get-selection" title="gtk_selection_data_get_selection ()">gtk_selection_data_get_selection</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);
130
const <span class="returnvalue">guchar</span> * <a class="link" href="gtk2-Selections.html#gtk-selection-data-get-data" title="gtk_selection_data_get_data ()">gtk_selection_data_get_data</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);
131
<span class="returnvalue">gint</span> <a class="link" href="gtk2-Selections.html#gtk-selection-data-get-length" title="gtk_selection_data_get_length ()">gtk_selection_data_get_length</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);
132
<a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="returnvalue">GdkAtom</span></a> <a class="link" href="gtk2-Selections.html#gtk-selection-data-get-data-type" title="gtk_selection_data_get_data_type ()">gtk_selection_data_get_data_type</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);
133
<a href="../gdk2/GdkDisplay.html"><span class="returnvalue">GdkDisplay</span></a> * <a class="link" href="gtk2-Selections.html#gtk-selection-data-get-display" title="gtk_selection_data_get_display ()">gtk_selection_data_get_display</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);
134
<span class="returnvalue">gint</span> <a class="link" href="gtk2-Selections.html#gtk-selection-data-get-format" title="gtk_selection_data_get_format ()">gtk_selection_data_get_format</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);
135
<a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="returnvalue">GdkAtom</span></a> <a class="link" href="gtk2-Selections.html#gtk-selection-data-get-target" title="gtk_selection_data_get_target ()">gtk_selection_data_get_target</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);
136
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Selections.html#gtk-targets-include-image" title="gtk_targets_include_image ()">gtk_targets_include_image</a> (<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> *targets</code></em>,
137
<em class="parameter"><code><span class="type">gint</span> n_targets</code></em>,
138
<em class="parameter"><code><span class="type">gboolean</span> writable</code></em>);
139
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Selections.html#gtk-targets-include-text" title="gtk_targets_include_text ()">gtk_targets_include_text</a> (<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> *targets</code></em>,
140
<em class="parameter"><code><span class="type">gint</span> n_targets</code></em>);
141
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Selections.html#gtk-targets-include-uri" title="gtk_targets_include_uri ()">gtk_targets_include_uri</a> (<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> *targets</code></em>,
142
<em class="parameter"><code><span class="type">gint</span> n_targets</code></em>);
143
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Selections.html#gtk-targets-include-rich-text" title="gtk_targets_include_rich_text ()">gtk_targets_include_rich_text</a> (<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> *targets</code></em>,
144
<em class="parameter"><code><span class="type">gint</span> n_targets</code></em>,
145
<em class="parameter"><code><a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a> *buffer</code></em>);
146
<span class="returnvalue">void</span> <a class="link" href="gtk2-Selections.html#gtk-selection-remove-all" title="gtk_selection_remove_all ()">gtk_selection_remove_all</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
147
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Selections.html#gtk-selection-clear" title="gtk_selection_clear ()">gtk_selection_clear</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
148
<em class="parameter"><code><a href="../gdk2/gdk2-Event-Structures.html#GdkEventSelection"><span class="type">GdkEventSelection</span></a> *event</code></em>);
149
<a class="link" href="GtkWidget.html#GtkSelectionData"><span class="returnvalue">GtkSelectionData</span></a> * <a class="link" href="gtk2-Selections.html#gtk-selection-data-copy" title="gtk_selection_data_copy ()">gtk_selection_data_copy</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *data</code></em>);
150
<span class="returnvalue">void</span> <a class="link" href="gtk2-Selections.html#gtk-selection-data-free" title="gtk_selection_data_free ()">gtk_selection_data_free</a> (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *data</code></em>);
153
<div class="refsect1">
154
<a name="gtk2-Selections.object-hierarchy"></a><h2>Object Hierarchy</h2>
155
<pre class="synopsis">
160
<div class="refsect1">
161
<a name="gtk2-Selections.description"></a><h2>Description</h2>
163
The selection mechanism provides the basis for different types
164
of communication between processes. In particular, drag and drop and
165
<a class="link" href="gtk2-Clipboards.html#GtkClipboard"><span class="type">GtkClipboard</span></a> work via selections. You will very seldom or
166
never need to use most of the functions in this section directly;
167
<a class="link" href="gtk2-Clipboards.html#GtkClipboard"><span class="type">GtkClipboard</span></a> provides a nicer interface to the same functionality.
170
Some of the datatypes defined this section are used in
171
the <a class="link" href="gtk2-Clipboards.html#GtkClipboard"><span class="type">GtkClipboard</span></a> and drag-and-drop API's as well. The
172
<a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> structure and <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> objects represent
173
lists of data types that are supported when sending or
174
receiving data. The <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object is used to
175
store a chunk of data along with the data type and other
176
associated information.
179
<div class="refsect1">
180
<a name="gtk2-Selections.details"></a><h2>Details</h2>
181
<div class="refsect2">
182
<a name="GtkTargetEntry"></a><h3>struct GtkTargetEntry</h3>
183
<pre class="programlisting">struct GtkTargetEntry {
190
A <a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> structure represents a single type of
191
data than can be supplied for by a widget for a selection
192
or for supplied or received during drag-and-drop. It
193
contains a string representing the drag type, a flags
194
field (used only for drag and drop - see <a class="link" href="gtk2-Drag-and-Drop.html#GtkTargetFlags" title="enum GtkTargetFlags"><span class="type">GtkTargetFlags</span></a>),
195
and an application assigned integer ID. The integer
196
ID will later be passed as a signal parameter for signals
197
like "selection_get". It allows the application to identify
198
the target type without extensive string compares.
202
<div class="refsect2">
203
<a name="GtkTargetList-struct"></a><h3>struct GtkTargetList</h3>
204
<pre class="programlisting">struct GtkTargetList {
210
A <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> structure is a reference counted list
211
of <a class="link" href="gtk2-Selections.html#GtkTargetPair" title="struct GtkTargetPair"><span class="type">GtkTargetPair</span></a>. It is used to represent the same
212
information as a table of <a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a>, but in
213
an efficient form. This structure should be treated as
218
<div class="refsect2">
219
<a name="GtkTargetPair"></a><h3>struct GtkTargetPair</h3>
220
<pre class="programlisting">struct GtkTargetPair {
227
Internally used structure in the drag-and-drop and
228
selection handling code.
232
<div class="refsect2">
233
<a name="gtk-target-list-new"></a><h3>gtk_target_list_new ()</h3>
234
<pre class="programlisting"><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="returnvalue">GtkTargetList</span></a> * gtk_target_list_new (<em class="parameter"><code>const <a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> *targets</code></em>,
235
<em class="parameter"><code><span class="type">guint</span> ntargets</code></em>);</pre>
237
Creates a new <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> from an array of <a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a>.
239
<div class="variablelist"><table border="0" class="variablelist">
241
<col align="left" valign="top">
246
<td><p><span class="term"><em class="parameter"><code>targets</code></em> :</span></p></td>
247
<td>Pointer to an array of <a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a>. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=ntargets]</span>
251
<td><p><span class="term"><em class="parameter"><code>ntargets</code></em> :</span></p></td>
252
<td>number of entries in <em class="parameter"><code>targets</code></em>.</td>
255
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
256
<td>the new <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
263
<div class="refsect2">
264
<a name="gtk-target-list-ref"></a><h3>gtk_target_list_ref ()</h3>
265
<pre class="programlisting"><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="returnvalue">GtkTargetList</span></a> * gtk_target_list_ref (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>);</pre>
267
Increases the reference count of a <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> by one.
269
<div class="variablelist"><table border="0" class="variablelist">
271
<col align="left" valign="top">
276
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
277
<td>a <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
281
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
282
<td>the passed in <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>.</td>
288
<div class="refsect2">
289
<a name="gtk-target-list-unref"></a><h3>gtk_target_list_unref ()</h3>
290
<pre class="programlisting"><span class="returnvalue">void</span> gtk_target_list_unref (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>);</pre>
292
Decreases the reference count of a <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> by one.
293
If the resulting reference count is zero, frees the list.
295
<div class="variablelist"><table border="0" class="variablelist">
297
<col align="left" valign="top">
301
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
302
<td>a <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
308
<div class="refsect2">
309
<a name="gtk-target-list-add"></a><h3>gtk_target_list_add ()</h3>
310
<pre class="programlisting"><span class="returnvalue">void</span> gtk_target_list_add (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>,
311
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> target</code></em>,
312
<em class="parameter"><code><span class="type">guint</span> flags</code></em>,
313
<em class="parameter"><code><span class="type">guint</span> info</code></em>);</pre>
315
Appends another target to a <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>.
317
<div class="variablelist"><table border="0" class="variablelist">
319
<col align="left" valign="top">
324
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
325
<td>a <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
329
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
330
<td>the interned atom representing the target</td>
333
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
334
<td>the flags for this target</td>
337
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
338
<td>an ID that will be passed back to the application</td>
344
<div class="refsect2">
345
<a name="gtk-target-list-add-table"></a><h3>gtk_target_list_add_table ()</h3>
346
<pre class="programlisting"><span class="returnvalue">void</span> gtk_target_list_add_table (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>,
347
<em class="parameter"><code>const <a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> *targets</code></em>,
348
<em class="parameter"><code><span class="type">guint</span> ntargets</code></em>);</pre>
350
Prepends a table of <a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> to a target list.
352
<div class="variablelist"><table border="0" class="variablelist">
354
<col align="left" valign="top">
359
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
360
<td>a <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
364
<td><p><span class="term"><em class="parameter"><code>targets</code></em> :</span></p></td>
365
<td>the table of <a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a>. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=ntargets]</span>
369
<td><p><span class="term"><em class="parameter"><code>ntargets</code></em> :</span></p></td>
370
<td>number of targets in the table</td>
376
<div class="refsect2">
377
<a name="gtk-target-list-add-text-targets"></a><h3>gtk_target_list_add_text_targets ()</h3>
378
<pre class="programlisting"><span class="returnvalue">void</span> gtk_target_list_add_text_targets (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>,
379
<em class="parameter"><code><span class="type">guint</span> info</code></em>);</pre>
381
Appends the text targets supported by <span class="type">GtkSelection</span> to
382
the target list. All targets are added with the same <em class="parameter"><code>info</code></em>.
384
<div class="variablelist"><table border="0" class="variablelist">
386
<col align="left" valign="top">
391
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
392
<td>a <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
396
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
397
<td>an ID that will be passed back to the application</td>
401
<p class="since">Since 2.6</p>
404
<div class="refsect2">
405
<a name="gtk-target-list-add-image-targets"></a><h3>gtk_target_list_add_image_targets ()</h3>
406
<pre class="programlisting"><span class="returnvalue">void</span> gtk_target_list_add_image_targets (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>,
407
<em class="parameter"><code><span class="type">guint</span> info</code></em>,
408
<em class="parameter"><code><span class="type">gboolean</span> writable</code></em>);</pre>
410
Appends the image targets supported by <span class="type">GtkSelection</span> to
411
the target list. All targets are added with the same <em class="parameter"><code>info</code></em>.
413
<div class="variablelist"><table border="0" class="variablelist">
415
<col align="left" valign="top">
420
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
421
<td>a <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
425
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
426
<td>an ID that will be passed back to the application</td>
429
<td><p><span class="term"><em class="parameter"><code>writable</code></em> :</span></p></td>
430
<td>whether to add only targets for which GTK+ knows
431
how to convert a pixbuf into the format</td>
435
<p class="since">Since 2.6</p>
438
<div class="refsect2">
439
<a name="gtk-target-list-add-uri-targets"></a><h3>gtk_target_list_add_uri_targets ()</h3>
440
<pre class="programlisting"><span class="returnvalue">void</span> gtk_target_list_add_uri_targets (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>,
441
<em class="parameter"><code><span class="type">guint</span> info</code></em>);</pre>
443
Appends the URI targets supported by <span class="type">GtkSelection</span> to
444
the target list. All targets are added with the same <em class="parameter"><code>info</code></em>.
446
<div class="variablelist"><table border="0" class="variablelist">
448
<col align="left" valign="top">
453
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
454
<td>a <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
458
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
459
<td>an ID that will be passed back to the application</td>
463
<p class="since">Since 2.6</p>
466
<div class="refsect2">
467
<a name="gtk-target-list-add-rich-text-targets"></a><h3>gtk_target_list_add_rich_text_targets ()</h3>
468
<pre class="programlisting"><span class="returnvalue">void</span> gtk_target_list_add_rich_text_targets
469
(<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>,
470
<em class="parameter"><code><span class="type">guint</span> info</code></em>,
471
<em class="parameter"><code><span class="type">gboolean</span> deserializable</code></em>,
472
<em class="parameter"><code><a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a> *buffer</code></em>);</pre>
474
Appends the rich text targets registered with
475
<a class="link" href="GtkTextBuffer.html#gtk-text-buffer-register-serialize-format" title="gtk_text_buffer_register_serialize_format ()"><code class="function">gtk_text_buffer_register_serialize_format()</code></a> or
476
<a class="link" href="GtkTextBuffer.html#gtk-text-buffer-register-deserialize-format" title="gtk_text_buffer_register_deserialize_format ()"><code class="function">gtk_text_buffer_register_deserialize_format()</code></a> to the target list. All
477
targets are added with the same <em class="parameter"><code>info</code></em>.
479
<div class="variablelist"><table border="0" class="variablelist">
481
<col align="left" valign="top">
486
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
487
<td>a <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
491
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
492
<td>an ID that will be passed back to the application</td>
495
<td><p><span class="term"><em class="parameter"><code>deserializable</code></em> :</span></p></td>
496
<td>if <code class="literal">TRUE</code>, then deserializable rich text formats
497
will be added, serializable formats otherwise.</td>
500
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
501
<td>a <a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a>.</td>
505
<p class="since">Since 2.10</p>
508
<div class="refsect2">
509
<a name="gtk-target-list-remove"></a><h3>gtk_target_list_remove ()</h3>
510
<pre class="programlisting"><span class="returnvalue">void</span> gtk_target_list_remove (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>,
511
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> target</code></em>);</pre>
513
Removes a target from a target list.
515
<div class="variablelist"><table border="0" class="variablelist">
517
<col align="left" valign="top">
522
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
523
<td>a <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
527
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
528
<td>the interned atom representing the target</td>
534
<div class="refsect2">
535
<a name="gtk-target-list-find"></a><h3>gtk_target_list_find ()</h3>
536
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_target_list_find (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>,
537
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> target</code></em>,
538
<em class="parameter"><code><span class="type">guint</span> *info</code></em>);</pre>
540
Looks up a given target in a <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>.
542
<div class="variablelist"><table border="0" class="variablelist">
544
<col align="left" valign="top">
549
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
550
<td>a <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
554
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
555
<td>an interned atom representing the target to search for</td>
558
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
559
<td>a pointer to the location to store application info for target,
560
or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>
564
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
566
<code class="literal">TRUE</code> if the target was found, otherwise <code class="literal">FALSE</code>
573
<div class="refsect2">
574
<a name="gtk-target-table-free"></a><h3>gtk_target_table_free ()</h3>
575
<pre class="programlisting"><span class="returnvalue">void</span> gtk_target_table_free (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> *targets</code></em>,
576
<em class="parameter"><code><span class="type">gint</span> n_targets</code></em>);</pre>
578
This function frees a target table as returned by
579
<a class="link" href="gtk2-Selections.html#gtk-target-table-new-from-list" title="gtk_target_table_new_from_list ()"><code class="function">gtk_target_table_new_from_list()</code></a>
581
<div class="variablelist"><table border="0" class="variablelist">
583
<col align="left" valign="top">
588
<td><p><span class="term"><em class="parameter"><code>targets</code></em> :</span></p></td>
589
<td>a <a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> array. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_targets]</span>
593
<td><p><span class="term"><em class="parameter"><code>n_targets</code></em> :</span></p></td>
594
<td>the number of entries in the array</td>
598
<p class="since">Since 2.10</p>
601
<div class="refsect2">
602
<a name="gtk-target-table-new-from-list"></a><h3>gtk_target_table_new_from_list ()</h3>
603
<pre class="programlisting"><a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="returnvalue">GtkTargetEntry</span></a> * gtk_target_table_new_from_list (<em class="parameter"><code><a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a> *list</code></em>,
604
<em class="parameter"><code><span class="type">gint</span> *n_targets</code></em>);</pre>
606
This function creates an <a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> array that contains the
607
same targets as the passed <code class="literal">list</code>. The returned table is newly
608
allocated and should be freed using <a class="link" href="gtk2-Selections.html#gtk-target-table-free" title="gtk_target_table_free ()"><code class="function">gtk_target_table_free()</code></a> when no
611
<div class="variablelist"><table border="0" class="variablelist">
613
<col align="left" valign="top">
618
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
619
<td>a <a class="link" href="gtk2-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>
623
<td><p><span class="term"><em class="parameter"><code>n_targets</code></em> :</span></p></td>
624
<td>return location for the number ot targets in the table</td>
627
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
628
<td>the new table. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_targets][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
633
<p class="since">Since 2.10</p>
636
<div class="refsect2">
637
<a name="gtk-selection-owner-set"></a><h3>gtk_selection_owner_set ()</h3>
638
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_selection_owner_set (<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
639
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
640
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);</pre>
642
Claims ownership of a given selection for a particular widget,
643
or, if <em class="parameter"><code>widget</code></em> is <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, release ownership of the selection.
645
<div class="variablelist"><table border="0" class="variablelist">
647
<col align="left" valign="top">
652
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
653
<td>a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
657
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
658
<td>an interned atom representing the selection to claim</td>
661
<td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td>
662
<td>timestamp with which to claim the selection</td>
665
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
667
<code class="literal">TRUE</code> if the operation succeeded</td>
673
<div class="refsect2">
674
<a name="gtk-selection-owner-set-for-display"></a><h3>gtk_selection_owner_set_for_display ()</h3>
675
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_selection_owner_set_for_display (<em class="parameter"><code><a href="../gdk2/GdkDisplay.html"><span class="type">GdkDisplay</span></a> *display</code></em>,
676
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
677
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
678
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);</pre>
680
Claim ownership of a given selection for a particular widget, or,
681
if <em class="parameter"><code>widget</code></em> is <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, release ownership of the selection.
683
<div class="variablelist"><table border="0" class="variablelist">
685
<col align="left" valign="top">
690
<td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td>
691
<td>the <span class="type">Gdkdisplay</span> where the selection is set</td>
694
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
695
<td>new selection owner (a <span class="type">GdkWidget</span>), or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
699
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
700
<td>an interned atom representing the selection to claim.</td>
703
<td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td>
704
<td>timestamp with which to claim the selection</td>
707
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
708
<td>TRUE if the operation succeeded</td>
712
<p class="since">Since 2.2</p>
715
<div class="refsect2">
716
<a name="gtk-selection-add-target"></a><h3>gtk_selection_add_target ()</h3>
717
<pre class="programlisting"><span class="returnvalue">void</span> gtk_selection_add_target (<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
718
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
719
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> target</code></em>,
720
<em class="parameter"><code><span class="type">guint</span> info</code></em>);</pre>
722
Appends a specified target to the list of supported targets for a
723
given widget and selection.
725
<div class="variablelist"><table border="0" class="variablelist">
727
<col align="left" valign="top">
732
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
733
<td>a <span class="type">GtkTarget</span>
737
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
738
<td>the selection</td>
741
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
742
<td>target to add.</td>
745
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
746
<td>A unsigned integer which will be passed back to the application.</td>
752
<div class="refsect2">
753
<a name="gtk-selection-add-targets"></a><h3>gtk_selection_add_targets ()</h3>
754
<pre class="programlisting"><span class="returnvalue">void</span> gtk_selection_add_targets (<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
755
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
756
<em class="parameter"><code>const <a class="link" href="gtk2-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> *targets</code></em>,
757
<em class="parameter"><code><span class="type">guint</span> ntargets</code></em>);</pre>
759
Prepends a table of targets to the list of supported targets
760
for a given widget and selection.
762
<div class="variablelist"><table border="0" class="variablelist">
764
<col align="left" valign="top">
769
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
770
<td>a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
774
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
775
<td>the selection</td>
778
<td><p><span class="term"><em class="parameter"><code>targets</code></em> :</span></p></td>
779
<td>a table of targets to add. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=ntargets]</span>
783
<td><p><span class="term"><em class="parameter"><code>ntargets</code></em> :</span></p></td>
784
<td>number of entries in <em class="parameter"><code>targets</code></em>
791
<div class="refsect2">
792
<a name="gtk-selection-clear-targets"></a><h3>gtk_selection_clear_targets ()</h3>
793
<pre class="programlisting"><span class="returnvalue">void</span> gtk_selection_clear_targets (<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
794
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>);</pre>
796
Remove all targets registered for the given selection for the
799
<div class="variablelist"><table border="0" class="variablelist">
801
<col align="left" valign="top">
806
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
807
<td>a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
811
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
812
<td>an atom representing a selection</td>
818
<div class="refsect2">
819
<a name="gtk-selection-convert"></a><h3>gtk_selection_convert ()</h3>
820
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_selection_convert (<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
821
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> selection</code></em>,
822
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> target</code></em>,
823
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);</pre>
825
Requests the contents of a selection. When received,
826
a "selection-received" signal will be generated.
828
<div class="variablelist"><table border="0" class="variablelist">
830
<col align="left" valign="top">
835
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
836
<td>The widget which acts as requestor</td>
839
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
840
<td>Which selection to get</td>
843
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
844
<td>Form of information desired (e.g., STRING)</td>
847
<td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td>
848
<td>Time of request (usually of triggering event)
849
In emergency, you could use <a href="../gdk2/gdk2-Events.html#GDK-CURRENT-TIME:CAPS"><span class="type">GDK_CURRENT_TIME</span></a>
853
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
855
<code class="literal">TRUE</code> if requested succeeded. <code class="literal">FALSE</code> if we could not process
856
request. (e.g., there was already a request in process for
863
<div class="refsect2">
864
<a name="gtk-selection-data-set"></a><h3>gtk_selection_data_set ()</h3>
865
<pre class="programlisting"><span class="returnvalue">void</span> gtk_selection_data_set (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>,
866
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> type</code></em>,
867
<em class="parameter"><code><span class="type">gint</span> format</code></em>,
868
<em class="parameter"><code>const <span class="type">guchar</span> *data</code></em>,
869
<em class="parameter"><code><span class="type">gint</span> length</code></em>);</pre>
871
Stores new data into a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object. Should
872
<span class="emphasis"><em>only</em></span> be called from a selection handler callback.
873
Zero-terminates the stored data.
875
<div class="variablelist"><table border="0" class="variablelist">
877
<col align="left" valign="top">
882
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
883
<td>a pointer to a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> structure.</td>
886
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
887
<td>the type of selection data</td>
890
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
891
<td>format (number of bits in a unit)</td>
894
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
895
<td>pointer to the data (will be copied). <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span>
899
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
900
<td>length of the data</td>
906
<div class="refsect2">
907
<a name="gtk-selection-data-set-text"></a><h3>gtk_selection_data_set_text ()</h3>
908
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_selection_data_set_text (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>,
909
<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>,
910
<em class="parameter"><code><span class="type">gint</span> len</code></em>);</pre>
912
Sets the contents of the selection from a UTF-8 encoded string.
913
The string is converted to the form determined by
914
<em class="parameter"><code>selection_data->target</code></em>.
916
<div class="variablelist"><table border="0" class="variablelist">
918
<col align="left" valign="top">
923
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
924
<td>a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a>
928
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
929
<td>a UTF-8 string</td>
932
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
933
<td>the length of <em class="parameter"><code>str</code></em>, or -1 if <em class="parameter"><code>str</code></em> is nul-terminated.</td>
936
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
938
<code class="literal">TRUE</code> if the selection was successfully set,
939
otherwise <code class="literal">FALSE</code>.</td>
945
<div class="refsect2">
946
<a name="gtk-selection-data-get-text"></a><h3>gtk_selection_data_get_text ()</h3>
947
<pre class="programlisting"><span class="returnvalue">guchar</span> * gtk_selection_data_get_text (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);</pre>
949
Gets the contents of the selection data as a UTF-8 string.
951
<div class="variablelist"><table border="0" class="variablelist">
953
<col align="left" valign="top">
958
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
959
<td>a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a>
963
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
964
<td>if the selection data contained a recognized
965
text type and it could be converted to UTF-8, a newly allocated
966
string containing the converted text, otherwise <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.
967
If the result is non-<a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> it must be freed with <code class="function">g_free()</code>.</td>
973
<div class="refsect2">
974
<a name="gtk-selection-data-set-pixbuf"></a><h3>gtk_selection_data_set_pixbuf ()</h3>
975
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_selection_data_set_pixbuf (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>,
976
<em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);</pre>
978
Sets the contents of the selection from a <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>
979
The pixbuf is converted to the form determined by
980
<em class="parameter"><code>selection_data->target</code></em>.
982
<div class="variablelist"><table border="0" class="variablelist">
984
<col align="left" valign="top">
989
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
990
<td>a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a>
994
<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
995
<td>a <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>
999
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1001
<code class="literal">TRUE</code> if the selection was successfully set,
1002
otherwise <code class="literal">FALSE</code>.</td>
1006
<p class="since">Since 2.6</p>
1009
<div class="refsect2">
1010
<a name="gtk-selection-data-get-pixbuf"></a><h3>gtk_selection_data_get_pixbuf ()</h3>
1011
<pre class="programlisting"><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gtk_selection_data_get_pixbuf (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);</pre>
1013
Gets the contents of the selection data as a <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.
1015
<div class="variablelist"><table border="0" class="variablelist">
1017
<col align="left" valign="top">
1022
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
1023
<td>a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a>
1027
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1028
<td>if the selection data contained a recognized
1029
image type and it could be converted to a <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>, a
1030
newly allocated pixbuf is returned, otherwise <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.
1031
If the result is non-<a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> it must be freed with <code class="function">g_object_unref()</code>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
1036
<p class="since">Since 2.6</p>
1039
<div class="refsect2">
1040
<a name="gtk-selection-data-set-uris"></a><h3>gtk_selection_data_set_uris ()</h3>
1041
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_selection_data_set_uris (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>,
1042
<em class="parameter"><code><span class="type">gchar</span> **uris</code></em>);</pre>
1044
Sets the contents of the selection from a list of URIs.
1045
The string is converted to the form determined by
1046
<em class="parameter"><code>selection_data->target</code></em>.
1048
<div class="variablelist"><table border="0" class="variablelist">
1050
<col align="left" valign="top">
1055
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
1056
<td>a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a>
1060
<td><p><span class="term"><em class="parameter"><code>uris</code></em> :</span></p></td>
1061
<td>a <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of
1062
strings holding URIs. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span>
1066
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1068
<code class="literal">TRUE</code> if the selection was successfully set,
1069
otherwise <code class="literal">FALSE</code>.</td>
1073
<p class="since">Since 2.6</p>
1076
<div class="refsect2">
1077
<a name="gtk-selection-data-get-uris"></a><h3>gtk_selection_data_get_uris ()</h3>
1078
<pre class="programlisting"><span class="returnvalue">gchar</span> ** gtk_selection_data_get_uris (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);</pre>
1080
Gets the contents of the selection data as array of URIs.
1082
<div class="variablelist"><table border="0" class="variablelist">
1084
<col align="left" valign="top">
1089
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
1090
<td>a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a>
1094
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1096
the selection data contains a list of
1097
URIs, a newly allocated <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated string array
1098
containing the URIs, otherwise <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. If the result is
1099
non-<a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> it must be freed with <code class="function">g_strfreev()</code>. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
1104
<p class="since">Since 2.6</p>
1107
<div class="refsect2">
1108
<a name="gtk-selection-data-get-targets"></a><h3>gtk_selection_data_get_targets ()</h3>
1109
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_selection_data_get_targets (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>,
1110
<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> **targets</code></em>,
1111
<em class="parameter"><code><span class="type">gint</span> *n_atoms</code></em>);</pre>
1113
Gets the contents of <em class="parameter"><code>selection_data</code></em> as an array of targets.
1114
This can be used to interpret the results of getting
1115
the standard TARGETS target that is always supplied for
1118
<div class="variablelist"><table border="0" class="variablelist">
1120
<col align="left" valign="top">
1125
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
1126
<td>a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object</td>
1129
<td><p><span class="term"><em class="parameter"><code>targets</code></em> :</span></p></td>
1130
<td>location to store an array of targets. The result
1131
stored here must be freed with <code class="function">g_free()</code>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_atoms][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span>
1135
<td><p><span class="term"><em class="parameter"><code>n_atoms</code></em> :</span></p></td>
1136
<td>location to store number of items in <em class="parameter"><code>targets</code></em>.</td>
1139
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1141
<code class="literal">TRUE</code> if <em class="parameter"><code>selection_data</code></em> contains a valid
1142
array of targets, otherwise <code class="literal">FALSE</code>.</td>
1148
<div class="refsect2">
1149
<a name="gtk-selection-data-targets-include-image"></a><h3>gtk_selection_data_targets_include_image ()</h3>
1150
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_selection_data_targets_include_image
1151
(<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>,
1152
<em class="parameter"><code><span class="type">gboolean</span> writable</code></em>);</pre>
1154
Given a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object holding a list of targets,
1155
determines if any of the targets in <em class="parameter"><code>targets</code></em> can be used to
1156
provide a <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.
1158
<div class="variablelist"><table border="0" class="variablelist">
1160
<col align="left" valign="top">
1165
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
1166
<td>a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object</td>
1169
<td><p><span class="term"><em class="parameter"><code>writable</code></em> :</span></p></td>
1170
<td>whether to accept only targets for which GTK+ knows
1171
how to convert a pixbuf into the format</td>
1174
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1176
<code class="literal">TRUE</code> if <em class="parameter"><code>selection_data</code></em> holds a list of targets,
1177
and a suitable target for images is included, otherwise <code class="literal">FALSE</code>.</td>
1181
<p class="since">Since 2.6</p>
1184
<div class="refsect2">
1185
<a name="gtk-selection-data-targets-include-text"></a><h3>gtk_selection_data_targets_include_text ()</h3>
1186
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_selection_data_targets_include_text
1187
(<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);</pre>
1189
Given a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object holding a list of targets,
1190
determines if any of the targets in <em class="parameter"><code>targets</code></em> can be used to
1193
<div class="variablelist"><table border="0" class="variablelist">
1195
<col align="left" valign="top">
1200
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
1201
<td>a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object</td>
1204
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1206
<code class="literal">TRUE</code> if <em class="parameter"><code>selection_data</code></em> holds a list of targets,
1207
and a suitable target for text is included, otherwise <code class="literal">FALSE</code>.</td>
1213
<div class="refsect2">
1214
<a name="gtk-selection-data-targets-include-uri"></a><h3>gtk_selection_data_targets_include_uri ()</h3>
1215
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_selection_data_targets_include_uri
1216
(<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);</pre>
1218
Given a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object holding a list of targets,
1219
determines if any of the targets in <em class="parameter"><code>targets</code></em> can be used to
1220
provide a list or URIs.
1222
<div class="variablelist"><table border="0" class="variablelist">
1224
<col align="left" valign="top">
1229
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
1230
<td>a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object</td>
1233
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1235
<code class="literal">TRUE</code> if <em class="parameter"><code>selection_data</code></em> holds a list of targets,
1236
and a suitable target for URI lists is included, otherwise <code class="literal">FALSE</code>.</td>
1240
<p class="since">Since 2.10</p>
1243
<div class="refsect2">
1244
<a name="gtk-selection-data-targets-include-rich-text"></a><h3>gtk_selection_data_targets_include_rich_text ()</h3>
1245
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_selection_data_targets_include_rich_text
1246
(<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>,
1247
<em class="parameter"><code><a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a> *buffer</code></em>);</pre>
1249
Given a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object holding a list of targets,
1250
determines if any of the targets in <em class="parameter"><code>targets</code></em> can be used to
1253
<div class="variablelist"><table border="0" class="variablelist">
1255
<col align="left" valign="top">
1260
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
1261
<td>a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object</td>
1264
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
1265
<td>a <a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a>
1269
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1271
<code class="literal">TRUE</code> if <em class="parameter"><code>selection_data</code></em> holds a list of targets,
1272
and a suitable target for rich text is included,
1273
otherwise <code class="literal">FALSE</code>.</td>
1277
<p class="since">Since 2.10</p>
1280
<div class="refsect2">
1281
<a name="gtk-selection-data-get-selection"></a><h3>gtk_selection_data_get_selection ()</h3>
1282
<pre class="programlisting"><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="returnvalue">GdkAtom</span></a> gtk_selection_data_get_selection (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);</pre>
1284
Retrieves the selection <a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> of the selection data.
1286
<div class="variablelist"><table border="0" class="variablelist">
1288
<col align="left" valign="top">
1293
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
1294
<td>a pointer to a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> structure.</td>
1297
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1298
<td>the selection <a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> of the selection data. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
1303
<p class="since">Since 2.16</p>
1306
<div class="refsect2">
1307
<a name="gtk-selection-data-get-data"></a><h3>gtk_selection_data_get_data ()</h3>
1308
<pre class="programlisting">const <span class="returnvalue">guchar</span> * gtk_selection_data_get_data (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);</pre>
1310
Retrieves the raw data of the selection.
1312
<div class="variablelist"><table border="0" class="variablelist">
1314
<col align="left" valign="top">
1319
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
1320
<td>a pointer to a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> structure.</td>
1323
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1324
<td>the raw data of the selection.</td>
1328
<p class="since">Since 2.14</p>
1331
<div class="refsect2">
1332
<a name="gtk-selection-data-get-length"></a><h3>gtk_selection_data_get_length ()</h3>
1333
<pre class="programlisting"><span class="returnvalue">gint</span> gtk_selection_data_get_length (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);</pre>
1335
Retrieves the length of the raw data of the selection.
1337
<div class="variablelist"><table border="0" class="variablelist">
1339
<col align="left" valign="top">
1344
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
1345
<td>a pointer to a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> structure.</td>
1348
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1349
<td>the length of the data of the selection.</td>
1353
<p class="since">Since 2.14</p>
1356
<div class="refsect2">
1357
<a name="gtk-selection-data-get-data-type"></a><h3>gtk_selection_data_get_data_type ()</h3>
1358
<pre class="programlisting"><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="returnvalue">GdkAtom</span></a> gtk_selection_data_get_data_type (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);</pre>
1360
Retrieves the data type of the selection.
1362
<div class="variablelist"><table border="0" class="variablelist">
1364
<col align="left" valign="top">
1369
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
1370
<td>a pointer to a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> structure.</td>
1373
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1374
<td>the data type of the selection. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
1379
<p class="since">Since 2.14</p>
1382
<div class="refsect2">
1383
<a name="gtk-selection-data-get-display"></a><h3>gtk_selection_data_get_display ()</h3>
1384
<pre class="programlisting"><a href="../gdk2/GdkDisplay.html"><span class="returnvalue">GdkDisplay</span></a> * gtk_selection_data_get_display (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);</pre>
1386
Retrieves the display of the selection.
1388
<div class="variablelist"><table border="0" class="variablelist">
1390
<col align="left" valign="top">
1395
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
1396
<td>a pointer to a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> structure.</td>
1399
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1400
<td>the display of the selection. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
1405
<p class="since">Since 2.14</p>
1408
<div class="refsect2">
1409
<a name="gtk-selection-data-get-format"></a><h3>gtk_selection_data_get_format ()</h3>
1410
<pre class="programlisting"><span class="returnvalue">gint</span> gtk_selection_data_get_format (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);</pre>
1412
Retrieves the format of the selection.
1414
<div class="variablelist"><table border="0" class="variablelist">
1416
<col align="left" valign="top">
1421
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
1422
<td>a pointer to a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> structure.</td>
1425
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1426
<td>the format of the selection.</td>
1430
<p class="since">Since 2.14</p>
1433
<div class="refsect2">
1434
<a name="gtk-selection-data-get-target"></a><h3>gtk_selection_data_get_target ()</h3>
1435
<pre class="programlisting"><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="returnvalue">GdkAtom</span></a> gtk_selection_data_get_target (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *selection_data</code></em>);</pre>
1437
Retrieves the target of the selection.
1439
<div class="variablelist"><table border="0" class="variablelist">
1441
<col align="left" valign="top">
1446
<td><p><span class="term"><em class="parameter"><code>selection_data</code></em> :</span></p></td>
1447
<td>a pointer to a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> structure.</td>
1450
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1451
<td>the target of the selection. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
1456
<p class="since">Since 2.14</p>
1459
<div class="refsect2">
1460
<a name="gtk-targets-include-image"></a><h3>gtk_targets_include_image ()</h3>
1461
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_targets_include_image (<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> *targets</code></em>,
1462
<em class="parameter"><code><span class="type">gint</span> n_targets</code></em>,
1463
<em class="parameter"><code><span class="type">gboolean</span> writable</code></em>);</pre>
1465
Determines if any of the targets in <em class="parameter"><code>targets</code></em> can be used to
1466
provide a <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.
1468
<div class="variablelist"><table border="0" class="variablelist">
1470
<col align="left" valign="top">
1475
<td><p><span class="term"><em class="parameter"><code>targets</code></em> :</span></p></td>
1476
<td>an array of <a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a>s. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_targets]</span>
1480
<td><p><span class="term"><em class="parameter"><code>n_targets</code></em> :</span></p></td>
1481
<td>the length of <em class="parameter"><code>targets</code></em>
1485
<td><p><span class="term"><em class="parameter"><code>writable</code></em> :</span></p></td>
1486
<td>whether to accept only targets for which GTK+ knows
1487
how to convert a pixbuf into the format</td>
1490
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1492
<code class="literal">TRUE</code> if <em class="parameter"><code>targets</code></em> include a suitable target for images,
1493
otherwise <code class="literal">FALSE</code>.</td>
1497
<p class="since">Since 2.10</p>
1500
<div class="refsect2">
1501
<a name="gtk-targets-include-text"></a><h3>gtk_targets_include_text ()</h3>
1502
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_targets_include_text (<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> *targets</code></em>,
1503
<em class="parameter"><code><span class="type">gint</span> n_targets</code></em>);</pre>
1505
Determines if any of the targets in <em class="parameter"><code>targets</code></em> can be used to
1508
<div class="variablelist"><table border="0" class="variablelist">
1510
<col align="left" valign="top">
1515
<td><p><span class="term"><em class="parameter"><code>targets</code></em> :</span></p></td>
1516
<td>an array of <a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a>s. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_targets]</span>
1520
<td><p><span class="term"><em class="parameter"><code>n_targets</code></em> :</span></p></td>
1521
<td>the length of <em class="parameter"><code>targets</code></em>
1525
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1527
<code class="literal">TRUE</code> if <em class="parameter"><code>targets</code></em> include a suitable target for text,
1528
otherwise <code class="literal">FALSE</code>.</td>
1532
<p class="since">Since 2.10</p>
1535
<div class="refsect2">
1536
<a name="gtk-targets-include-uri"></a><h3>gtk_targets_include_uri ()</h3>
1537
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_targets_include_uri (<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> *targets</code></em>,
1538
<em class="parameter"><code><span class="type">gint</span> n_targets</code></em>);</pre>
1540
Determines if any of the targets in <em class="parameter"><code>targets</code></em> can be used to
1541
provide an uri list.
1543
<div class="variablelist"><table border="0" class="variablelist">
1545
<col align="left" valign="top">
1550
<td><p><span class="term"><em class="parameter"><code>targets</code></em> :</span></p></td>
1551
<td>an array of <a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a>s. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_targets]</span>
1555
<td><p><span class="term"><em class="parameter"><code>n_targets</code></em> :</span></p></td>
1556
<td>the length of <em class="parameter"><code>targets</code></em>
1560
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1562
<code class="literal">TRUE</code> if <em class="parameter"><code>targets</code></em> include a suitable target for uri lists,
1563
otherwise <code class="literal">FALSE</code>.</td>
1567
<p class="since">Since 2.10</p>
1570
<div class="refsect2">
1571
<a name="gtk-targets-include-rich-text"></a><h3>gtk_targets_include_rich_text ()</h3>
1572
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_targets_include_rich_text (<em class="parameter"><code><a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> *targets</code></em>,
1573
<em class="parameter"><code><span class="type">gint</span> n_targets</code></em>,
1574
<em class="parameter"><code><a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a> *buffer</code></em>);</pre>
1576
Determines if any of the targets in <em class="parameter"><code>targets</code></em> can be used to
1579
<div class="variablelist"><table border="0" class="variablelist">
1581
<col align="left" valign="top">
1586
<td><p><span class="term"><em class="parameter"><code>targets</code></em> :</span></p></td>
1587
<td>an array of <a href="../gdk2/gdk2-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a>s. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_targets]</span>
1591
<td><p><span class="term"><em class="parameter"><code>n_targets</code></em> :</span></p></td>
1592
<td>the length of <em class="parameter"><code>targets</code></em>
1596
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
1597
<td>a <a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a>
1601
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1603
<code class="literal">TRUE</code> if <em class="parameter"><code>targets</code></em> include a suitable target for rich text,
1604
otherwise <code class="literal">FALSE</code>.</td>
1608
<p class="since">Since 2.10</p>
1611
<div class="refsect2">
1612
<a name="gtk-selection-remove-all"></a><h3>gtk_selection_remove_all ()</h3>
1613
<pre class="programlisting"><span class="returnvalue">void</span> gtk_selection_remove_all (<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
1615
Removes all handlers and unsets ownership of all
1616
selections for a widget. Called when widget is being
1617
destroyed. This function will not generally be
1618
called by applications.
1620
<div class="variablelist"><table border="0" class="variablelist">
1622
<col align="left" valign="top">
1626
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
1627
<td>a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
1633
<div class="refsect2">
1634
<a name="gtk-selection-clear"></a><h3>gtk_selection_clear ()</h3>
1635
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_selection_clear (<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
1636
<em class="parameter"><code><a href="../gdk2/gdk2-Event-Structures.html#GdkEventSelection"><span class="type">GdkEventSelection</span></a> *event</code></em>);</pre>
1637
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1638
<h3 class="title">Warning</h3>
1639
<p><code class="literal">gtk_selection_clear</code> has been deprecated since version 2.4 and should not be used in newly-written code. Instead of calling this function, chain up from
1640
your selection-clear-event handler. Calling this function
1641
from any other context is illegal.</p>
1644
The default handler for the <a class="link" href="GtkWidget.html#GtkWidget-selection-clear-event" title='The "selection-clear-event" signal'><span class="type">"selection-clear-event"</span></a>
1647
<div class="variablelist"><table border="0" class="variablelist">
1649
<col align="left" valign="top">
1654
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
1655
<td>a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
1659
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
1663
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1665
<code class="literal">TRUE</code> if the event was handled, otherwise false</td>
1669
<p class="since">Since 2.2</p>
1672
<div class="refsect2">
1673
<a name="gtk-selection-data-copy"></a><h3>gtk_selection_data_copy ()</h3>
1674
<pre class="programlisting"><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="returnvalue">GtkSelectionData</span></a> * gtk_selection_data_copy (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *data</code></em>);</pre>
1676
Makes a copy of a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> structure and its data.
1678
<div class="variablelist"><table border="0" class="variablelist">
1680
<col align="left" valign="top">
1685
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
1686
<td>a pointer to a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> structure.</td>
1689
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1690
<td>a pointer to a copy of <em class="parameter"><code>data</code></em>.</td>
1696
<div class="refsect2">
1697
<a name="gtk-selection-data-free"></a><h3>gtk_selection_data_free ()</h3>
1698
<pre class="programlisting"><span class="returnvalue">void</span> gtk_selection_data_free (<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> *data</code></em>);</pre>
1700
Frees a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> structure returned from
1701
<a class="link" href="gtk2-Selections.html#gtk-selection-data-copy" title="gtk_selection_data_copy ()"><code class="function">gtk_selection_data_copy()</code></a>.
1703
<div class="variablelist"><table border="0" class="variablelist">
1705
<col align="left" valign="top">
1709
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
1710
<td>a pointer to a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> structure.</td>
1715
<div class="refsect1">
1716
<a name="gtk2-Selections.see-also"></a><h2>See Also</h2>
1719
<div class="variablelist"><table border="0" class="variablelist">
1721
<col align="left" valign="top">
1725
<td><p><span class="term"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a></span></p></td>
1726
<td><p>Much of the operation of selections happens via
1727
signals for <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>. In particular, if you are
1728
using the functions in this section, you may need
1729
to pay attention to ::selection_get,
1730
::selection_received, and :selection_clear_event
1738
<div class="footer">
1740
Generated by GTK-Doc V1.18</div>
b'\\ No newline at end of file'