GObject.Object
Gtk.Clipboard
Import line: | Gtk = imports.gi.Gtk; |
GIR File: | Gtk-3.0.gir |
C documentation: | GtkClipboard |
Class : | Clipboard |
Extends: | GObject.Object |
None |
Method / Constructor | Defined By | |
---|---|---|
new Gtk.Clipboard
()
Create a new Gtk.Clipboard
Create a new Gtk.Clipboard
|
||
Returns the clipboard object for the given selection.
Returns the clipboard object for the given selection.
See gtk_clipboard_get_for_display() for complete details. 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 unreffed.
|
Gtk.Clipboard | |
Returns the clipboard object for the given selection.
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. (Passing GDK_NONE is the same as using ("CLIPBOARD", FALSE) 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.) 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". 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.
|
Gtk.Clipboard | |
clear
()
:
none
Clears the contents of the clipboard.
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.
|
Gtk.Clipboard | |
get_display
()
:
Gdk.Display
Gets the GdkDisplay associated with clipboard
Gets the GdkDisplay associated with clipboard
|
Gtk.Clipboard | |
get_owner
()
:
GObject.Object
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().
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(). otherwise NULL.
|
Gtk.Clipboard | |
Requests the contents of clipboard as the given target.
Requests the contents of clipboard as the given target.
When the results of the result are later received the supplied callback will be called.
|
Gtk.Clipboard | |
Requests the contents of the clipboard as image.
Requests the contents of the clipboard as image. When the image is
later received, it will be converted to a GdkPixbuf, and 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.
|
Gtk.Clipboard | |
Requests the contents of the clipboard as rich text.
Requests the contents of the clipboard as rich text. When the rich
text is later received, callback will be called. 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.
|
Gtk.Clipboard | |
Requests the contents of the clipboard as list of supported targets.
Requests the contents of the clipboard as list of supported targets.
When the list is later received, callback will be called. The targets parameter to callback will contain the resulting targets if the request succeeded, or NULL if it failed.
|
Gtk.Clipboard | |
Requests the contents of the clipboard as text.
Requests the contents of the clipboard as text. When the text is
later received, it will be converted to UTF-8 if necessary, and 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.
|
Gtk.Clipboard | |
Requests the contents of the clipboard as URIs.
Requests the contents of the clipboard as URIs. When the URIs are
later received callback will be called. The uris parameter to callback will contain the resulting array of URIs 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 URI form.
|
Gtk.Clipboard | |
Hints that the clipboard data should be stored somewhere when the
application exits or when gtk_clipboard_store () is called.
Hints that the clipboard data should be stored somewhere when the
application exits or when gtk_clipboard_store () is called. 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.
|
Gtk.Clipboard | |
set_image
(Pixbuf pixbuf)
:
none
Sets the contents of the clipboard to the given GdkPixbuf.
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.
|
Gtk.Clipboard | |
Sets the contents of the clipboard to the given UTF-8 string.
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.
|
Gtk.Clipboard | |
store
()
:
none
Stores the current clipboard data somewhere so that it will stay
around after the application has quit.
Stores the current clipboard data somewhere so that it will stay
around after the application has quit.
|
Gtk.Clipboard | |
wait_for_contents
(Atom target)
:
Gtk.SelectionData
Requests the contents of the clipboard using the given 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. 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.
|
Gtk.Clipboard | |
wait_for_image
()
:
GdkPixbuf.Pixbuf
Requests the contents of the clipboard as image and converts
the result to a GdkPixbuf.
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. 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.)
|
Gtk.Clipboard | |
Requests the contents of the clipboard as rich text.
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. 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.)
|
Gtk.Clipboard | |
Returns a list of targets that are present on the clipboard, or NULL
if there aren't any targets available.
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. otherwise FALSE.
|
Gtk.Clipboard | |
wait_for_text
()
:
String
Requests the contents of the clipboard as text and converts
the result to UTF-8 if necessary.
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. 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.)
|
Gtk.Clipboard | |
wait_for_uris
()
:
Array
Requests the contents of the clipboard as 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. NULL-terminated array of strings which must be freed with g_strfreev(), 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 URI form.)
|
Gtk.Clipboard | |
wait_is_image_available
()
:
gboolean
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.
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. This function is a little faster than calling gtk_clipboard_wait_for_image() since it doesn't need to retrieve the actual image data.
|
Gtk.Clipboard | |
wait_is_rich_text_available
(TextBuffer buffer)
:
gboolean
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.
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. This function is a little faster than calling gtk_clipboard_wait_for_rich_text() since it doesn't need to retrieve the actual text.
|
Gtk.Clipboard | |
Checks if a clipboard supports pasting data of a given type.
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. If you want to see if there's text available on the clipboard, use gtk_clipboard_wait_is_text_available () instead.
|
Gtk.Clipboard | |
wait_is_text_available
()
:
gboolean
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.
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. This function is a little faster than calling gtk_clipboard_wait_for_text() since it doesn't need to retrieve the actual text.
|
Gtk.Clipboard | |
wait_is_uris_available
()
:
gboolean
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.
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. This function is a little faster than calling gtk_clipboard_wait_for_uris() since it doesn't need to retrieve the actual URI data.
|
Gtk.Clipboard |
Event | Defined By | |
---|---|---|
owner_change (Clipboard self, EventOwnerChange event)
:
none
The ::owner-change signal is emitted when GTK+ receives an
event that indicates that the ownership of the selection associated with clipboard has changed.
The ::owner-change signal is emitted when GTK+ receives an
event that indicates that the ownership of the selection associated with clipboard has changed.
|
Gtk.Clipboard |
Class / Namespace | Method / Signal / Properties |
---|---|
Gtk.TextBuffer
Signal |
paste_done
(TextBuffer self, Clipboard since)
:
none
The paste-done signal is emitted after paste operation has been completed.
|
Gtk.TextBuffer
Method |
add_selection_clipboard
(Clipboard clipboard)
:
none
Adds clipboard to the list of clipboards in which the selection
contents of buffer are available. |
Gtk.TextBuffer
Method |
copy_clipboard
(Clipboard clipboard)
:
none
Copies the currently-selected text to a clipboard.
|
Gtk.TextBuffer
Method |
Copies the currently-selected text to a clipboard, then deletes
said text if it's editable. |
Gtk.TextBuffer
Method |
Pastes the contents of a clipboard at the insertion point, or
we'll ask for the paste data and return, and at some point later after the main loop runs, the paste data will be inserted. |
Gtk.TextBuffer
Method |
remove_selection_clipboard
(Clipboard clipboard)
:
none
Removes a GtkClipboard added with
gtk_text_buffer_add_selection_clipboard(). |
Gtk.Widget
Method |
get_clipboard
(Atom selection)
:
Gtk.Clipboard
Returns the clipboard object for the given selection to
be used with widget. |