Basics
Guides
API Reference
Basics
Guides
API Reference
[18:7] extends: object
Serializes content for inter-application data transfers. The
GdkContentSerializer transforms an object that is identified by a GType
into a serialized form (i.e. a byte stream) that is identified by a mime
type. GTK provides serializers and deserializers for common data types such
as text, colors, images or file lists. To register your own serialization
functions, use [func@Gdk.content_register_serializer]. Also see
[class@Gdk.ContentDeserializer].
ContentSerializer (Handle = null)
Creates a new
ContentSerializerby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asObject ()
Wraps this handle as
Object.
A Object object.asAsyncResult ()
Wraps this handle as
AsyncResult.
A AsyncResult object.get_cancellable ()
Gets the cancellable for the current operation. This is the
GCancellablethat was passed to [func@content_serialize_async].
get_mime_type ()
Gets the mime type to serialize to.
get_output_stream ()
Gets the output stream for the current operation. This is the stream that was passed to [func@content_serialize_async].
get_priority ()
Gets the I/O priority for the current operation. This is the priority that was passed to [func@content_serialize_async].
get_task_data ()
Gets the data that was associated with the current operation. See [method@Gdk.ContentSerializer.set_task_data].
get_user_data ()
Gets the user data that was passed when the serializer was registered.
get_value ()
Gets the
GValueto read the object to serialize from.
return_error (object error)
Indicate that the serialization has ended with an error. This function consumes @error.
error is a GError.None.return_success ()
Indicate that the serialization has been successfully completed.
None.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.