Class BytesIcon

All Implemented Interfaces:
Icon, LoadableIcon, Proxy

@Generated("org.javagi.JavaGI") public class BytesIcon extends GObject implements Icon, LoadableIcon
GBytesIcon specifies an image held in memory in a common format (usually PNG) to be used as icon.
Since:
2.38
  • Constructor Details

    • BytesIcon

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

      public BytesIcon(byte[] bytes)

      Creates a new icon for a bytes.

      This cannot fail, but loading and interpreting the bytes may fail later on (for example, if g_loadable_icon_load() is called) if the image is invalid.

      Parameters:
      bytes - a GBytes.
      Since:
      2.38
    • BytesIcon

      public BytesIcon()
      Create a new BytesIcon.
  • Method Details

    • getType

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

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

      protected BytesIcon asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • getBytes

      public byte[] getBytes()
      Gets the GBytes associated with the given icon.
      Returns:
      a GBytes.
      Since:
      2.38
    • builder

      public static BytesIcon.Builder<? extends BytesIcon.Builder> builder()
      A BytesIcon.Builder object constructs a BytesIcon with the specified properties. Use the various set...() methods to set properties, and finish construction with BytesIcon.Builder.build().
      Returns:
      the builder object