Class XrApiLayerProperties

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class XrApiLayerProperties extends Struct<XrApiLayerProperties> implements NativeResource

 struct XrApiLayerProperties {
     XrStructureType type;
     void * next;
     char layerName[XR_MAX_API_LAYER_NAME_SIZE];
     XrVersion specVersion;
     uint32_t layerVersion;
     char description[XR_MAX_API_LAYER_DESCRIPTION_SIZE];
 }
  • Field Details

    • SIZEOF

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

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

      public static final int TYPE
      The struct member offsets.
    • NEXT

      public static final int NEXT
      The struct member offsets.
    • LAYERNAME

      public static final int LAYERNAME
      The struct member offsets.
    • SPECVERSION

      public static final int SPECVERSION
      The struct member offsets.
    • LAYERVERSION

      public static final int LAYERVERSION
      The struct member offsets.
    • DESCRIPTION

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

    • XrApiLayerProperties

      public XrApiLayerProperties(ByteBuffer container)
      Creates a XrApiLayerProperties 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<XrApiLayerProperties>
    • type

      public int type()
      Returns:
      the value of the type field.
    • next

      public long next()
      Returns:
      the value of the next field.
    • layerName

      public ByteBuffer layerName()
      Returns:
      a ByteBuffer view of the layerName field.
    • layerNameString

      public String layerNameString()
      Returns:
      the null-terminated string stored in the layerName field.
    • specVersion

      public long specVersion()
      Returns:
      the value of the specVersion field.
    • layerVersion

      public int layerVersion()
      Returns:
      the value of the layerVersion field.
    • description

      public ByteBuffer description()
      Returns:
      a ByteBuffer view of the description field.
    • descriptionString

      public String descriptionString()
      Returns:
      the null-terminated string stored in the description field.
    • type

      public XrApiLayerProperties type(int value)
      Sets the specified value to the type field.
    • type$Default

      public XrApiLayerProperties type$Default()
      Sets the TYPE_API_LAYER_PROPERTIES value to the type field.
    • next

      public XrApiLayerProperties next(long value)
      Sets the specified value to the next field.
    • set

      public XrApiLayerProperties set(int type, long next)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int ntype(long struct)
      Unsafe version of type().
    • nnext

      public static long nnext(long struct)
      Unsafe version of next().
    • nlayerName

      public static ByteBuffer nlayerName(long struct)
      Unsafe version of layerName().
    • nlayerNameString

      public static String nlayerNameString(long struct)
      Unsafe version of layerNameString().
    • nspecVersion

      public static long nspecVersion(long struct)
      Unsafe version of specVersion().
    • nlayerVersion

      public static int nlayerVersion(long struct)
      Unsafe version of layerVersion().
    • ndescription

      public static ByteBuffer ndescription(long struct)
      Unsafe version of description().
    • ndescriptionString

      public static String ndescriptionString(long struct)
      Unsafe version of descriptionString().
    • ntype

      public static void ntype(long struct, int value)
      Unsafe version of type.
    • nnext

      public static void nnext(long struct, long value)
      Unsafe version of next.