Clipboard


Object Hierarchy:

Gdk.Clipboard Gdk.Clipboard Gdk.Clipboard GLib.Object GLib.Object GLib.Object->Gdk.Clipboard

Description:

[ CCode ( type_id = "gdk_clipboard_get_type ()" ) ]
public sealed class Clipboard : Object

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

To get a `GdkClipboard` object, use [method@Gdk.Display.get_clipboard] or [method@Gdk.Display.get_primary_clipboard]. You can find out about the data that is currently available in a clipboard using [method@Gdk.Clipboard.get_formats].

To make text or image data available in a clipboard, use [method@Gdk.Clipboard.set_text] or [method@Gdk.Clipboard.set_texture]. For other data, you can use [method@Gdk.Clipboard.set_content], which takes a [class@Gdk.ContentProvider] object.

To read textual or image data from a clipboard, use [method@Gdk.Clipboard.read_text_async] or [method@Gdk.Clipboard.read_texture_async]. For other data, use [method@Gdk.Clipboard.read_async], which provides a `GInputStream` object.


Namespace: Gdk
Package: gtk4

Content:

Properties:

Creation methods:

Methods:

Signals:

Inherited Members: