Class PixbufFormat

java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gdkpixbuf.PixbufFormat
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class PixbufFormat extends ProxyInstance

A GdkPixbufFormat contains information about the image format accepted by a module.

Only modules should access the fields directly, applications should use the gdk_pixbuf_format_* family of functions.

Since:
2.2
  • Constructor Details

    • PixbufFormat

      public PixbufFormat(MemorySegment address)
      Create a PixbufFormat proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • PixbufFormat

      public PixbufFormat(Arena arena)
      Allocate a new PixbufFormat.
      Parameters:
      arena - to control the memory allocation scope
    • PixbufFormat

      public PixbufFormat()
      Allocate a new PixbufFormat. The memory is allocated with Arena.ofAuto().
    • PixbufFormat

      public PixbufFormat(String name, PixbufModulePattern signature, String domain, String description, String[] mimeTypes, String[] extensions, int flags, boolean disabled, String license, Arena arena)
      Allocate a new PixbufFormat with the fields set to the provided values.
      Parameters:
      name - value for the field name
      signature - value for the field signature
      domain - value for the field domain
      description - value for the field description
      mimeTypes - value for the field mimeTypes
      extensions - value for the field extensions
      flags - value for the field flags
      disabled - value for the field disabled
      license - value for the field license
      arena - to control the memory allocation scope
    • PixbufFormat

      public PixbufFormat(String name, PixbufModulePattern signature, String domain, String description, String[] mimeTypes, String[] extensions, int flags, boolean disabled, String license)
      Allocate a new PixbufFormat with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      name - value for the field name
      signature - value for the field signature
      domain - value for the field domain
      description - value for the field description
      mimeTypes - value for the field mimeTypes
      extensions - value for the field extensions
      flags - value for the field flags
      disabled - value for the field disabled
      license - value for the field license
  • Method Details

    • getType

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

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

      public String readName()
      Read the value of the field name.
      Returns:
      The value of the field name
    • writeName

      public void writeName(String name, Arena _arena)
      Write a value in the field name.
      Parameters:
      name - The new value for the field name
      _arena - to control the memory allocation scope
    • readSignature

      public PixbufModulePattern readSignature()
      Read the value of the field signature.
      Returns:
      The value of the field signature
    • writeSignature

      public void writeSignature(PixbufModulePattern signature)
      Write a value in the field signature.
      Parameters:
      signature - The new value for the field signature
    • readDomain

      public String readDomain()
      Read the value of the field domain.
      Returns:
      The value of the field domain
    • writeDomain

      public void writeDomain(String domain, Arena _arena)
      Write a value in the field domain.
      Parameters:
      domain - The new value for the field domain
      _arena - to control the memory allocation scope
    • readDescription

      public String readDescription()
      Read the value of the field description.
      Returns:
      The value of the field description
    • writeDescription

      public void writeDescription(String description, Arena _arena)
      Write a value in the field description.
      Parameters:
      description - The new value for the field description
      _arena - to control the memory allocation scope
    • readMimeTypes

      public @Nullable String @Nullable [] readMimeTypes()
      Read the value of the field mime_types.
      Returns:
      The value of the field mime_types
    • writeMimeTypes

      public void writeMimeTypes(@Nullable String @Nullable [] mimeTypes, Arena _arena)
      Write a value in the field mime_types.
      Parameters:
      mimeTypes - The new value for the field mime_types
      _arena - to control the memory allocation scope
    • readExtensions

      public @Nullable String @Nullable [] readExtensions()
      Read the value of the field extensions.
      Returns:
      The value of the field extensions
    • writeExtensions

      public void writeExtensions(@Nullable String @Nullable [] extensions, Arena _arena)
      Write a value in the field extensions.
      Parameters:
      extensions - The new value for the field extensions
      _arena - to control the memory allocation scope
    • readFlags

      public int readFlags()
      Read the value of the field flags.
      Returns:
      The value of the field flags
    • writeFlags

      public void writeFlags(int flags)
      Write a value in the field flags.
      Parameters:
      flags - The new value for the field flags
    • readDisabled

      public boolean readDisabled()
      Read the value of the field disabled.
      Returns:
      The value of the field disabled
    • writeDisabled

      public void writeDisabled(boolean disabled)
      Write a value in the field disabled.
      Parameters:
      disabled - The new value for the field disabled
    • readLicense

      public String readLicense()
      Read the value of the field license.
      Returns:
      The value of the field license
    • writeLicense

      public void writeLicense(String license, Arena _arena)
      Write a value in the field license.
      Parameters:
      license - The new value for the field license
      _arena - to control the memory allocation scope
    • copy

      public @Nullable PixbufFormat copy()
      Creates a copy of format.
      Returns:
      the newly allocated copy of a GdkPixbufFormat. Use gdk_pixbuf_format_free() to free the resources when done
      Since:
      2.22
    • free

      public void free()
      Frees the resources allocated when copying a GdkPixbufFormat using gdk_pixbuf_format_copy()
      Since:
      2.22
    • getDescription

      public @Nullable String getDescription()
      Returns a description of the format.
      Returns:
      a description of the format.
      Since:
      2.2
    • getExtensions

      public @Nullable String @Nullable [] getExtensions()
      Returns the filename extensions typically used for files in the given format.
      Returns:
      an array of filename extensions
      Since:
      2.2
    • getLicense

      public @Nullable String getLicense()

      Returns information about the license of the image loader for the format.

      The returned string should be a shorthand for a well known license, e.g. "LGPL", "GPL", "QPL", "GPL/QPL", or "other" to indicate some other license.

      Returns:
      a string describing the license of the pixbuf format
      Since:
      2.6
    • getMimeTypes

      public @Nullable String @Nullable [] getMimeTypes()
      Returns the mime types supported by the format.
      Returns:
      an array of mime types
      Since:
      2.2
    • getName

      public @Nullable String getName()
      Returns the name of the format.
      Returns:
      the name of the format.
      Since:
      2.2
    • isDisabled

      public boolean isDisabled()

      Returns whether this image format is disabled.

      See gdk_pixbuf_format_set_disabled().

      Returns:
      whether this image format is disabled.
      Since:
      2.6
    • isSaveOptionSupported

      public boolean isSaveOptionSupported(String optionKey)

      Returns TRUE if the save option specified by optionKey is supported when saving a pixbuf using the module implementing format.

      See gdk_pixbuf_save() for more information about option keys.

      Parameters:
      optionKey - the name of an option
      Returns:
      TRUE if the specified option is supported
      Since:
      2.36
    • isScalable

      public boolean isScalable()

      Returns whether this image format is scalable.

      If a file is in a scalable format, it is preferable to load it at the desired size, rather than loading it at the default size and scaling the resulting pixbuf to the desired size.

      Returns:
      whether this image format is scalable.
      Since:
      2.6
    • isWritable

      public boolean isWritable()
      Returns whether pixbufs can be saved in the given format.
      Returns:
      whether pixbufs can be saved in the given format.
      Since:
      2.2
    • setDisabled

      public void setDisabled(boolean disabled)

      Disables or enables an image format.

      If a format is disabled, GdkPixbuf won't use the image loader for this format to load images.

      Applications can use this to avoid using image loaders with an inappropriate license, see gdk_pixbuf_format_get_license().

      Parameters:
      disabled - TRUE to disable the format this PixbufFormat
      Since:
      2.6