gdk.content_provider

Module for [ContentProvider] class

Types 3

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

To create a gdk.content_provider.ContentProvider, use gdk.content_provider.ContentProvider.newForValue or gdk.content_provider.ContentProvider.newForBytes.

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

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
ContentProvider self() nothrowReturns `this`, for use in `with` statements.
ContentProviderGidBuilder builder() static nothrowGet builder for [gdk.content_provider.ContentProvider] Returns: New builder object
gdk.content_formats.ContentFormats formats() @property nothrowGet `formats` property. Returns: The possible formats that the provider can provide its data in.
gdk.content_formats.ContentFormats storableFormats() @property nothrowGet `storableFormats` property. Returns: The subset of formats that clipboard managers should store this provider's data in.
gdk.content_provider.ContentProvider newForBytes(string mimeType, glib.bytes.Bytes bytes) static nothrowCreate a content provider that provides the given bytes as data for the given mime_type.
gdk.content_provider.ContentProvider newForValue(gobject.value.Value value) static nothrowCreate a content provider that provides the given value.
void contentChanged() nothrowEmits the ::content-changed signal.
bool getValue(out gobject.value.Value value)Gets the contents of provider stored in value.
gdk.content_formats.ContentFormats refFormats() nothrowGets the formats that the provider can provide its current contents in. Returns: The formats of the provider
gdk.content_formats.ContentFormats refStorableFormats() nothrowGets the formats that the provider suggests other applications to store the data in.
void writeMimeTypeAsync(string mimeType, gio.output_stream.OutputStream stream, int ioPriority, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null) nothrowAsynchronously writes the contents of provider to stream in the given mime_type.
bool writeMimeTypeFinish(gio.async_result.AsyncResult result)Finishes an asynchronous write operation.
gulong connectContentChanged(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.content_provider.ContentProvider))) && Parameters!T.length < 2) nothrowConnect to `ContentChanged` signal.
Constructors
this(void * ptr, Flag!"Take" take)
Methods
ContentProvider build() nothrowCreate object from builder. Returns: New object