Gdk.Clipboard
Description: Reference for Gdk.Clipboard

### Class

# GdkClipboard

#### Description [src]

    final class Gdk.Clipboard : GObject.Object {
      /* No available fields */
    }

The `GdkClipboard` object represents data shared between applications or inside an application.

To get a `GdkClipboard` object, use `gdk_display_get_clipboard()` or `gdk_display_get_primary_clipboard()`. You can find out about the data that is currently available in a clipboard using `gdk_clipboard_get_formats()`.

To make text or image data available in a clipboard, use `gdk_clipboard_set_text()` or `gdk_clipboard_set_texture()`. For other data, you can use `gdk_clipboard_set_content()`, which takes a `GdkContentProvider` object.

To read textual or image data from a clipboard, use `gdk_clipboard_read_text_async()` or `gdk_clipboard_read_texture_async()`. For other data, use `gdk_clipboard_read_async()`, which provides a `GInputStream` object.

#### Ancestors

- GObject

#### Instance methods

###### gdk_clipboard_get_content

Returns the `GdkContentProvider` currently set on `clipboard`.

###### gdk_clipboard_get_display

Gets the `GdkDisplay` that the clipboard was created for.

###### gdk_clipboard_get_formats

Gets the formats that the clipboard can provide its current contents in.

###### gdk_clipboard_is_local

Returns if the clipboard is local.

###### gdk_clipboard_read_async

Asynchronously requests an input stream to read the `clipboard`‘s contents from.

###### gdk_clipboard_read_finish

Finishes an asynchronous clipboard read.

###### gdk_clipboard_read_text_async

Asynchronously request the `clipboard` contents converted to a string.

###### gdk_clipboard_read_text_finish

Finishes an asynchronous clipboard read.

###### gdk_clipboard_read_texture_async

Asynchronously request the `clipboard` contents converted to a `GdkPixbuf`.

###### gdk_clipboard_read_texture_finish

Finishes an asynchronous clipboard read.

###### gdk_clipboard_read_value_async

Asynchronously request the `clipboard` contents converted to the given `type`.

###### gdk_clipboard_read_value_finish

Finishes an asynchronous clipboard read.

###### gdk_clipboard_set

Sets the clipboard to contain the value collected from the given varargs.

###### gdk_clipboard_set_content

Sets a new content provider on `clipboard`.

###### gdk_clipboard_set_text

Puts the given `text` into the clipboard.

###### gdk_clipboard_set_texture

Puts the given `texture` into the clipboard.

###### gdk_clipboard_set_valist

Sets the clipboard to contain the value collected from the given `args`.

###### gdk_clipboard_set_value

Sets the `clipboard` to contain the given `value`.

###### gdk_clipboard_store_async

Asynchronously instructs the `clipboard` to store its contents remotely.

###### gdk_clipboard_store_finish

Finishes an asynchronous clipboard store.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Gdk.Clipboard:content

The `GdkContentProvider` or `NULL` if the clipboard is empty or contents are provided otherwise.

###### Gdk.Clipboard:display

The `GdkDisplay` that the clipboard belongs to.

###### Gdk.Clipboard:formats

The possible formats that the clipboard can provide its data in.

###### Gdk.Clipboard:local

`TRUE` if the contents of the clipboard are owned by this process.

#### Signals

###### Gdk.Clipboard::changed

Emitted when the clipboard changes ownership.

##### Signals inherited from GObject (1)

###### GObject.Object::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.