Class ContentFormatsBuilder

java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gdk.ContentFormatsBuilder
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class ContentFormatsBuilder extends ProxyInstance
Creates GdkContentFormats objects.
  • Constructor Details

    • ContentFormatsBuilder

      public ContentFormatsBuilder(MemorySegment address)
      Create a ContentFormatsBuilder proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • 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

    • getType

      public static @Nullable Type getType()
      Get the GType of the ContentFormatsBuilder class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • addFormats

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

      public void addGtype(Type type)
      Appends type to this ContentFormatsBuilder if it has not already been added.
      Parameters:
      type - a GType
    • addMimeType

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

      public ContentFormats freeToFormats()
      Creates a new GdkContentFormats from the current state of the given builder, and frees the this ContentFormatsBuilder instance.
      Returns:
      the newly created GdkContentFormats with all the formats added to this ContentFormatsBuilder
    • 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 this ContentFormatsBuilder instance.

      This function is intended primarily for bindings. C code should use freeToFormats().

      Returns:
      the newly created GdkContentFormats with all the formats added to this ContentFormatsBuilder
    • unref

      public void unref()
      Releases a reference on the given builder.