:right-sidebar: True ContentDeserializer =================================================================== .. currentmodule:: gi.repository.Gdk .. class:: ContentDeserializer(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gio.AsyncResult` A ``GdkContentDeserializer`` is used to deserialize content received via inter-application data transfers. The ``GdkContentDeserializer`` transforms serialized content that is identified by a mime type into an object identified by a GType. GTK provides serializers and deserializers for common data types such as text, colors, images or file lists. To register your own deserialization functions, use :obj:`~gi.repository.Gdk.content_register_deserializer`\. Also see :obj:`~gi.repository.Gdk.ContentSerializer`\. Methods ------- .. rst-class:: interim-class .. class:: ContentDeserializer :no-index: .. method:: get_cancellable() -> ~gi.repository.Gio.Cancellable | None Gets the cancellable for the current operation. This is the ``GCancellable`` that was passed to :obj:`~gi.repository.Gdk.content_deserialize_async`\. .. method:: get_gtype() -> ~gobject.GType Gets the ``GType`` to create an instance of. .. method:: get_input_stream() -> ~gi.repository.Gio.InputStream Gets the input stream for the current operation. This is the stream that was passed to :obj:`~gi.repository.Gdk.content_deserialize_async`\. .. method:: get_mime_type() -> str Gets the mime type to deserialize from. .. method:: get_priority() -> int Gets the I/O priority for the current operation. This is the priority that was passed to :obj:`~gi.repository.Gdk.content_deserialize_async`\. .. method:: get_task_data() -> ~typing.Any | None Gets the data that was associated with the current operation. See :obj:`~gi.repository.Gdk.ContentDeserializer.set_task_data`\. .. method:: get_user_data() -> ~typing.Any | None Gets the user data that was passed when the deserializer was registered. .. method:: get_value() -> ~gi.repository.GObject.Value Gets the ``GValue`` to store the deserialized object in. .. method:: return_error(error: ~gi.repository.GLib.GError) -> None Indicate that the deserialization has ended with an error. This function consumes ``error``\. :param error: a ``GError`` .. method:: return_success() -> None Indicate that the deserialization has been successfully completed. .. method:: set_task_data(data: ~typing.Any, notify: ~typing.Callable[[~typing.Any], None]) -> None Associate data with the current deserialization operation. :param data: data to associate with this operation :param notify: destroy notify for ``data``