-
public void clear ()
Clears the contents of the clipboard. Generally this should only be called between the time you call
set_with_owner or
set_with_data, and when the clear_func you supplied is
called. Otherwise, the clipboard may be owned by someone else.
-
public weak Display get_display ()
Gets the Display associated with clipboard
-
public weak Object get_owner ()
-
public void request_contents (Atom target, ClipboardReceivedFunc callback)
Requests the contents of clipboard as the given target. When the results of the result are later
received the supplied callback will be called.
-
public void request_image (ClipboardImageReceivedFunc callback)
Requests the contents of the clipboard as image. When the image is later received, it will be converted
to a Pixbuf, and callback will be called.
-
public void request_rich_text (TextBuffer buffer, ClipboardRichTextReceivedFunc callback)
Requests the contents of the clipboard as rich text. When the rich text is later received,
callback will be called.
-
public void request_targets (ClipboardTargetsReceivedFunc callback)
Requests the contents of the clipboard as list of supported targets. When the list is later received,
callback will be called.
-
public void request_text (ClipboardTextReceivedFunc callback)
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.
-
public void request_uris (ClipboardURIReceivedFunc callback)
Requests the contents of the clipboard as URIs. When the URIs are later received callback
will be called.
-
public void set_can_store (TargetEntry[] targets)
Hints that the clipboard data should be stored somewhere when the application exits or when
store is called.
-
public void set_image (Pixbuf pixbuf)
Sets the contents of the clipboard to the given
Pixbuf. GTK+ will take responsibility for responding for requests for
the image, and for converting the image into the requested format.
-
public void set_text (string text, int len)
Sets the contents of the clipboard to the given UTF-8 string. GTK+ will make a copy of the text and take
responsibility for responding for requests for the text, and for converting the text into the requested format.
-
public bool set_with_data (TargetEntry[] targets, ClipboardGetFunc get_func, ClipboardClearFunc clear_func)
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.
-
public bool set_with_owner (TargetEntry[] targets, ClipboardGetFunc get_func, ClipboardClearFunc clear_func, Object owner)
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.
-
public void store ()
Stores the current clipboard data somewhere so that it will stay around after the application has quit.
-
public SelectionData? wait_for_contents (Atom target)
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.
-
public Pixbuf? wait_for_image ()
Requests the contents of the clipboard as image and converts the result to a
Pixbuf. This function waits for the data to be received using the main
loop, so events, timeouts, etc, may be dispatched during the wait.
-
public uint8[]? wait_for_rich_text (TextBuffer buffer, out Atom format)
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.
-
public bool wait_for_targets (out Atom[] targets)
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.
-
public string? wait_for_text ()
Requests the contents of the clipboard as text and converts the result to UTF-8 if necessary. This
function waits for the data to be received using the main loop, so events, timeouts, etc, may be dispatched during the wait.
-
public string[]? wait_for_uris ()
Requests the contents of the clipboard as URIs. This function waits for the data to be received using
the main loop, so events, timeouts, etc, may be dispatched during the wait.
-
public bool wait_is_image_available ()
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.
-
public bool wait_is_rich_text_available (TextBuffer buffer)
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.
-
public bool wait_is_target_available (Atom target)
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.
-
public bool wait_is_text_available ()
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.
-
public bool wait_is_uris_available ()
Test to see if there is a list of URIs available to be pasted This is done by requesting the TARGETS
atom and checking if it contains the URI targets. This function waits for the data to be received using the main loop, so events,
timeouts, etc, may be dispatched during the wait.