PageRenderTime 30ms CodeModel.GetById 15ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 1ms

/src/wrappers/gtk/library/gtk_clipboard.e

http://github.com/tybor/Liberty
Specman e | 652 lines | 55 code | 147 blank | 450 comment | 3 complexity | f38dfa7c5f662e62e102f2a3b63e9b01 MD5 | raw file
  1indexing
  2	description: "Clipboards - Storing data on clipboards."
  3	copyright: "[
  4					Copyright (C) 2006 Paolo Redaelli, GTK+ team
  5					
  6					This library is free software; you can redistribute it and/or
  7					modify it under the terms of the GNU Lesser General Public License
  8					as published by the Free Software Foundation; either version 2.1 of
  9					the License, or (at your option) any later version.
 10					
 11					This library is distributed in the hopeOA that it will be useful, but
 12					WITHOUT ANY WARRANTY; without even the implied warranty of
 13					MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 14					Lesser General Public License for more details.
 15
 16					You should have received a copy of the GNU Lesser General Public
 17					License along with this library; if not, write to the Free Software
 18					Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 19					02110-1301 USA
 20			]"
 21
 22class GTK_CLIPBOARD
 23	-- The GtkClipboard object represents a clipboard of data shared
 24	-- between different processes or between different widgets in the
 25	-- same process. Each clipboard is identified by a name encoded as
 26	-- a GdkAtom. (Conversion to and from strings can be done with
 27	-- gdk_atom_intern() and gdk_atom_name().) The default clipboard
 28	-- corresponds to the "CLIPBOARD" atom; another commonly used
 29	-- clipboard is the "PRIMARY" clipboard, which, in X, traditionally
 30	-- contains the currently selected text.
 31
 32	-- To support having a number of different formats on the clipboard
 33	-- at the same time, the clipboard mechanism allows providing
 34	-- callbacks instead of the actual data. When you set the contents
 35	-- of the clipboard, you can either supply the data directly (via
 36	-- functions like gtk_clipboard_set_text()), or you can supply a
 37	-- callback to be called at a later time when the data is needed
 38	-- (via gtk_clipboard_set_with_data() or
 39	-- gtk_clipboard_set_with_owner().) Providing a callback also
 40	-- avoids having to make copies of the data when it is not needed.
 41
 42	-- gtk_clipboard_set_with_data() and gtk_clipboard_set_with_owner()
 43	-- are quite similar; the choice between the two depends mostly on
 44	-- which is more convenient in a particular situation. The former
 45	-- is most useful when you want to have a blob of data with
 46	-- callbacks to convert it into the various data types that you
 47	-- advertise. When the clear_func you provided is called, you
 48	-- simply free the data blob. The latter is more useful when the
 49	-- contents of clipboard reflect the internal state of a GObject
 50	-- (As an example, for the PRIMARY clipboard, when an entry widget
 51	-- provides the clipboard's contents the contents are simply the
 52	-- text within the selected region.) If the contents change, the
 53	-- entry widget can call gtk_clipboard_set_with_owner() to update
 54	-- the timestamp for clipboard ownership, without having to worry
 55	-- about clear_func being called.
 56	
 57	-- Requesting the data from the clipboard is essentially
 58	-- asynchronous. If the contents of the clipboard are provided
 59	-- within the same process, then a direct function call will be
 60	-- made to retrieve the data, but if they are provided by another
 61	-- process, then the data needs to be retrieved from the other
 62	-- process, which may take some time. To avoid blocking the user
 63	-- interface, the call to request the selection,
 64	-- gtk_clipboard_request_contents() takes a callback that will be
 65	-- called when the contents are received (or when the request
 66	-- fails.) If you don't want to deal with providing a separate
 67	-- callback, you can also use
 68	-- gtk_clipboard_wait_for_contents(). What this does is run the
 69	-- GLib main loop recursively waiting for the contents. This can
 70	-- simplify the code flow, but you still have to be aware that
 71	-- other callbacks in your program can be called while this
 72	-- recursive mainloop is running.
 73
 74	-- Along with the functions to get the clipboard contents as an
 75	-- arbitrary data chunk, there are also functions to retrieve it as
 76	-- text, gtk_clipboard_request_text() and
 77	-- gtk_clipboard_wait_for_text(). These functions take care of
 78	-- determining which formats are advertised by the clipboard
 79	-- provider, asking for the clipboard in the best available format
 80	-- and converting the results into the UTF-8 encoding. (The
 81	-- standard form for representing strings in GTK+.)
 82	
 83	-- GtkClipboard provides a high-level wrapper around the lower
 84	-- level routines that deal with X selections. It is also possibly
 85	-- to directly manipulate the X selections, though it is seldom
 86	-- necessary to do so.
 87	
 88inherit G_OBJECT 
 89
 90creation
 91	make, from_external_pointer
 92
 93feature {} -- Creation
 94
 95-- Details
 96-- GtkClipboard
 97
 98-- typedef struct _GtkClipboard GtkClipboard;
 99
