]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkselection.sgml
2.9.0
[~andy/gtk] / docs / reference / gtk / tmpl / gtkselection.sgml
1 <!-- ##### SECTION Title ##### -->
2 Selections
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Functions for handling inter-process communication via selections
6
7 <!-- ##### SECTION Long_Description ##### -->
8
9 <para>
10 The selection mechanism provides the basis for different types
11 of communication between processes. In particular, drag and drop and
12 #GtkClipboard work via selections. You will very seldom or
13 never need to use most of the functions in this section directly;
14 #GtkClipboard provides a nicer interface to the same functionality.
15 </para>
16 <para>
17 Some of the datatypes defined this section are used in
18 the #GtkClipboard and drag-and-drop API's as well. The
19 #GtkTargetEntry structure and #GtkTargetList objects represent
20 lists of data types that are supported when sending or
21 receiving data. The #GtkSelectionData object is used to
22 store a chunk of data along with the data type and other
23 associated information.
24 </para>
25
26 <!-- ##### SECTION See_Also ##### -->
27 <para>
28 <variablelist>
29
30 <varlistentry>
31 <term>#GtkWidget</term>
32 <listitem><para>Much of the operation of selections happens via
33              signals for #GtkWidget. In particular, if you are
34              using the functions in this section, you may need
35              to pay attention to ::selection_get,
36              ::selection_received,  and :selection_clear_event
37              signals.</para></listitem>
38 </varlistentry>
39
40 </variablelist>
41
42 </para>
43
44 <!-- ##### SECTION Stability_Level ##### -->
45
46
47 <!-- ##### STRUCT GtkTargetEntry ##### -->
48 <para>
49 A #GtkTargetEntry structure represents a single type of
50 data than can be supplied for by a widget for a selection
51 or for supplied or received during drag-and-drop. It 
52 contains a string representing the drag type, a flags
53 field (used only for drag and drop - see #GtkTargetFlags),
54 and an application assigned integer ID. The integer
55 ID will later be passed as a signal parameter for signals
56 like "selection_get". It allows the application to identify
57 the target type without extensive string compares.
58 </para>
59
60 @target: 
61 @flags: 
62 @info: 
63
64 <!-- ##### STRUCT GtkTargetList ##### -->
65 <para>
66 A #GtkTargetList structure is a reference counted list
67 of #GtkTargetPair. It is used to represent the same
68 information as a table of #GtkTargetEntry, but in
69 an efficient form. This structure should be treated as
70 opaque.
71 </para>
72
73 @list: 
74 @ref_count: 
75
76 <!-- ##### STRUCT GtkTargetPair ##### -->
77 <para>
78 Internally used structure in the drag-and-drop and 
79 selection handling code.
80 </para>
81
82 @target: 
83 @flags: 
84 @info: 
85
86 <!-- ##### FUNCTION gtk_target_list_new ##### -->
87 <para>
88 </para>
89
90 @targets: 
91 @ntargets: 
92 @Returns: 
93
94
95 <!-- ##### FUNCTION gtk_target_list_ref ##### -->
96 <para>
97 </para>
98
99 @list: 
100 @Returns: 
101
102
103 <!-- ##### FUNCTION gtk_target_list_unref ##### -->
104 <para>
105 </para>
106
107 @list: 
108
109
110 <!-- ##### FUNCTION gtk_target_list_add ##### -->
111 <para>
112 </para>
113
114 @list: 
115 @target: 
116 @flags: 
117 @info: 
118
119
120 <!-- ##### FUNCTION gtk_target_list_add_table ##### -->
121 <para>
122 </para>
123
124 @list: 
125 @targets: 
126 @ntargets: 
127
128
129 <!-- ##### FUNCTION gtk_target_list_add_text_targets ##### -->
130 <para>
131
132 </para>
133
134 @list: 
135 @info: 
136
137
138 <!-- ##### FUNCTION gtk_target_list_add_image_targets ##### -->
139 <para>
140
141 </para>
142
143 @list: 
144 @info: 
145 @writable: 
146
147
148 <!-- ##### FUNCTION gtk_target_list_add_uri_targets ##### -->
149 <para>
150
151 </para>
152
153 @list: 
154 @info: 
155
156
157 <!-- ##### FUNCTION gtk_target_list_add_rich_text_targets ##### -->
158 <para>
159
160 </para>
161
162 @list: 
163 @info: 
164 @deserializable: 
165 @buffer: 
166
167
168 <!-- ##### FUNCTION gtk_target_list_remove ##### -->
169 <para>
170 </para>
171
172 @list: 
173 @target: 
174
175
176 <!-- ##### FUNCTION gtk_target_list_find ##### -->
177 <para>
178 </para>
179
180 @list: 
181 @target: 
182 @info: 
183 @Returns: 
184
185
186 <!-- ##### FUNCTION gtk_target_table_free ##### -->
187 <para>
188
189 </para>
190
191 @targets: 
192 @n_targets: 
193
194
195 <!-- ##### FUNCTION gtk_target_table_new_from_list ##### -->
196 <para>
197
198 </para>
199
200 @list: 
201 @n_targets: 
202 @Returns: 
203
204
205 <!-- ##### FUNCTION gtk_selection_owner_set ##### -->
206 <para>
207 </para>
208
209 @widget: 
210 @selection: 
211 @time_: 
212 @Returns: 
213
214
215 <!-- ##### FUNCTION gtk_selection_owner_set_for_display ##### -->
216 <para>
217
218 </para>
219
220 @display: 
221 @widget: 
222 @selection: 
223 @time_: 
224 @Returns: 
225
226
227 <!-- ##### FUNCTION gtk_selection_add_target ##### -->
228 <para>
229 </para>
230
231 @widget: 
232 @selection: 
233 @target: 
234 @info: 
235
236
237 <!-- ##### FUNCTION gtk_selection_add_targets ##### -->
238 <para>
239 </para>
240
241 @widget: 
242 @selection: 
243 @targets: 
244 @ntargets: 
245
246
247 <!-- ##### FUNCTION gtk_selection_clear_targets ##### -->
248 <para>
249
250 </para>
251
252 @widget: 
253 @selection: 
254
255
256 <!-- ##### FUNCTION gtk_selection_convert ##### -->
257 <para>
258 </para>
259
260 @widget: 
261 @selection: 
262 @target: 
263 @time_: 
264 @Returns: x
265
266
267 <!-- ##### FUNCTION gtk_selection_data_set ##### -->
268 <para>
269 </para>
270
271 @selection_data: 
272 @type: 
273 @format: 
274 @data: 
275 @length: 
276
277
278 <!-- ##### FUNCTION gtk_selection_data_set_text ##### -->
279 <para>
280
281 </para>
282
283 @selection_data: 
284 @str: 
285 @len: 
286 @Returns: 
287
288
289 <!-- ##### FUNCTION gtk_selection_data_get_text ##### -->
290 <para>
291
292 </para>
293
294 @selection_data: 
295 @Returns: 
296
297
298 <!-- ##### FUNCTION gtk_selection_data_set_pixbuf ##### -->
299 <para>
300
301 </para>
302
303 @selection_data: 
304 @pixbuf: 
305 @Returns: 
306
307
308 <!-- ##### FUNCTION gtk_selection_data_get_pixbuf ##### -->
309 <para>
310
311 </para>
312
313 @selection_data: 
314 @Returns: 
315
316
317 <!-- ##### FUNCTION gtk_selection_data_set_uris ##### -->
318 <para>
319
320 </para>
321
322 @selection_data: 
323 @uris: 
324 @Returns: 
325
326
327 <!-- ##### FUNCTION gtk_selection_data_get_uris ##### -->
328 <para>
329
330 </para>
331
332 @selection_data: 
333 @Returns: 
334
335
336 <!-- ##### FUNCTION gtk_selection_data_get_targets ##### -->
337 <para>
338
339 </para>
340
341 @selection_data: 
342 @targets: 
343 @n_atoms: 
344 @Returns: 
345
346
347 <!-- ##### FUNCTION gtk_selection_data_targets_include_image ##### -->
348 <para>
349
350 </para>
351
352 @selection_data: 
353 @writable: 
354 @Returns: 
355
356
357 <!-- ##### FUNCTION gtk_selection_data_targets_include_text ##### -->
358 <para>
359
360 </para>
361
362 @selection_data: 
363 @Returns: 
364
365
366 <!-- ##### FUNCTION gtk_selection_data_targets_include_uri ##### -->
367 <para>
368
369 </para>
370
371 @selection_data: 
372 @Returns: 
373
374
375 <!-- ##### FUNCTION gtk_selection_data_targets_include_rich_text ##### -->
376 <para>
377
378 </para>
379
380 @selection_data: 
381 @buffer: 
382 @Returns: 
383
384
385 <!-- ##### FUNCTION gtk_targets_include_image ##### -->
386 <para>
387
388 </para>
389
390 @targets: 
391 @n_targets: 
392 @writable: 
393 @Returns: 
394
395
396 <!-- ##### FUNCTION gtk_targets_include_text ##### -->
397 <para>
398
399 </para>
400
401 @targets: 
402 @n_targets: 
403 @Returns: 
404
405
406 <!-- ##### FUNCTION gtk_targets_include_uri ##### -->
407 <para>
408
409 </para>
410
411 @targets: 
412 @n_targets: 
413 @Returns: 
414
415
416 <!-- ##### FUNCTION gtk_targets_include_rich_text ##### -->
417 <para>
418
419 </para>
420
421 @targets: 
422 @n_targets: 
423 @buffer: 
424 @Returns: 
425
426
427 <!-- ##### FUNCTION gtk_selection_remove_all ##### -->
428 <para>
429 </para>
430
431 @widget: 
432
433
434 <!-- ##### FUNCTION gtk_selection_clear ##### -->
435 <para>
436 </para>
437
438 @widget: 
439 @event: 
440 @Returns: 
441
442
443 <!-- ##### FUNCTION gtk_selection_data_copy ##### -->
444 <para>
445 </para>
446
447 @data: 
448 @Returns: 
449
450
451 <!-- ##### FUNCTION gtk_selection_data_free ##### -->
452 <para>
453 </para>
454
455 @data: 
456
457