Class FT_Open_Args

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class FT_Open_Args extends Struct<FT_Open_Args> implements NativeResource

 struct FT_Open_Args {
     FT_UInt flags;
     FT_Byte const * memory_base;
     FT_Long memory_size;
     FT_String * pathname;
     {@link FT_Stream FT_Stream} stream;
     FT_Module driver;
     FT_Int num_params;
     {@link FT_Parameter FT_Parameter} * params;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int FLAGS
      The struct member offsets.
    • MEMORY_BASE

      public static final int MEMORY_BASE
      The struct member offsets.
    • MEMORY_SIZE

      public static final int MEMORY_SIZE
      The struct member offsets.
    • PATHNAME

      public static final int PATHNAME
      The struct member offsets.
    • STREAM

      public static final int STREAM
      The struct member offsets.
    • DRIVER

      public static final int DRIVER
      The struct member offsets.
    • NUM_PARAMS

      public static final int NUM_PARAMS
      The struct member offsets.
    • PARAMS

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

    • FT_Open_Args

      public FT_Open_Args(ByteBuffer container)
      Creates a FT_Open_Args 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_Open_Args>
    • flags

      public int flags()
      Returns:
      the value of the flags field.
    • memory_base

      public @Nullable ByteBuffer memory_base()
      Returns:
      a ByteBuffer view of the data pointed to by the memory_base field.
    • memory_size

      public long memory_size()
      Returns:
      the value of the memory_size field.
    • pathname

      public @Nullable ByteBuffer pathname()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the pathname field.
    • pathnameString

      public @Nullable String pathnameString()
      Returns:
      the null-terminated string pointed to by the pathname field.
    • stream$

      public @Nullable FT_Stream stream$()
      Returns:
      a FT_Stream view of the struct pointed to by the stream field.
    • driver

      public long driver()
      Returns:
      the value of the driver field.
    • num_params

      public int num_params()
      Returns:
      the value of the num_params field.
    • params

      public @Nullable FT_Parameter.Buffer params()
      Returns:
      a FT_Parameter.Buffer view of the struct array pointed to by the params field.
    • flags

      public FT_Open_Args flags(int value)
      Sets the specified value to the flags field.
    • memory_base

      public FT_Open_Args memory_base(@Nullable ByteBuffer value)
      Sets the address of the specified ByteBuffer to the memory_base field.
    • memory_size

      public FT_Open_Args memory_size(long value)
      Sets the specified value to the memory_size field.
    • pathname

      public FT_Open_Args pathname(@Nullable ByteBuffer value)
      Sets the address of the specified encoded string to the pathname field.
    • stream$

      public FT_Open_Args stream$(@Nullable FT_Stream value)
      Sets the address of the specified FT_Stream to the stream field.
    • driver

      public FT_Open_Args driver(long value)
      Sets the specified value to the driver field.
    • num_params

      public FT_Open_Args num_params(int value)
      Sets the specified value to the num_params field.
    • params

      public FT_Open_Args params(@Nullable FT_Parameter.Buffer value)
      Sets the address of the specified FT_Parameter.Buffer to the params field.
    • set

      public FT_Open_Args set(int flags, @Nullable ByteBuffer memory_base, long memory_size, @Nullable ByteBuffer pathname, @Nullable FT_Stream stream$, long driver, int num_params, @Nullable FT_Parameter.Buffer params)
      Initializes this struct with the specified values.
    • set

      public FT_Open_Args set(FT_Open_Args src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

      public static FT_Open_Args calloc(MemoryStack stack)
      Returns a new FT_Open_Args 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_Open_Args.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new FT_Open_Args.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static FT_Open_Args.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new FT_Open_Args.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
    • nflags

      public static int nflags(long struct)
      Unsafe version of flags().
    • nmemory_base

      public static @Nullable ByteBuffer nmemory_base(long struct)
      Unsafe version of memory_base.
    • nmemory_size

      public static long nmemory_size(long struct)
      Unsafe version of memory_size().
    • npathname

      public static @Nullable ByteBuffer npathname(long struct)
      Unsafe version of pathname().
    • npathnameString

      public static @Nullable String npathnameString(long struct)
      Unsafe version of pathnameString().
    • nstream$

      public static @Nullable FT_Stream nstream$(long struct)
      Unsafe version of stream$().
    • ndriver

      public static long ndriver(long struct)
      Unsafe version of driver().
    • nnum_params

      public static int nnum_params(long struct)
      Unsafe version of num_params().
    • nparams

      public static @Nullable FT_Parameter.Buffer nparams(long struct)
      Unsafe version of params().
    • nflags

      public static void nflags(long struct, int value)
      Unsafe version of flags.
    • nmemory_base

      public static void nmemory_base(long struct, @Nullable ByteBuffer value)
      Unsafe version of memory_base.
    • nmemory_size

      public static void nmemory_size(long struct, long value)
      Sets the specified value to the memory_size field of the specified struct.
    • npathname

      public static void npathname(long struct, @Nullable ByteBuffer value)
      Unsafe version of pathname.
    • nstream$

      public static void nstream$(long struct, @Nullable FT_Stream value)
      Unsafe version of stream$.
    • ndriver

      public static void ndriver(long struct, long value)
      Unsafe version of driver.
    • nnum_params

      public static void nnum_params(long struct, int value)
      Sets the specified value to the num_params field of the specified struct.
    • nparams

      public static void nparams(long struct, @Nullable FT_Parameter.Buffer value)
      Unsafe version of params.