Class FT_Palette_Data

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class FT_Palette_Data extends Struct<FT_Palette_Data> implements NativeResource

 struct FT_Palette_Data {
     FT_UShort num_palettes;
     FT_UShort const * palette_name_ids;
     FT_UShort const * palette_flags;
     FT_UShort num_palette_entries;
     FT_UShort const * palette_entry_name_ids;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • NUM_PALETTES

      public static final int NUM_PALETTES
      The struct member offsets.
    • PALETTE_NAME_IDS

      public static final int PALETTE_NAME_IDS
      The struct member offsets.
    • PALETTE_FLAGS

      public static final int PALETTE_FLAGS
      The struct member offsets.
    • NUM_PALETTE_ENTRIES

      public static final int NUM_PALETTE_ENTRIES
      The struct member offsets.
    • PALETTE_ENTRY_NAME_IDS

      public static final int PALETTE_ENTRY_NAME_IDS
      The struct member offsets.
  • Constructor Details

    • FT_Palette_Data

      public FT_Palette_Data(ByteBuffer container)
      Creates a FT_Palette_Data instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<FT_Palette_Data>
    • num_palettes

      public short num_palettes()
      Returns:
      the value of the num_palettes field.
    • palette_name_ids

      public @Nullable ShortBuffer palette_name_ids()
      Returns:
      a ShortBuffer view of the data pointed to by the palette_name_ids field.
    • palette_flags

      public @Nullable ShortBuffer palette_flags()
      Returns:
      a ShortBuffer view of the data pointed to by the palette_flags field.
    • num_palette_entries

      public short num_palette_entries()
      Returns:
      the value of the num_palette_entries field.
    • palette_entry_name_ids

      public @Nullable ShortBuffer palette_entry_name_ids()
      Returns:
      a ShortBuffer view of the data pointed to by the palette_entry_name_ids field.
    • malloc

      public static FT_Palette_Data malloc()
      Returns a new FT_Palette_Data instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static FT_Palette_Data calloc()
      Returns a new FT_Palette_Data instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static FT_Palette_Data create()
      Returns a new FT_Palette_Data instance allocated with BufferUtils.
    • create

      public static FT_Palette_Data create(long address)
      Returns a new FT_Palette_Data instance for the specified memory address.
    • createSafe

      public static @Nullable FT_Palette_Data createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static FT_Palette_Data.Buffer malloc(int capacity)
      Returns a new FT_Palette_Data.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static FT_Palette_Data.Buffer calloc(int capacity)
      Returns a new FT_Palette_Data.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static FT_Palette_Data.Buffer create(int capacity)
      Returns a new FT_Palette_Data.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static FT_Palette_Data.Buffer create(long address, int capacity)
      Create a FT_Palette_Data.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable FT_Palette_Data.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static FT_Palette_Data malloc(MemoryStack stack)
      Returns a new FT_Palette_Data instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static FT_Palette_Data calloc(MemoryStack stack)
      Returns a new FT_Palette_Data instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static FT_Palette_Data.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new FT_Palette_Data.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static FT_Palette_Data.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new FT_Palette_Data.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nnum_palettes

      public static short nnum_palettes(long struct)
      Unsafe version of num_palettes().
    • npalette_name_ids

      public static @Nullable ShortBuffer npalette_name_ids(long struct)
      Unsafe version of palette_name_ids.
    • npalette_flags

      public static @Nullable ShortBuffer npalette_flags(long struct)
      Unsafe version of palette_flags.
    • nnum_palette_entries

      public static short nnum_palette_entries(long struct)
      Unsafe version of num_palette_entries().
    • npalette_entry_name_ids

      public static @Nullable ShortBuffer npalette_entry_name_ids(long struct)
      Unsafe version of palette_entry_name_ids.