Class ContentFormatsBuilder

All Implemented Interfaces:
PointerInterface

public class ContentFormatsBuilder extends Record
A `GdkContentFormatsBuilder` is an auxiliary struct used to create
new `GdkContentFormats`, and should not be kept around.

https://docs.gtk.org/gdk4/struct.ContentFormatsBuilder.html

  • Constructor Details

    • ContentFormatsBuilder

      public ContentFormatsBuilder(PointerContainer pointer)
    • ContentFormatsBuilder

      public ContentFormatsBuilder()
      Create a new `GdkContentFormatsBuilder` object.

      The resulting builder would create an empty `GdkContentFormats`.
      Use addition functions to add types to it.
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • addFormats

      public void addFormats(@Nonnull ContentFormats formats)
      Appends all formats from @formats to @builder, skipping those that
      already exist.
      Parameters:
      formats - the formats to add
    • addGtype

      public void addGtype(long type)
      Appends @type to @builder if it has not already been added.
      Parameters:
      type - a `GType`
    • addMimeType

      public void addMimeType(@Nonnull Str mime_type)
      Appends @mime_type to @builder if it has not already been added.
      Parameters:
      mime_type - a mime type
    • addMimeType

      public void addMimeType(String mime_type)
      Appends @mime_type to @builder if it has not already been added.
      Parameters:
      mime_type - a mime type
    • freeToFormats

      public ContentFormats freeToFormats()
      Creates a new `GdkContentFormats` from the current state of the
      given @builder, and frees the @builder instance.
      Returns:
      the newly created `GdkContentFormats` with all the formats added to @builder
    • ref

      public ContentFormatsBuilder ref()
      Acquires a reference on the given @builder.

      This function is intended primarily for bindings.
      `GdkContentFormatsBuilder` objects should not be kept around.
      Returns:
      the given `GdkContentFormatsBuilder` with its reference count increased
    • toFormats

      public ContentFormats toFormats()
      Creates a new `GdkContentFormats` from the given @builder.

      The given `GdkContentFormatsBuilder` is reset once this function returns;
      you cannot call this function multiple times on the same @builder instance.

      This function is intended primarily for bindings. C code should use
      [method@Gdk.ContentFormatsBuilder.free_to_formats].
      Returns:
      the newly created `GdkContentFormats` with all the formats added to @builder
    • unref

      public void unref()
      Releases a reference on the given @builder.
    • 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()