gdk.clipboard
Module for [Clipboard] class
Types 3
The [gdk.clipboard.Clipboard] object represents data shared between applications or inside an application.
To get a [gdk.clipboard.Clipboard] object, use [gdk.display.Display.getClipboard] or [gdk.display.Display.getPrimaryClipboard]. You can find out about the data that is currently available in a clipboard using [gdk.clipboard.Clipboard.getFormats].
To make text or image data available in a clipboard, use [gdk.clipboard.Clipboard.setText] or [gdk.clipboard.Clipboard.setTexture]. For other data, you can use [gdk.clipboard.Clipboard.setContent], which takes a [gdk.content_provider.ContentProvider] object.
To read textual or image data from a clipboard, use [gdk.clipboard.Clipboard.readTextAsync] or [gdk.clipboard.Clipboard.readTextureAsync]. For other data, use [gdk.clipboard.Clipboard.readAsync], which provides a [gio.input_stream.InputStream] object.
ClipboardGidBuilder builder()Get builder for [gdk.clipboard.Clipboard] Returns: New builder objectgdk.content_provider.ContentProvider content() @propertyGet `content` property. Returns: The [gdk.content_provider.ContentProvider] or null if the clipboard is empty or contents are provided otherwise.gdk.display.Display display() @propertyGet `display` property. Returns: The [gdk.display.Display] that the clipboard belongs to.gdk.content_formats.ContentFormats formats() @propertyGet `formats` property. Returns: The possible formats that the clipboard can provide its data in.bool local() @propertyGet `local` property. Returns: true if the contents of the clipboard are owned by this process.gdk.content_provider.ContentProvider getContent()Returns the [gdk.content_provider.ContentProvider] currently set on clipboard.gdk.display.Display getDisplay()Gets the [gdk.display.Display] that the clipboard was created for. Returns: a [gdk.display.Display]gdk.content_formats.ContentFormats getFormats()Gets the formats that the clipboard can provide its current contents in. Returns: The formats of the clipboardbool isLocal()Returns if the clipboard is local.void readAsync(string[] mimeTypes, int ioPriority, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Asynchronously requests an input stream to read the clipboard's contents from.gio.input_stream.InputStream readFinish(gio.async_result.AsyncResult result, out string outMimeType)Finishes an asynchronous clipboard read.void readTextAsync(gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Asynchronously request the clipboard contents converted to a string.string readTextFinish(gio.async_result.AsyncResult result)Finishes an asynchronous clipboard read.void readTextureAsync(gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Asynchronously request the clipboard contents converted to a [gdkpixbuf.pixbuf.Pixbuf].gdk.texture.Texture readTextureFinish(gio.async_result.AsyncResult result)Finishes an asynchronous clipboard read.void readValueAsync(gobject.types.GType type, int ioPriority, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Asynchronously request the clipboard contents converted to the given type.gobject.value.Value readValueFinish(gio.async_result.AsyncResult result)Finishes an asynchronous clipboard read.bool setContent(gdk.content_provider.ContentProvider provider = null)Sets a new content provider on clipboard.void set(gobject.value.Value value)Sets the clipboard to contain the given value.void storeAsync(int ioPriority, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Asynchronously instructs the clipboard to store its contents remotely.bool storeFinish(gio.async_result.AsyncResult result)Finishes an asynchronous clipboard store.gulong connectChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gdk.clipboard.Clipboard)))
&& Parameters!T.length < 2)Connect to `Changed` signal.T display(gdk.display.Display propval)Set `display` property. Params: propval = The [gdk.display.Display] that the clipboard belongs to. Returns: Builder instance for fluent chaining