Subaction paths are a mechanism that enables applications to use the same action name and handle on multiple devices. Applications can query action state using subaction paths that differentiate data coming from each device. This allows the runtime to group logically equivalent actions together in system UI. For instance, an application could create a single actionname:pick_up action with the pathname:/user/hand/left and pathname:/user/hand/right subaction paths and use the subaction paths to independently query the state of actionname:pick_up_with_left_hand and actionname:pick_up_with_right_hand.
Applications can create actions with or without the subactionPaths set to a list of paths. If this list of paths is omitted (i.e. subactionPaths is set to NULL, and countSubactionPaths is set to 0), the application is opting out of filtering action results by subaction paths and any call to get action data must also omit subaction paths.
If subactionPaths is specified and any of the following conditions are not satisfied, the runtime must return ERROR_PATH_UNSUPPORTED:
Extensions may append additional top level user paths to the above list.
Earlier revisions of the spec mentioned pathname:/user but it could not be implemented as specified and was removed as errata.
The runtime must return ERROR_PATH_UNSUPPORTED in the following circumstances:
xrGetActionState* or a haptic function with an empty subaction path array.xrGetActionState* or a haptic function with a subaction path that was not specified when the action was created.If actionName or localizedActionName are empty strings, the runtime must return ERROR_NAME_INVALID or ERROR_LOCALIZED_NAME_INVALID respectively. If actionName or localizedActionName are duplicates of the corresponding field for any existing action in the specified action set, the runtime must return ERROR_NAME_DUPLICATED or ERROR_LOCALIZED_NAME_DUPLICATED respectively. If the conflicting action is destroyed, the conflicting field is no longer considered duplicated. If actionName contains characters which are not allowed in a single level of a well-formed path string, the runtime must return ERROR_PATH_FORMAT_INVALID.
type must be TYPE_ACTION_CREATE_INFOnext must be NULL or a valid pointer to the next structure in a structure chainactionName must be a null-terminated UTF-8 string whose length is less than or equal to MAX_ACTION_NAME_SIZEactionType must be a valid XrActionType valuecountSubactionPaths is not 0, subactionPaths must be a pointer to an array of countSubactionPaths valid XrPath valueslocalizedActionName must be a null-terminated UTF-8 string whose length is less than or equal to MAX_LOCALIZED_ACTION_NAME_SIZE
struct XrActionCreateInfo {
XrStructureType type;
void const * next;
char actionName[XR_MAX_ACTION_NAME_SIZE];
XrActionType actionType;
uint32_t countSubactionPaths;
XrPath const * subactionPaths;
char localizedActionName[XR_MAX_LOCALIZED_ACTION_NAME_SIZE];
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | XrActionCreateInfo.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ACTIONNAME
The struct member offsets. |
| public static final int | ACTIONTYPE
The struct member offsets. |
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | COUNTSUBACTIONPATHS
The struct member offsets. |
| public static final int | LOCALIZEDACTIONNAME
The struct member offsets. |
| public static final int | NEXT
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | SUBACTIONPATHS
The struct member offsets. |
| public static final int | TYPE
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | XrActionCreateInfo(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public ByteBuffer | |
| public XrActionCreateInfo | |
| public String | |
| public int | |
| public XrActionCreateInfo | |
| public static XrActionCreateInfo | |
| public static XrActionCreateInfo. | calloc(int
the buffer capacity capacity)Returns a new |
| public static XrActionCreateInfo | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static XrActionCreateInfo. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public int | |
| public XrActionCreateInfo | |
| protected XrActionCreateInfo | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static XrActionCreateInfo | |
| public static XrActionCreateInfo | |
| public static XrActionCreateInfo. | create(int
the buffer capacity capacity)Returns a new |
| public static XrActionCreateInfo. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static XrActionCreateInfo | |
| public static XrActionCreateInfo. | |
| public ByteBuffer | localizedActionName()
an array containing a |
| public XrActionCreateInfo | localizedActionName(ByteBuffer value)
Copies the specified encoded string to the |
| public String | localizedActionNameString()
an array containing a |
| public static XrActionCreateInfo | |
| public static XrActionCreateInfo. | malloc(int
the buffer capacity capacity)Returns a new |
| public static XrActionCreateInfo | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static XrActionCreateInfo. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static ByteBuffer | |
| public static void | |
| public static String | |
| public static int | |
| public static void | |
| public static int | |
| public static void | ncountSubactionPaths(long struct, int value)
Sets the specified value to the |
| public long | |
| public XrActionCreateInfo | |
| public static ByteBuffer | |
| public static void | |
| public static String | |
| public static long | |
| public static void | |
| public static LongBuffer | |
| public static void | |
| public static int | |
| public static void | |
| public XrActionCreateInfo | set(int type, long next, ByteBuffer actionName, int actionType, int countSubactionPaths, LongBuffer subactionPaths, ByteBuffer localizedActionName)
Initializes this struct with the specified values. |
| public XrActionCreateInfo | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public LongBuffer | |
| public XrActionCreateInfo | subactionPaths(LongBuffer value)
Sets the address of the specified |
| public int | |
| public XrActionCreateInfo | |
| public XrActionCreateInfo |
| ACTIONNAME | back to summary |
|---|---|
| public static final int ACTIONNAME The struct member offsets. | |
| ACTIONTYPE | back to summary |
|---|---|
| public static final int ACTIONTYPE The struct member offsets. | |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| COUNTSUBACTIONPATHS | back to summary |
|---|---|
| public static final int COUNTSUBACTIONPATHS The struct member offsets. | |
| LOCALIZEDACTIONNAME | back to summary |
|---|---|
| public static final int LOCALIZEDACTIONNAME The struct member offsets. | |
| NEXT | back to summary |
|---|---|
| public static final int NEXT The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| SUBACTIONPATHS | back to summary |
|---|---|
| public static final int SUBACTIONPATHS The struct member offsets. | |
| TYPE | back to summary |
|---|---|
| public static final int TYPE The struct member offsets. | |
| XrActionCreateInfo | back to summary |
|---|---|
| protected XrActionCreateInfo(long address, ByteBuffer container) | |
| XrActionCreateInfo | back to summary |
|---|---|
| public XrActionCreateInfo(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| actionName | back to summary |
|---|---|
| public ByteBuffer actionName() an array containing a
| |
| actionName | back to summary |
|---|---|
| public XrActionCreateInfo actionName(ByteBuffer value) Copies the specified encoded string to the | |
| actionNameString | back to summary |
|---|---|
| public String actionNameString() an array containing a
| |
| actionType | back to summary |
|---|---|
| public int actionType() the
| |
| actionType | back to summary |
|---|---|
| public XrActionCreateInfo actionType(int value) Sets the specified value to the | |
| calloc | back to summary |
|---|---|
| public static XrActionCreateInfo calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static XrActionCreateInfo. Returns a new
| |
| calloc | back to summary |
|---|---|
| public static XrActionCreateInfo calloc(MemoryStack stack) Returns a new
| |
| calloc | back to summary |
|---|---|
| public static XrActionCreateInfo. Returns a new
| |
| countSubactionPaths | back to summary |
|---|---|
| public int countSubactionPaths() the number of elements in the
| |
| countSubactionPaths | back to summary |
|---|---|
| public XrActionCreateInfo countSubactionPaths(int value) Sets the specified value to the | |
| create | back to summary |
|---|---|
| protected XrActionCreateInfo create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static XrActionCreateInfo create() Returns a new | |
| create | back to summary |
|---|---|
| public static XrActionCreateInfo create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static XrActionCreateInfo. Returns a new
| |
| create | back to summary |
|---|---|
| public static XrActionCreateInfo. Create a
| |
| createSafe | back to summary |
|---|---|
| public static XrActionCreateInfo createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static XrActionCreateInfo. Like
| |
| localizedActionName | back to summary |
|---|---|
| public ByteBuffer localizedActionName() an array containing a
| |
| localizedActionName | back to summary |
|---|---|
| public XrActionCreateInfo localizedActionName(ByteBuffer value) Copies the specified encoded string to the | |
| localizedActionNameString | back to summary |
|---|---|
| public String localizedActionNameString() an array containing a
| |
| malloc | back to summary |
|---|---|
| public static XrActionCreateInfo malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static XrActionCreateInfo. Returns a new
| |
| malloc | back to summary |
|---|---|
| public static XrActionCreateInfo malloc(MemoryStack stack) Returns a new
| |
| malloc | back to summary |
|---|---|
| public static XrActionCreateInfo. Returns a new
| |
| nactionName | back to summary |
|---|---|
| public static ByteBuffer nactionName(long struct) Unsafe version of | |
| nactionName | back to summary |
|---|---|
| public static void nactionName(long struct, ByteBuffer value) Unsafe version of | |
| nactionNameString | back to summary |
|---|---|
| public static String nactionNameString(long struct) Unsafe version of | |
| nactionType | back to summary |
|---|---|
| public static int nactionType(long struct) Unsafe version of | |
| nactionType | back to summary |
|---|---|
| public static void nactionType(long struct, int value) Unsafe version of | |
| ncountSubactionPaths | back to summary |
|---|---|
| public static int ncountSubactionPaths(long struct) Unsafe version of | |
| ncountSubactionPaths | back to summary |
|---|---|
| public static void ncountSubactionPaths(long struct, int value) Sets the specified value to the | |
| next | back to summary |
|---|---|
| public long next()
| |
| next | back to summary |
|---|---|
| public XrActionCreateInfo next(long value) Sets the specified value to the | |
| nlocalizedActionName | back to summary |
|---|---|
| public static ByteBuffer nlocalizedActionName(long struct) Unsafe version of | |
| nlocalizedActionName | back to summary |
|---|---|
| public static void nlocalizedActionName(long struct, ByteBuffer value) Unsafe version of | |
| nlocalizedActionNameString | back to summary |
|---|---|
| public static String nlocalizedActionNameString(long struct) Unsafe version of | |
| nnext | back to summary |
|---|---|
| public static long nnext(long struct) Unsafe version of | |
| nnext | back to summary |
|---|---|
| public static void nnext(long struct, long value) Unsafe version of | |
| nsubactionPaths | back to summary |
|---|---|
| public static LongBuffer nsubactionPaths(long struct) Unsafe version of
| |
| nsubactionPaths | back to summary |
|---|---|
| public static void nsubactionPaths(long struct, LongBuffer value) Unsafe version of | |
| ntype | back to summary |
|---|---|
| public static int ntype(long struct) Unsafe version of | |
| ntype | back to summary |
|---|---|
| public static void ntype(long struct, int value) Unsafe version of | |
| set | back to summary |
|---|---|
| public XrActionCreateInfo set(int type, long next, ByteBuffer actionName, int actionType, int countSubactionPaths, LongBuffer subactionPaths, ByteBuffer localizedActionName) Initializes this struct with the specified values. | |
| set | back to summary |
|---|---|
| public XrActionCreateInfo set(XrActionCreateInfo src) Copies the specified struct data to this struct.
| |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
| subactionPaths | back to summary |
|---|---|
| public LongBuffer subactionPaths() an array of
| |
| subactionPaths | back to summary |
|---|---|
| public XrActionCreateInfo subactionPaths(LongBuffer value) Sets the address of the specified | |
| type | back to summary |
|---|---|
| public int type() the
| |
| type | back to summary |
|---|---|
| public XrActionCreateInfo type(int value) Sets the specified value to the | |
| type$Default | back to summary |
|---|---|
| public XrActionCreateInfo type$Default() Sets the | |
XrActionCreateInfo structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final XrActionCreateInfo |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final XrActionCreateInfo ELEMENT_FACTORY | |
| Buffer | back to summary |
|---|---|
| public Buffer(ByteBuffer container) Creates a new Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
by The created buffer instance holds a strong reference to the container object. | |
| Buffer | back to summary |
|---|---|
| public Buffer(long address, int cap) | |
| Buffer | back to summary |
|---|---|
| pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) | |
| actionName | back to summary |
|---|---|
public ByteBuffer actionName()
| |
| actionName | back to summary |
|---|---|
| public XrActionCreateInfo. Copies the specified encoded string to the | |
| actionNameString | back to summary |
|---|---|
public String actionNameString()
| |
| actionType | back to summary |
|---|---|
public int actionType()
| |
| actionType | back to summary |
|---|---|
| public XrActionCreateInfo. Sets the specified value to the | |
| countSubactionPaths | back to summary |
|---|---|
public int countSubactionPaths()
| |
| countSubactionPaths | back to summary |
|---|---|
| public XrActionCreateInfo. Sets the specified value to the | |
| getElementFactory | back to summary |
|---|---|
| protected XrActionCreateInfo getElementFactory() Implements abstract org.
| |
| localizedActionName | back to summary |
|---|---|
public ByteBuffer localizedActionName()
| |
| localizedActionName | back to summary |
|---|---|
| public XrActionCreateInfo. Copies the specified encoded string to the | |
| localizedActionNameString | back to summary |
|---|---|
public String localizedActionNameString()
| |
| next | back to summary |
|---|---|
public long next()
| |
| next | back to summary |
|---|---|
| public XrActionCreateInfo. Sets the specified value to the | |
| self | back to summary |
|---|---|
| protected XrActionCreateInfo. Implements abstract org.
| |
| subactionPaths | back to summary |
|---|---|
public LongBuffer subactionPaths()
| |
| subactionPaths | back to summary |
|---|---|
| public XrActionCreateInfo. Sets the address of the specified | |
| type | back to summary |
|---|---|
public int type()
| |
| type | back to summary |
|---|---|
| public XrActionCreateInfo. Sets the specified value to the | |
| type$Default | back to summary |
|---|---|
| public XrActionCreateInfo. Sets the | |