Gdk.ContentSerializer

g GObject.GInterface GObject.GInterface Gio.AsyncResult Gio.AsyncResult GObject.GInterface->Gio.AsyncResult GObject.Object GObject.Object Gdk.ContentSerializer Gdk.ContentSerializer GObject.Object->Gdk.ContentSerializer Gio.AsyncResult->Gdk.ContentSerializer

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gio.AsyncResult (4)

Structs:

GObject.ObjectClass (5)

get_cancellable ()

get_gtype ()

get_mime_type ()

get_output_stream ()

get_priority ()

get_task_data ()

get_user_data ()

get_value ()

return_error (error)

return_success ()

set_task_data (data, notify)

Virtual Methods

Inherited:

GObject.Object (7), Gio.AsyncResult (3)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Gdk.ContentSerializer(**kwargs)
Bases:

GObject.Object, Gio.AsyncResult

Abstract:

No

A GdkContentSerializer is used to serialize content for inter-application data transfers.

The GdkContentSerializer transforms an object that is identified by a GObject.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].

get_cancellable()[source]
Returns:

the cancellable for the current operation

Return type:

Gio.Cancellable or None

Gets the cancellable for the current operation.

This is the GCancellable that was passed to [func`content_serialize_async`].

get_gtype()[source]
Returns:

the GType for the current operation

Return type:

GObject.GType

Gets the GType to of the object to serialize.

get_mime_type()[source]
Returns:

the mime type for the current operation

Return type:

str

Gets the mime type to serialize to.

get_output_stream()[source]
Returns:

the output stream for the current operation

Return type:

Gio.OutputStream

Gets the output stream for the current operation.

This is the stream that was passed to [func`content_serialize_async`].

get_priority()[source]
Returns:

the I/O priority for the current operation

Return type:

int

Gets the I/O priority for the current operation.

This is the priority that was passed to [func`content_serialize_async`].

get_task_data()[source]
Returns:

the task data for self

Return type:

object or None

Gets the data that was associated with the current operation.

See [method`Gdk`.ContentSerializer.set_task_data].

get_user_data()[source]
Returns:

the user data for this serializer

Return type:

object or None

Gets the user data that was passed when the serializer was registered.

get_value()[source]
Returns:

the GValue for the current operation

Return type:

GObject.Value

Gets the GValue to read the object to serialize from.

return_error(error)[source]
Parameters:

error (GLib.Error) – a GError

Indicate that the serialization has ended with an error.

This function consumes error.

return_success()[source]

Indicate that the serialization has been successfully completed.

set_task_data(data, notify)[source]
Parameters:

Associate data with the current serialization operation.