Class ContentDeserializer

All Implemented Interfaces:
PointerInterface

public class ContentDeserializer extends Object
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 [func@content_register_deserializer].

Also see [class@Gdk.ContentSerializer].

https://docs.gtk.org/gdk4/class.ContentDeserializer.html

  • Constructor Details

  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getCancellable

      public Cancellable getCancellable()
      Gets the cancellable for the current operation.

      This is the `GCancellable` that was passed to [func@Gdk.content_deserialize_async].
      Returns:
      the cancellable for the current operation
    • getGtype

      public long getGtype()
      Gets the `GType` to create an instance of.
      Returns:
      the `GType` for the current operation
    • getInputStream

      public InputStream getInputStream()
      Gets the input stream for the current operation.

      This is the stream that was passed to [func@Gdk.content_deserialize_async].
      Returns:
      the input stream for the current operation
    • getMimeType

      public Str getMimeType()
      Gets the mime type to deserialize from.
      Returns:
      the mime type for the current operation
    • getPriority

      public int getPriority()
      Gets the I/O priority for the current operation.

      This is the priority that was passed to [func@Gdk.content_deserialize_async].
      Returns:
      the I/O priority for the current operation
    • getTaskData

      public Pointer getTaskData()
      Gets the data that was associated with the current operation.

      See [method@Gdk.ContentDeserializer.set_task_data].
      Returns:
      the task data for @deserializer
    • getUserData

      public Pointer getUserData()
      Gets the user data that was passed when the deserializer was registered.
      Returns:
      the user data for this deserializer
    • getValue

      public Value getValue()
      Gets the `GValue` to store the deserialized object in.
      Returns:
      the `GValue` for the current operation
    • returnError

      public void returnError(@Nonnull Error error)
      Indicate that the deserialization has ended with an error.

      This function consumes @error.
      Parameters:
      error - a `GError`
    • returnSuccess

      public void returnSuccess()
      Indicate that the deserialization has been successfully completed.
    • setTaskData

      public void setTaskData(@Nullable Pointer data, ContentDeserializer.OnDestroyNotify notify)
      Associate data with the current deserialization operation.
      Parameters:
      data - data to associate with this operation
      notify - destroy notify for @data
    • asAsyncResult

      public AsyncResult asAsyncResult()
      Implements interface AsyncResult. Call this to get access to interface functions.
      Returns:
      AsyncResult
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()