Class XrApplicationInfo

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class XrApplicationInfo extends Struct<XrApplicationInfo> implements NativeResource

 struct XrApplicationInfo {
     char applicationName[XR_MAX_APPLICATION_NAME_SIZE];
     uint32_t applicationVersion;
     char engineName[XR_MAX_ENGINE_NAME_SIZE];
     uint32_t engineVersion;
     XrVersion apiVersion;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int APPLICATIONNAME
      The struct member offsets.
    • APPLICATIONVERSION

      public static final int APPLICATIONVERSION
      The struct member offsets.
    • ENGINENAME

      public static final int ENGINENAME
      The struct member offsets.
    • ENGINEVERSION

      public static final int ENGINEVERSION
      The struct member offsets.
    • APIVERSION

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

    • XrApplicationInfo

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

      public ByteBuffer applicationName()
      Returns:
      a ByteBuffer view of the applicationName field.
    • applicationNameString

      public String applicationNameString()
      Returns:
      the null-terminated string stored in the applicationName field.
    • applicationVersion

      public int applicationVersion()
      Returns:
      the value of the applicationVersion field.
    • engineName

      public ByteBuffer engineName()
      Returns:
      a ByteBuffer view of the engineName field.
    • engineNameString

      public String engineNameString()
      Returns:
      the null-terminated string stored in the engineName field.
    • engineVersion

      public int engineVersion()
      Returns:
      the value of the engineVersion field.
    • apiVersion

      public long apiVersion()
      Returns:
      the value of the apiVersion field.
    • applicationName

      public XrApplicationInfo applicationName(ByteBuffer value)
      Copies the specified encoded string to the applicationName field.
    • applicationVersion

      public XrApplicationInfo applicationVersion(int value)
      Sets the specified value to the applicationVersion field.
    • engineName

      public XrApplicationInfo engineName(ByteBuffer value)
      Copies the specified encoded string to the engineName field.
    • engineVersion

      public XrApplicationInfo engineVersion(int value)
      Sets the specified value to the engineVersion field.
    • apiVersion

      public XrApplicationInfo apiVersion(long value)
      Sets the specified value to the apiVersion field.
    • set

      public XrApplicationInfo set(ByteBuffer applicationName, int applicationVersion, ByteBuffer engineName, int engineVersion, long apiVersion)
      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 XrApplicationInfo malloc()
      Returns a new XrApplicationInfo instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static ByteBuffer napplicationName(long struct)
      Unsafe version of applicationName().
    • napplicationNameString

      public static String napplicationNameString(long struct)
      Unsafe version of applicationNameString().
    • napplicationVersion

      public static int napplicationVersion(long struct)
      Unsafe version of applicationVersion().
    • nengineName

      public static ByteBuffer nengineName(long struct)
      Unsafe version of engineName().
    • nengineNameString

      public static String nengineNameString(long struct)
      Unsafe version of engineNameString().
    • nengineVersion

      public static int nengineVersion(long struct)
      Unsafe version of engineVersion().
    • napiVersion

      public static long napiVersion(long struct)
      Unsafe version of apiVersion().
    • napplicationName

      public static void napplicationName(long struct, ByteBuffer value)
      Unsafe version of applicationName.
    • napplicationVersion

      public static void napplicationVersion(long struct, int value)
      Unsafe version of applicationVersion.
    • nengineName

      public static void nengineName(long struct, ByteBuffer value)
      Unsafe version of engineName.
    • nengineVersion

      public static void nengineVersion(long struct, int value)
      Unsafe version of engineVersion.
    • napiVersion

      public static void napiVersion(long struct, long value)
      Unsafe version of apiVersion.