Class: Gdk::ContentDeserializer

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Overview

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 [funccontent_register_deserializer].

Also see [classGdk.ContentSerializer].

Instance Method Summary collapse

Instance Method Details

#cancellableGio::Cancellable

Gets the cancellable for the current operation.

This is the GCancellable that was passed to [funcGdk.content_deserialize_async].

Returns:

  • (Gio::Cancellable)

    the cancellable for the current operation

#gtypeGLib::Type

Gets the GType to create an instance of.

Returns:

  • (GLib::Type)

    the GType for the current operation

#input_streamGio::InputStream

Gets the input stream for the current operation.

This is the stream that was passed to [funcGdk.content_deserialize_async].

Returns:

  • (Gio::InputStream)

    the input stream for the current operation

#mime_typeString

Gets the mime type to deserialize from.

Returns:

  • (String)

    the mime type for the current operation

#priorityInteger

Gets the I/O priority for the current operation.

This is the priority that was passed to [funcGdk.content_deserialize_async].

Returns:

  • (Integer)

    the I/O priority for the current operation

#return_error(error) ⇒ nil

Indicate that the deserialization has ended with an error.

This function consumes error.

Parameters:

  • error (GLib::Error)

    a GError

Returns:

  • (nil)

#return_successnil

Indicate that the deserialization has been successfully completed.

Returns:

  • (nil)

#set_task_data(data, notify) ⇒ nil

Associate data with the current deserialization operation.

Parameters:

  • data (GObject)

    data to associate with this operation

  • notify (GLib::DestroyNotify)

    destroy notify for data

Returns:

  • (nil)

#task_dataGObject

Gets the data that was associated with the current operation.

See [methodGdk.ContentDeserializer.set_task_data].

Returns:

  • (GObject)

    the task data for deserializer

#user_dataGObject

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

Returns:

  • (GObject)

    the user data for this deserializer

#valueGObject::Value

Gets the GValue to store the deserialized object in.

Returns:

  • (GObject::Value)

    the GValue for the current operation