### Class

# Gdk ContentSerializer

since: 4.0

#### Description [src]

    final class Gdk.ContentSerializer : GObject.Object
      implements Gio.AsyncResult {
      /* No available fields */
    }

A `GdkContentSerializer` is used to serialize 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 `gdk_content_register_serializer()`.

Also see `GdkContentDeserializer`.

Available since: 4.0

#### Ancestors

- GObject

#### Implements

- GAsyncResult

#### Instance methods

###### gdk_content_serializer_get_cancellable

Gets the cancellable for the current operation.

since: 4.0

###### gdk_content_serializer_get_gtype

Gets the `GType` to of the object to serialize.

since: 4.0

###### gdk_content_serializer_get_mime_type

Gets the mime type to serialize to.

since: 4.0

###### gdk_content_serializer_get_output_stream

Gets the output stream for the current operation.

since: 4.0

###### gdk_content_serializer_get_priority

Gets the I/O priority for the current operation.

since: 4.0

###### gdk_content_serializer_get_task_data

Gets the data that was associated with the current operation.

since: 4.0

###### gdk_content_serializer_get_user_data

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

since: 4.0

###### gdk_content_serializer_get_value

Gets the `GValue` to read the object to serialize from.

since: 4.0

###### gdk_content_serializer_return_error

Indicate that the serialization has ended with an error.

since: 4.0

###### gdk_content_serializer_return_success

Indicate that the serialization has been successfully completed.

since: 4.0

###### gdk_content_serializer_set_task_data

Associate data with the current serialization operation.

since: 4.0

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from GAsyncResult (4)

###### g_async_result_get_source_object

Gets the source object from a `GAsyncResult`.

since: 2.0

###### g_async_result_get_user_data

Gets the user data from a `GAsyncResult`.

since: 2.0

###### g_async_result_is_tagged

Checks if `res` has the given `source_tag` (generally a function pointer indicating the function `res` was created by).

since: 2.34

###### g_async_result_legacy_propagate_error

If `res` is a `GSimpleAsyncResult`, this is equivalent to g_simple_async_result_propagate_error(). Otherwise it returns `FALSE`.

since: 2.34

#### Signals

##### 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.

since: 2.0