100-- GtkClipboardReceivedFunc ()
101
102-- void        (*GtkClipboardReceivedFunc)     (GtkClipboard *clipboard,
103--                                              GtkSelectionData *selection_data,
104--                                              gpointer data);
105
106-- A function to be called when the results of gtk_clipboard_request_contents() are received, or when the request fails.
107-- clipboard : 	the GtkClipboard
108-- selection_data : 	a GtkSelectionData containing the data was received. If retrieving the data failed, then then length field of selection_data will be negative.
109-- data : 	the user_data supplied to gtk_clipboard_request_contents().
110-- GtkClipboardTextReceivedFunc ()
111
112-- void        (*GtkClipboardTextReceivedFunc) (GtkClipboard *clipboard,
113--                                              const gchar *text,
114--                                              gpointer data);
115
116-- A function to be called when the results of gtk_clipboard_request_text() are received, or when the request fails.
117-- clipboard : 	the GtkClipboard
118-- text : 	the text received, as a UTF-8 encoded string, or NULL if retrieving the data failed.
119-- data : 	the user_data supplied to gtk_clipboard_request_text().
120-- GtkClipboardImageReceivedFunc ()
121
122-- void        (*GtkClipboardImageReceivedFunc)
123--                                             (GtkClipboard *clipboard,
124--                                              GdkPixbuf *pixbuf,
125--                                              gpointer data);
126
127-- A function to be called when the results of gtk_clipboard_request_image() are received, or when the request fails.
128-- clipboard : 	the GtkClipboard
129-- pixbuf : 	the received image
130-- data : 	the user_data supplied to gtk_clipboard_request_image().
131
132-- Since 2.6
133-- GtkClipboardTargetsReceivedFunc ()
134
135-- void        (*GtkClipboardTargetsReceivedFunc)
136--                                             (GtkClipboard *clipboard,
137--                                              GdkAtom *atoms,
138--                                              gint n_atoms,
139--                                              gpointer data);
140
141-- A function to be called when the results of gtk_clipboard_request_targets() are received, or when the request fails.
142-- clipboard : 	the GtkClipboard
143-- atoms : 	the supported targets, as array of GdkAtom, or NULL if retrieving the data failed.
144-- n_atoms : 	the length of the atoms array.
145-- data : 	the user_data supplied to gtk_clipboard_request_targets().
146
147-- Since 2.4
148-- GtkClipboardRichTextReceivedFunc ()
149
150-- void        (*GtkClipboardRichTextReceivedFunc)
151--                                             (GtkClipboard *clipboard,
152--                                              GdkAtom format,
153--                                              const guint8 *text,
154--                                              gsize length,
155--                                              gpointer data);
156
157-- clipboard : 	
158-- format : 	
159-- text : 	
160-- length : 	
161-- data : 	
162-- GtkClipboardGetFunc ()
163
164-- void        (*GtkClipboardGetFunc)          (GtkClipboard *clipboard,
165--                                              GtkSelectionData *selection_data,
166--                                              guint info,
167--                                              gpointer user_data_or_owner);
168
169-- A function that will be called to provide the contents of the selection. If multiple types of data were advertised, the requested type can be determined from the info parameter or by checking the target field of selection_data. If the data could successfully be converted into then it should be stored into the selection_data object by calling gtk_selection_data_set() (or related functions such as gtk_selection_data_set_text()). If no data is set, the requestor will be informed that the attempt to get the data failed.
170-- clipboard : 	the GtkClipboard
171-- selection_data : 	a GtkSelectionData argument in which the requested data should be stored.
172-- info : 	the info field corresponding to the requested target from the GtkTargetEntry array passed to gtk_clipboard_set_with_data() or gtk_clipboard_set_with_owner().
173-- user_data_or_owner : 	the user_data argument passed to gtk_clipboard_set_with_data(), or the owner argument passed to gtk_clipboard_set_with_owner()
174-- GtkClipboardClearFunc ()
175
176-- void        (*GtkClipboardClearFunc)        (GtkClipboard *clipboard,
177--                                              gpointer user_data_or_owner);
178
179-- A function that will be called when the contents of the clipboard are changed or cleared. Once this has called, the user_data_or_owner argument will not be used again.
180-- clipboard : 	the GtkClipboard
181-- user_data_or_owner : 	the user_data argument passed to gtk_clipboard_set_with_data(), or the owner argument passed to gtk_clipboard_set_with_owner()
182-- gtk_clipboard_get ()
183
184
185	make (selection: GDK_ATOM) is
186			-- Returns the clipboard object for the given selection. See
187			-- `make_for_display' for complete details.
188		do
189-- TODO			from_external_pointer (gtk_clipboard_get (selection.handle))
190		end
191
192-- selection : 	a GdkAtom which identifies the clipboard to use.
193-- Returns : 	the appropriate clipboard object. If no clipboard already exists, a new one will be created. Once a clipboard object has been created, it is persistent and, since it is owned by GTK+, must not be freed or unrefd.
194-- gtk_clipboard_get_for_display ()
195
196-- GtkClipboard* gtk_clipboard_get_for_display (GdkDisplay *display,
197--                                              GdkAtom selection);
198
199-- Returns the clipboard object for the given selection. Cut/copy/paste menu items and keyboard shortcuts should use the default clipboard, returned by passing GDK_SELECTION_CLIPBOARD for selection. (GDK_NONE is supported as a synonym for GDK_SELECTION_CLIPBOARD for backwards compatibility reasons.) The currently-selected object or text should be provided on the clipboard identified by GDK_SELECTION_PRIMARY. Cut/copy/paste menu items conceptually copy the contents of the GDK_SELECTION_PRIMARY clipboard to the default clipboard, i.e. they copy the selection to what the user sees as the clipboard.
200
201-- (Passing GDK_NONE is the same as using gdk_atom_intern ("CLIPBOARD", FALSE). See http://www.freedesktop.org/Standards/clipboards-spec for a detailed discussion of the "CLIPBOARD" vs. "PRIMARY" selections under the X window system. On Win32 the GDK_SELECTION_PRIMARY clipboard is essentially ignored.)
202
203-- It's possible to have arbitrary named clipboards; if you do invent new clipboards, you should prefix the selection name with an underscore (because the ICCCM requires that nonstandard atoms are underscore-prefixed), and namespace it as well. For example, if your application called "Foo" has a special-purpose clipboard, you might call it "_FOO_SPECIAL_CLIPBOARD".
204
205-- display : 	the display for which the clipboard is to be retrieved or created
206-- selection : 	a GdkAtom which identifies the clipboard to use.
207-- Returns : 	the appropriate clipboard object. If no clipboard already exists, a new one will be created. Once a clipboard object has been created, it is persistent and, since it is owned by GTK+, must not be freed or unrefd.
208
209-- Since 2.2
210-- gtk_clipboard_get_display ()
211
212-- GdkDisplay* gtk_clipboard_get_display       (GtkClipboard *clipboard);
213
214-- Gets the GdkDisplay associated with clipboard
215
216-- clipboard : 	a GtkClipboard
217-- Returns : 	the GdkDisplay associated with clipboard
218
219-- Since 2.2
220-- gtk_clipboard_set_with_data ()
221
222-- gboolean    gtk_clipboard_set_with_data     (GtkClipboard *clipboard,
223--                                              const GtkTargetEntry *targets,
224--                                              guint n_targets,
225--                                              GtkClipboardGetFunc get_func,
226--                                              GtkClipboardClearFunc clear_func,
227--                                              gpointer user_data);
228
229-- Virtually sets the contents of the specified clipboard by providing a list of supported formats for the clipboard data and a function to call to get the actual data when it is requested.
230
231-- clipboard : 	a GtkClipboard
232-- targets : 	array containing information about the available forms for the clipboard data
233-- n_targets : 	number of elements in targets
234-- get_func : 	function to call to get the actual clipboard data
235-- clear_func : 	when the clipboard contents are set again, this function will be called, and get_func will not be subsequently called.
236-- user_data : 	user data to pass to get_func and clear_func.
237-- Returns : 	TRUE if setting the clipboard data succeeded. If setting the clipboard data failed the provided callback functions will be ignored.
238-- gtk_clipboard_set_with_owner ()
239
240-- gboolean    gtk_clipboard_set_with_owner    (GtkClipboard *clipboard,
241--                                              const GtkTargetEntry *targets,
242--                                              guint n_targets,
243--                                              GtkClipboardGetFunc get_func,
244--                                              GtkClipboardClearFunc clear_func,
245--                                              GObject *owner);
246
247-- Virtually sets the contents of the specified clipboard by providing a list of supported formats for the clipboard data and a function to call to get the actual data when it is requested.
248
249-- The difference between this function and gtk_clipboard_set_with_data() is that instead of an generic user_data pointer, a GObject is passed in.
250
251-- clipboard : 	a GtkClipboard
252-- targets : 	array containing information about the available forms for the clipboard data
253-- n_targets : 	number of elements in targets
254-- get_func : 	function to call to get the actual clipboard data
255-- clear_func : 	when the clipboard contents are set again, this function will be called, and get_func will not be subsequently called.
256-- owner : 	an object that "owns" the data. This object will be passed to the callbacks when called.
257-- Returns : 	TRUE if setting the clipboard data succeeded. If setting the clipboard data failed the provided callback functions will be ignored.
258-- gtk_clipboard_get_owner ()
259
260-- GObject*    gtk_clipboard_get_owner         (GtkClipboard *clipboard);
261
262-- If the clipboard contents callbacks were set with gtk_clipboard_set_with_owner(), and the gtk_clipboard_set_with_data() or gtk_clipboard_clear() has not subsequently called, returns the owner set by gtk_clipboard_set_with_owner().
263
264-- clipboard : 	a GtkClipboard
265-- Returns : 	the owner of the clipboard, if any; otherwise NULL.
266-- gtk_clipboard_clear ()
267
268-- void        gtk_clipboard_clear             (GtkClipboard *clipboard);
269
270-- Clears the contents of the clipboard. Generally this should only be called between the time you call gtk_clipboard_set_with_owner() or gtk_clipboard_set_with_data(), and when the clear_func you supplied is called. Otherwise, the clipboard may be owned by someone else.
271
272-- clipboard : 	a GtkClipboard
273-- gtk_clipboard_set_text ()
274
275feature
276
277	set_text (text: STRING) is
278			-- Sets the contents of the clipboard to the given UTF-8 string. GTK+ will
279			-- make a copy of the text and take responsibility for responding for
280			-- requests for the text, and for converting the text into the requested
281			-- format.
282		do
283			gtk_clipboard_set_text (handle, text.to_external, text.count)
284		end
285
286-- gtk_clipboard_set_image ()
287
288-- void        gtk_clipboard_set_image         (GtkClipboard *clipboard,
289--                                              GdkPixbuf *pixbuf);
290
291-- Sets the contents of the clipboard to the given GdkPixbuf. GTK+ will take responsibility for responding for requests for the image, and for converting the image into the requested format.
292
293-- clipboard : 	a GtkClipboard object
294-- pixbuf : 	a GdkPixbuf
295
296-- Since 2.6
297-- gtk_clipboard_request_contents ()
298
299-- void        gtk_clipboard_request_contents  (GtkClipboard *clipboard,
300--                                              GdkAtom target,
301--                                              GtkClipboardReceivedFunc callback,
302--                                              gpointer user_data);
303
304-- Requests the contents of clipboard as the given target. When the results of the result are later received the supplied callback will be called.
305
306-- clipboard : 	a GtkClipboard
307-- target : 	an atom representing the form into which the clipboard owner should convert the selection.
308-- callback : 	A function to call when the results are received (or the retrieval fails). If the retrieval fails the length field of selection_data will be negative.
309-- user_data : 	user data to pass to callback
310-- gtk_clipboard_request_text ()
311
312-- void        gtk_clipboard_request_text      (GtkClipboard *clipboard,
313--                                              GtkClipboardTextReceivedFunc callback,
314--                                              gpointer user_data);
315
316-- Requests the contents of the clipboard as text. When the text is later received, it will be converted to UTF-8 if necessary, and callback will be called.
317
318-- The text parameter to callback will contain the resulting text if the request succeeded, or NULL if it failed. This could happen for various reasons, in particular if the clipboard was empty or if the contents of the clipboard could not be converted into text form.
319
320-- clipboard : 	a GtkClipboard
321-- callback : 	a function to call when the text is received, or the retrieval fails. (It will always be called one way or the other.)
322-- user_data : 	user data to pass to callback.
323-- gtk_clipboard_request_image ()
324
325-- void        gtk_clipboard_request_image     (GtkClipboard *clipboard,
326--                                              GtkClipboardImageReceivedFunc callback,
327--                                              gpointer user_data);
328
329-- Requests the contents of the clipboard as image. When the image is later received, it will be converted to a GdkPixbuf, and callback will be called.
330
331-- The pixbuf parameter to callback will contain the resulting GdkPixbuf if the request succeeded, or NULL if it failed. This could happen for various reasons, in particular if the clipboard was empty or if the contents of the clipboard could not be converted into an image.
332
333-- clipboard : 	a GtkClipboard
334-- callback : 	a function to call when the image is received, or the retrieval fails. (It will always be called one way or the other.)
335-- user_data : 	user data to pass to callback.
336
337-- Since 2.6
338-- gtk_clipboard_request_targets ()
339
340-- void        gtk_clipboard_request_targets   (GtkClipboard *clipboard,
341--                                              GtkClipboardTargetsReceivedFunc callback,
342--                                              gpointer user_data);
343
344-- Requests the contents of the clipboard as list of supported targets. When the list is later received, callback will be called.
345
346-- The targets parameter to callback will contain the resulting targets if the request succeeded, or NULL if it failed.
347
348-- clipboard : 	a GtkClipboard
349-- callback : 	a function to call when the targets are received, or the retrieval fails. (It will always be called one way or the other.)
350-- user_data : 	user data to pass to callback.
351
352-- Since 2.4
353-- gtk_clipboard_request_rich_text ()
354
355-- void        gtk_clipboard_request_rich_text (GtkClipboard *clipboard,
356--                                              GtkTextBuffer *buffer,
357--                                              GtkClipboardRichTextReceivedFunc callback,
358--                                              gpointer user_data);
359
360-- Requests the contents of the clipboard as rich text. When the rich text is later received, callback will be called.
361
362-- The text parameter to callback will contain the resulting rich text if the request succeeded, or NULL if it failed. The length parameter will contain text's length. This function can fail for various reasons, in particular if the clipboard was empty or if the contents of the clipboard could not be converted into rich text form.
363
364-- clipboard : 	a GtkClipboard
365-- buffer : 	a GtkTextBuffer
366-- callback : 	a function to call when the text is received, or the retrieval fails. (It will always be called one way or the other.)
367-- user_data : 	user data to pass to callback.
368
369-- Since 2.10
370-- gtk_clipboard_wait_for_contents ()
371
372-- GtkSelectionData* gtk_clipboard_wait_for_contents
373--                                             (GtkClipboard *clipboard,
374--                                              GdkAtom target);
375
376-- Requests the contents of the clipboard using the given target. This function waits for the data to be received using the main loop, so events, timeouts, etc, may be dispatched during the wait.
377
378-- clipboard : 	a GtkClipboard
379-- target : 	an atom representing the form into which the clipboard owner should convert the selection.
380-- Returns : 	a newly-allocated GtkSelectionData object or NULL if retrieving the given target failed. If non-NULL, this value must be freed with gtk_selection_data_free() when you are finished with it.
381-- gtk_clipboard_wait_for_text ()
382
383
384	wait_for_text: STRING is
385			-- Requests the contents of the clipboard as text and converts the result
386			-- to UTF-8 if necessary. This function waits for the data to be received
387			-- using the main loop, so events, timeouts, etc, may be dispatched during
388			-- the wait.
389		local
390			r: POINTER
391		do
392			r := gtk_clipboard_wait_for_text (handle)
393			if not r.is_null then
394				create Result.from_external (r)
395			end
396		end
397
398-- GdkPixbuf*  gtk_clipboard_wait_for_image    (GtkClipboard *clipboard);
399
400-- Requests the contents of the clipboard as image and converts the result to a GdkPixbuf. This function waits for the data to be received using the main loop, so events, timeouts, etc, may be dispatched during the wait.
401
402-- clipboard : 	a GtkClipboard
403-- Returns : 	a newly-allocated GdkPixbuf object which must be disposed with g_object_unref(), or NULL if retrieving the selection data failed. (This could happen for various reasons, in particular if the clipboard was empty or if the contents of the clipboard could not be converted into an image.)
404
405-- Since 2.6
406-- gtk_clipboard_wait_for_rich_text ()
407
408-- guint8*     gtk_clipboard_wait_for_rich_text
409--                                             (GtkClipboard *clipboard,
410--                                              GtkTextBuffer *buffer,
411--                                              GdkAtom *format,
412--                                              gsize *length);
413
414-- Requests the contents of the clipboard as rich text. This function waits for the data to be received using the main loop, so events, timeouts, etc, may be dispatched during the wait.
415
416-- clipboard : 	a GtkClipboard
417-- buffer : 	a GtkTextBuffer
418-- format : 	return location for the format of the returned data
419-- length : 	return location for the length of the returned data
420-- Returns : 	a newly-allocated binary block of data which must be freed with g_free(), or NULL if retrieving the selection data failed. (This could happen for various reasons, in particular if the clipboard was empty or if the contents of the clipboard could not be converted into text form.)
421
422-- Since 2.10
423-- gtk_clipboard_wait_is_text_available ()
424
425-- gboolean    gtk_clipboard_wait_is_text_available
426--                                             (GtkClipboard *clipboard);
427
428-- Test to see if there is text available to be pasted This is done by requesting the TARGETS atom and checking if it contains any of the supported text targets. This function waits for the data to be received using the main loop, so events, timeouts, etc, may be dispatched during the wait.
429
430-- This function is a little faster than calling gtk_clipboard_wait_for_text() since it doesn't need to retrieve the actual text.
431
432-- clipboard : 	a GtkClipboard
433-- Returns : 	TRUE is there is text available, FALSE otherwise.
434-- gtk_clipboard_wait_is_image_available ()
435
436-- gboolean    gtk_clipboard_wait_is_image_available
437--                                             (GtkClipboard *clipboard);
438
439-- Test to see if there is an image available to be pasted This is done by requesting the TARGETS atom and checking if it contains any of the supported image targets. This function waits for the data to be received using the main loop, so events, timeouts, etc, may be dispatched during the wait.
440
441-- This function is a little faster than calling gtk_clipboard_wait_for_image() since it doesn't need to retrieve the actual image data.
442
443-- clipboard : 	a GtkClipboard
444-- Returns : 	TRUE is there is an image available, FALSE otherwise.
445
446-- Since 2.6
447-- gtk_clipboard_wait_is_rich_text_available ()
448
449-- gboolean    gtk_clipboard_wait_is_rich_text_available
450--                                             (GtkClipboard *clipboard,
451--                                              GtkTextBuffer *buffer);
452
453-- Test to see if there is rich text available to be pasted This is done by requesting the TARGETS atom and checking if it contains any of the supported rich text targets. This function waits for the data to be received using the main loop, so events, timeouts, etc, may be dispatched during the wait.
454
455-- This function is a little faster than calling gtk_clipboard_wait_for_rich_text() since it doesn't need to retrieve the actual text.
456
457-- clipboard : 	a GtkClipboard
458-- buffer : 	a GtkTextBuffer
459-- Returns : 	TRUE is there is rich text available, FALSE otherwise.
460
461-- Since 2.10
462-- gtk_clipboard_wait_for_targets ()
463
464-- gboolean    gtk_clipboard_wait_for_targets  (GtkClipboard *clipboard,
465--                                              GdkAtom **targets,
466--                                              gint *n_targets);
467
468-- Returns a list of targets that are present on the clipboard, or NULL if there aren't any targets available. The returned list must be freed with g_free(). This function waits for the data to be received using the main loop, so events, timeouts, etc, may be dispatched during the wait.
469
470-- clipboard : 	a GtkClipboard
471-- targets : 	location to store an array of targets. The result stored here must be freed with g_free().
472-- n_targets : 	location to store number of items in targets.
473-- Returns : 	TRUE if any targets are present on the clipboard, otherwise FALSE.
474
475-- Since 2.4
476-- gtk_clipboard_wait_is_target_available ()
477
478-- gboolean    gtk_clipboard_wait_is_target_available
479--                                             (GtkClipboard *clipboard,
480--                                              GdkAtom target);
481
482-- Checks if a clipboard supports pasting data of a given type. This function can be used to determine if a "Paste" menu item should be insensitive or not.
483
484-- If you want to see if there's text available on the clipboard, use gtk_clipboard_wait_is_text_available() instead.
485
486-- clipboard : 	a GtkClipboard
487-- target : 	A GdkAtom indicating which target to look for.
488-- Returns : 	TRUE if the target is available, FALSE otherwise.
489
490-- Since 2.6
491-- gtk_clipboard_set_can_store ()
492
493-- void        gtk_clipboard_set_can_store     (GtkClipboard *clipboard,
494--                                              const GtkTargetEntry *targets,
495--                                              gint n_targets);
496
497-- Hints that the clipboard data should be stored somewhere when the application exits or when gtk_clipboard_store() is called.
498
499-- This value is reset when the clipboard owner changes. Where the clipboard data is stored is platform dependent, see gdk_display_store_clipboard() for more information.
500
501-- clipboard : 	a GtkClipboard
502-- targets : 	array containing information about which forms should be stored or NULL to indicate that all forms should be stored.
503-- n_targets : 	number of elements in targets
504
505-- Since 2.6
506-- gtk_clipboard_store ()
507
508-- void        gtk_clipboard_store             (GtkClipboard *clipboard);
509
510-- Stores the current clipboard data somewhere so that it will stay around after the application has quit.
511
512-- clipboard : 	a GtkClipboard
513
514-- Since 2.6
515-- Signals
516
517-- "owner-change"
518--             void        user_function      (GtkClipboard *clipboard,
519--                                             GdkEvent     *event,
520--                                             gpointer      user_data)      : Run first
521
522
523-- Signal Details
524-- The "owner-change" signal
525
526-- void        user_function                  (GtkClipboard *clipboard,
527--                                             GdkEvent     *event,
528--                                             gpointer      user_data)      : Run first
529
530-- clipboard : 	the object which received the signal.
531-- event : 	
532-- user_data : 	user data set when the signal handler was connected.
533feature {} -- External calls
534-- Synopsis
535
536-- #include <gtk/gtk.h>
537
538
539--             GtkClipboard;
540-- void        (*GtkClipboardReceivedFunc)     (GtkClipboard *clipboard,
541--                                              GtkSelectionData *selection_data,
542--                                              gpointer data);
543-- void        (*GtkClipboardTextReceivedFunc) (GtkClipboard *clipboard,
544--                                              const gchar *text,
545--                                              gpointer data);
546-- void        (*GtkClipboardImageReceivedFunc)
547--                                             (GtkClipboard *clipboard,
548--                                              GdkPixbuf *pixbuf,
549--                                              gpointer data);
550-- void        (*GtkClipboardTargetsReceivedFunc)
551--                                             (GtkClipboard *clipboard,
552--                                              GdkAtom *atoms,
553--                                              gint n_atoms,
554--                                              gpointer data);
555-- void        (*GtkClipboardRichTextReceivedFunc)
556--                                             (GtkClipboard *clipboard,
557--                                              GdkAtom format,
558--                                              const guint8 *text,
559--                                              gsize length,
560--                                              gpointer data);
561-- void        (*GtkClipboardGetFunc)          (GtkClipboard *clipboard,
562--                                              GtkSelectionData *selection_data,
563--                                              guint info,
564--                                              gpointer user_data_or_owner);
565-- void        (*GtkClipboardClearFunc)        (GtkClipboard *clipboard,
566--                                              gpointer user_data_or_owner);
567-- GtkClipboard* gtk_clipboard_get             (GdkAtom selection);
568
569	gtk_clipboard_get (selection: POINTER): POINTER is
570		external "C use <gtk/gtk.h>"
571		end
572
573-- GtkClipboard* gtk_clipboard_get_for_display (GdkDisplay *display,
574--                                              GdkAtom selection);
575-- GdkDisplay* gtk_clipboard_get_display       (GtkClipboard *clipboard);
576-- gboolean    gtk_clipboard_set_with_data     (GtkClipboard *clipboard,
577--                                              const GtkTargetEntry *targets,
578--                                              guint n_targets,
579--                                              GtkClipboardGetFunc get_func,
580--                                              GtkClipboardClearFunc clear_func,
581--                                              gpointer user_data);
582-- gboolean    gtk_clipboard_set_with_owner    (GtkClipboard *clipboard,
583--                                              const GtkTargetEntry *targets,
584--                                              guint n_targets,
585--                                              GtkClipboardGetFunc get_func,
586--                                              GtkClipboardClearFunc clear_func,
587--                                              GObject *owner);
588-- GObject*    gtk_clipboard_get_owner         (GtkClipboard *clipboard);
589-- void        gtk_clipboard_clear             (GtkClipboard *clipboard);
590
591	gtk_clipboard_set_text (clipboard: POINTER; text: POINTER; len: INTEGER) is
592		external "C use <gtk/gtk.h>"
593		end
594
595-- void        gtk_clipboard_set_image         (GtkClipboard *clipboard,
596--                                              GdkPixbuf *pixbuf);
597-- void        gtk_clipboard_request_contents  (GtkClipboard *clipboard,
598--                                              GdkAtom target,
599--                                              GtkClipboardReceivedFunc callback,
600--                                              gpointer user_data);
601-- void        gtk_clipboard_request_text      (GtkClipboard *clipboard,
602--                                              GtkClipboardTextReceivedFunc callback,
603--                                              gpointer user_data);
604-- void        gtk_clipboard_request_image     (GtkClipboard *clipboard,
605--                                              GtkClipboardImageReceivedFunc callback,
606--                                              gpointer user_data);
607-- void        gtk_clipboard_request_targets   (GtkClipboard *clipboard,
608--                                              GtkClipboardTargetsReceivedFunc callback,
609--                                              gpointer user_data);
610-- void        gtk_clipboard_request_rich_text (GtkClipboard *clipboard,
611--                                              GtkTextBuffer *buffer,
612--                                              GtkClipboardRichTextReceivedFunc callback,
613--                                              gpointer user_data);
614-- GtkSelectionData* gtk_clipboard_wait_for_contents
615--                                             (GtkClipboard *clipboard,
616--                                              GdkAtom target);
617	gtk_clipboard_wait_for_text (clipboard: POINTER): POINTER is
618		external "C use <gtk/gtk.h>"
619		end
620
621-- GdkPixbuf*  gtk_clipboard_wait_for_image    (GtkClipboard *clipboard);
622-- guint8*     gtk_clipboard_wait_for_rich_text
623--                                             (GtkClipboard *clipboard,
624--                                              GtkTextBuffer *buffer,
625--                                              GdkAtom *format,
626--                                              gsize *length);
627-- gboolean    gtk_clipboard_wait_is_text_available
628--                                             (GtkClipboard *clipboard);
629-- gboolean    gtk_clipboard_wait_is_image_available
630--                                             (GtkClipboard *clipboard);
631-- gboolean    gtk_clipboard_wait_is_rich_text_available
632--                                             (GtkClipboard *clipboard,
633--                                              GtkTextBuffer *buffer);
634-- gboolean    gtk_clipboard_wait_for_targets  (GtkClipboard *clipboard,
635--                                              GdkAtom **targets,
636--                                              gint *n_targets);
637-- gboolean    gtk_clipboard_wait_is_target_available
638--                                             (GtkClipboard *clipboard,
639--                                              GdkAtom target);
640-- void        gtk_clipboard_set_can_store     (GtkClipboard *clipboard,
641--                                              const GtkTargetEntry *targets,
642--                                              gint n_targets);
643-- void        gtk_clipboard_store             (GtkClipboard *clipboard);
644
645feature -- size
646
647	struct_size: INTEGER is
648		external "C use <gtk/gtk.h>"
649		alias "sizeof(GtkClipboard)"
650		end
651	
652end -- class GTK_CLIPBOARD