GObject.Object
Gtk.Clipboard
Import line: | Gtk = imports.gi.Gtk; |
GIR File: | Gtk-2.0.gir |
C documentation: | GtkClipboard |
Class : | Clipboard |
Extends: | GObject.Object |
Show / Hide Inherited methods, properties and signals |
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
|
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().
|
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 | |
set_can_store
(TargetEntry targets, Number n_targets)
:
none
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 | |
set_with_data
(TargetEntry targets, Number n_targets, Function get_func, Function clear_func, void* user_data)
:
Boolean
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.
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. the clipboard data failed the provided callback functions will be ignored.
|
Gtk.Clipboard | |
set_with_owner
(TargetEntry targets, Number n_targets, Function get_func, Function clear_func, Object owner)
:
Boolean
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.
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. 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. the clipboard data failed the provided callback functions will be ignored.
|
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. 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. 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 | |
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
()
:
Boolean
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)
:
Boolean
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
()
:
Boolean
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
()
:
Boolean
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 | |
---|---|---|
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 |
remove_selection_clipboard
(Clipboard clipboard)
:
none
Removes a GtkClipboard added with gtk_text_buffer_add_selection_clipboard().
|
Gtk.TextBuffer
Method |
Copies the currently-selected text to a clipboard, then deletes said text if it's editable.
|
Gtk.TextBuffer
Method |
copy_clipboard
(Clipboard clipboard)
:
none
Copies the currently-selected text to a clipboard.
|
Gtk.TextBuffer
Method |
Pastes the contents of a clipboard at the insertion point, or at ask for the paste data and return, and at some point later after the main loop runs, the paste data will be inserted.
|
Gtk.Widget
Method |
get_clipboard
(Atom selection)
:
Gtk.Clipboard
Returns the clipboard object for the given selection to be used with widget.
|