Class
GdkContentProvider
Description [src]
class Gdk.ContentProvider : GObject.Object
{
  /* No available fields */
}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 gdk_content_provider_new_for_value()
or gdk_content_provider_new_for_bytes().
GDK knows how to handle common text and image formats out-of-the-box. See
GdkContentSerializer and GdkContentDeserializer if you want
to add support for application-specific data formats.
Constructors
gdk_content_provider_new_for_bytes
Create a content provider that provides the given bytes as data for
the given mime_type.
Instance methods
gdk_content_provider_ref_formats
Gets the formats that the provider can provide its current contents in.
gdk_content_provider_ref_storable_formats
Gets the formats that the provider suggests other applications to store the data in.
gdk_content_provider_write_mime_type_async
Asynchronously writes the contents of provider to stream in the given
mime_type.
Properties
Gdk.ContentProvider:storable-formats
The subset of formats that clipboard managers should store this provider’s data in.
Signals
Gdk.ContentProvider::content-changed
Emitted whenever the content provided by this provider has changed.
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct GdkContentProviderClass {
  GObjectClass parent_class;
  void (* content_changed) (
    GdkContentProvider* provider
  );
  void (* attach_clipboard) (
    GdkContentProvider* provider,
    GdkClipboard* clipboard
  );
  void (* detach_clipboard) (
    GdkContentProvider* provider,
    GdkClipboard* clipboard
  );
  GdkContentFormats* (* ref_formats) (
    GdkContentProvider* provider
  );
  GdkContentFormats* (* ref_storable_formats) (
    GdkContentProvider* provider
  );
  void (* write_mime_type_async) (
    GdkContentProvider* provider,
    const char* mime_type,
    GOutputStream* stream,
    int io_priority,
    GCancellable* cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data
  );
  gboolean (* write_mime_type_finish) (
    GdkContentProvider* provider,
    GAsyncResult* result,
    GError** error
  );
  gboolean (* get_value) (
    GdkContentProvider* provider,
    GValue* value,
    GError** error
  );
  
}Class structure for GdkContentProvider.
Class members
- parent_class: GObjectClass
- No description available.
- content_changed: void (* content_changed) ( GdkContentProvider* provider )
- Signal class closure for - GdkContentProvider::content-changed
- attach_clipboard: void (* attach_clipboard) ( GdkContentProvider* provider, GdkClipboard* clipboard )
- No description available.
- detach_clipboard: void (* detach_clipboard) ( GdkContentProvider* provider, GdkClipboard* clipboard )
- No description available.
- ref_formats: GdkContentFormats* (* ref_formats) ( GdkContentProvider* provider )
- No description available.
- ref_storable_formats: GdkContentFormats* (* ref_storable_formats) ( GdkContentProvider* provider )
- No description available.
- write_mime_type_async: void (* write_mime_type_async) ( GdkContentProvider* provider, const char* mime_type, GOutputStream* stream, int io_priority, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data )
- No description available.
- write_mime_type_finish: gboolean (* write_mime_type_finish) ( GdkContentProvider* provider, GAsyncResult* result, GError** error )
- No description available.
- get_value: gboolean (* get_value) ( GdkContentProvider* provider, GValue* value, GError** error )
- No description available.
Virtual methods
Gdk.ContentProviderClass.ref_formats
Gets the formats that the provider can provide its current contents in.
Gdk.ContentProviderClass.ref_storable_formats
Gets the formats that the provider suggests other applications to store the data in.
Gdk.ContentProviderClass.write_mime_type_async
Asynchronously writes the contents of provider to stream in the given
mime_type.