Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ContentSerializer

[18:7] extends: object

Serializes 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 [func@Gdk.content_register_serializer]. Also see [class@Gdk.ContentDeserializer].

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • ContentSerializer (Handle = null)

    Creates a new ContentSerializer by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as Object.

    • @r A Object object.
  • asAsyncResult ()

    Wraps this handle as AsyncResult.

    • @r A AsyncResult object.
  • get_cancellable ()

    Gets the cancellable for the current operation. This is the GCancellable that was passed to [func@content_serialize_async].

  • get_mime_type ()

    Gets the mime type to serialize to.

  • get_output_stream ()

    Gets the output stream for the current operation. This is the stream that was passed to [func@content_serialize_async].

  • get_priority ()

    Gets the I/O priority for the current operation. This is the priority that was passed to [func@content_serialize_async].

  • get_task_data ()

    Gets the data that was associated with the current operation. See [method@Gdk.ContentSerializer.set_task_data].

  • get_user_data ()

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

  • get_value ()

    Gets the GValue to read the object to serialize from.

  • return_error (object error)

    Indicate that the serialization has ended with an error. This function consumes @error.

    • @p error is a GError.
    • @r None.
  • return_success ()

    Indicate that the serialization has been successfully completed.

    • @r None.