Clipboard

open class Clipboard(pointer: <Error class: unknown class><<Error class: unknown class>>)

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.

Skipped during bindings generation

  • parameter out_mime_type: out_mime_type: Out parameter is not supported

  • parameter args: va_list

  • method local: Property has no getter nor setter

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

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

Link copied to clipboard
open val display: Display

The GdkDisplay that the clipboard belongs to.

Link copied to clipboard

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

Link copied to clipboard
val gdkClipboardPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun connectChanged(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Emitted when the clipboard changes ownership.

Link copied to clipboard
open fun isLocal(): Boolean

Returns if the clipboard is local.

Link copied to clipboard
open fun readAsync(mimeTypes: List<String>, ioPriority: <Error class: unknown class>, cancellable: <Error class: unknown class>? = null, callback: <Error class: unknown class>?)

Asynchronously requests an input stream to read the @clipboard's contents from.

Link copied to clipboard
open fun readTextAsync(cancellable: <Error class: unknown class>? = null, callback: <Error class: unknown class>?)

Asynchronously request the @clipboard contents converted to a string.

Link copied to clipboard
open fun readTextFinish(result: <Error class: unknown class>): <Error class: unknown class><String?>

Finishes an asynchronous clipboard read.

Link copied to clipboard
open fun readTextureAsync(cancellable: <Error class: unknown class>? = null, callback: <Error class: unknown class>?)

Asynchronously request the @clipboard contents converted to a GdkPixbuf.

Link copied to clipboard
open fun readTextureFinish(result: <Error class: unknown class>): <Error class: unknown class><Texture?>

Finishes an asynchronous clipboard read.

Link copied to clipboard
open fun readValueAsync(type: <Error class: unknown class>, ioPriority: <Error class: unknown class>, cancellable: <Error class: unknown class>? = null, callback: <Error class: unknown class>?)

Asynchronously request the @clipboard contents converted to the given

Link copied to clipboard
open fun readValueFinish(result: <Error class: unknown class>): <Error class: unknown class><<Error class: unknown class>>

Finishes an asynchronous clipboard read.

Link copied to clipboard
open fun set(value: <Error class: unknown class>)

Sets the @clipboard to contain the given @value.

Link copied to clipboard
open fun setContent(provider: ContentProvider? = null): Boolean

Sets a new content provider on @clipboard.

Link copied to clipboard
open fun setText(text: String)

Puts the given @text into the clipboard.

Link copied to clipboard
open fun setTexture(texture: Texture)

Puts the given @texture into the clipboard.

Link copied to clipboard
open fun storeAsync(ioPriority: <Error class: unknown class>, cancellable: <Error class: unknown class>? = null, callback: <Error class: unknown class>?)

Asynchronously instructs the @clipboard to store its contents remotely.

Link copied to clipboard
open fun storeFinish(result: <Error class: unknown class>): <Error class: unknown class><Boolean>

Finishes an asynchronous clipboard store.