ContentProvider

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

A GdkContentProvider is used to provide content for the clipboard or for drag-and-drop operations in a number of formats.

To create a GdkContentProvider, use ctor@Gdk.ContentProvider.new_for_value or ctor@Gdk.ContentProvider.new_for_bytes.

GDK knows how to handle common text and image formats out-of-the-box. See class@Gdk.ContentSerializer and class@Gdk.ContentDeserializer if you want to add support for application-specific data formats.

Skipped during bindings generation

  • method formats: Property has no getter nor setter

  • method storable-formats: Property has no getter nor setter

  • constructor new_typed: Varargs parameter is not supported

  • parameter providers: Array parameter of type ContentProvider is not supported

Constructors

Link copied to clipboard
constructor(mimeType: String, bytes: <Error class: unknown class>)

Create a content provider that provides the given @bytes as data for the given @mime_type.

constructor(value: <Error class: unknown class>)

Create a content provider that provides the given @value.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

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

Functions

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

Emitted whenever the content provided by this provider has changed.

Link copied to clipboard
open fun contentChanged()

Emits the ::content-changed signal.

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

Gets the contents of @provider stored in @value.

Link copied to clipboard

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

Link copied to clipboard

Gets the formats that the provider suggests other applications to store the data in.

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

Asynchronously writes the contents of @provider to @stream in the given

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

Finishes an asynchronous write operation.