Class
ValentClipboardAdapter
since: 1.0
Description [src]
abstract class Valent.ClipboardAdapter : Valent.Object {
parent_instance: ValentObject
}
An abstract base class for clipboard selections.
ValentClipboardAdapter
is a base class for plugins that provide an interface
to the desktop clipboard. This usually means reading and writing content,
including notification of content changes.
.plugin
File
Implementations may define the following extra fields in the .plugin
file:
-
X-ClipboardAdapterPriority
An integer indicating the adapter priority. The implementation with the lowest value will be used as the primary adapter.
Available since: 1.0
Instance methods
valent_clipboard_adapter_changed
Emits ValentClipboardAdapter::changed
signal on adapter
.
since: 1.0
valent_clipboard_adapter_get_mimetypes
Get the mime-types of the current clipboard content.
since: 1.0
valent_clipboard_adapter_get_timestamp
Get the timestamp of the current clipboard content.
since: 1.0
valent_clipboard_adapter_read_bytes_finish
Finish an operation started by valent_clipboard_adapter_read_bytes()
.
since: 1.0
valent_clipboard_adapter_write_bytes_finish
Finish an operation started by valent_clipboard_adapter_write_bytes()
.
since: 1.0
Methods inherited from ValentObject (9)
valent_object_attach_cancellable
Attach the object’s cancellable another cancellable.
since: 1.0
valent_object_chain_cancellable
Chain a cancellable to the object’s cancellable.
since: 1.0
valent_object_destroy
Destroy the object.
since: 1.0
valent_object_in_destruction
Get whether the object is destroyed or in destruction.
since: 1.0
valent_object_lock
Acquire a lock on object
.
since: 1.0
valent_object_notify
Emit GObject::notify
on object
, on the main thread.
since: 1.0
valent_object_notify_by_pspec
Emit GObject::notify
on object
, on the main thread.
since: 1.0
valent_object_ref_cancellable
Get a GCancellable
for the object.
since: 1.0
valent_object_unlock
Release a lock on object
.
since: 1.0
Signals
Signals inherited from ValentObject (1)
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 ValentClipboardAdapterClass {
ValentObjectClass parent_class;
GStrv (* get_mimetypes) (
ValentClipboardAdapter* adapter
);
gint64 (* get_timestamp) (
ValentClipboardAdapter* adapter
);
void (* read_bytes) (
ValentClipboardAdapter* adapter,
const char* mimetype,
GCancellable* cancellable,
GAsyncReadyCallback callback,
gpointer user_data
);
GBytes* (* read_bytes_finish) (
ValentClipboardAdapter* adapter,
GAsyncResult* result,
GError** error
);
void (* write_bytes) (
ValentClipboardAdapter* adapter,
const char* mimetype,
GBytes* bytes,
GCancellable* cancellable,
GAsyncReadyCallback callback,
gpointer user_data
);
gboolean (* write_bytes_finish) (
ValentClipboardAdapter* adapter,
GAsyncResult* result,
GError** error
);
void (* changed) (
ValentClipboardAdapter* adapter
);
}
The virtual function table for ValentClipboardAdapter
.
Class members
parent_class: ValentObjectClass
- No description available.
get_mimetypes: GStrv (* get_mimetypes) ( ValentClipboardAdapter* adapter )
- No description available.
get_timestamp: gint64 (* get_timestamp) ( ValentClipboardAdapter* adapter )
- No description available.
read_bytes: void (* read_bytes) ( ValentClipboardAdapter* adapter, const char* mimetype, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data )
- No description available.
read_bytes_finish: GBytes* (* read_bytes_finish) ( ValentClipboardAdapter* adapter, GAsyncResult* result, GError** error )
- No description available.
write_bytes: void (* write_bytes) ( ValentClipboardAdapter* adapter, const char* mimetype, GBytes* bytes, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data )
- No description available.
write_bytes_finish: gboolean (* write_bytes_finish) ( ValentClipboardAdapter* adapter, GAsyncResult* result, GError** error )
- No description available.
changed: void (* changed) ( ValentClipboardAdapter* adapter )
- No description available.
Virtual methods
Valent.ClipboardAdapterClass.changed
Emits ValentClipboardAdapter::changed
signal on adapter
.
since: 1.0
Valent.ClipboardAdapterClass.get_mimetypes
Get the mime-types of the current clipboard content.
since: 1.0
Valent.ClipboardAdapterClass.get_timestamp
Get the timestamp of the current clipboard content.
since: 1.0
Valent.ClipboardAdapterClass.read_bytes_finish
Finish an operation started by valent_clipboard_adapter_read_bytes()
.
since: 1.0
Valent.ClipboardAdapterClass.write_bytes_finish
Finish an operation started by valent_clipboard_adapter_write_bytes()
.
since: 1.0