openxr-0.1: Bindings to the OpenXR API
Safe HaskellNone
LanguageHaskell2010

OpenXR.Core10.Input

Synopsis

Documentation

getActionStateBoolean Source #

Arguments

:: forall io. MonadIO io 
=> Session

session is the Session to query.

session must be a valid Session handle

-> ActionStateGetInfo

getInfo is a pointer to ActionStateGetInfo to provide action and subaction paths information.

getInfo must be a pointer to a valid ActionStateGetInfo structure

-> io (Result, ActionStateBoolean) 

getActionStateFloat Source #

Arguments

:: forall io. MonadIO io 
=> Session

session is the Session to query.

session must be a valid Session handle

-> ActionStateGetInfo

getInfo is a pointer to ActionStateGetInfo to provide action and subaction paths information.

getInfo must be a pointer to a valid ActionStateGetInfo structure

-> io (Result, ActionStateFloat) 

getActionStateVector2f Source #

Arguments

:: forall io. MonadIO io 
=> Session

session is the Session to query.

session must be a valid Session handle

-> ActionStateGetInfo

getInfo is a pointer to ActionStateGetInfo to provide action and subaction paths information.

getInfo must be a pointer to a valid ActionStateGetInfo structure

-> io (Result, ActionStateVector2f) 

getActionStatePose Source #

Arguments

:: forall io. MonadIO io 
=> Session

session is the Session to query.

session must be a valid Session handle

-> ActionStateGetInfo

getInfo is a pointer to ActionStateGetInfo to provide action and subaction paths information.

getInfo must be a pointer to a valid ActionStateGetInfo structure

-> io (Result, ActionStatePose) 

xrGetActionStatePose - Gets metadata from a pose action

Parameter Descriptions

Description

getActionStatePose returns information about the binding and active state for the specified action. To determine the pose of this action at a historical or predicted time, the application can create an action space using createActionSpace. Then, after each sync, the application can locate the pose of this action space within a base space using locateSpace.

Return Codes

Success
Failure

See Also

ActionStateGetInfo, ActionStatePose, Session, createAction, createActionSpace

createActionSet Source #

Arguments

:: forall io. MonadIO io 
=> Instance

instance is a handle to an Instance.

instance must be a valid Instance handle

-> ActionSetCreateInfo

createInfo is a pointer to a valid ActionSetCreateInfo structure that defines the action set being created.

createInfo must be a pointer to a valid ActionSetCreateInfo structure

-> io ActionSet 

withActionSet :: forall io r. MonadIO io => Instance -> ActionSetCreateInfo -> (io ActionSet -> (ActionSet -> io ()) -> r) -> r Source #

A convenience wrapper to make a compatible pair of calls to createActionSet and destroyActionSet

To ensure that destroyActionSet is always called: pass bracket (or the allocate function from your favourite resource management library) as the last argument. To just extract the pair pass (,) as the last argument.

destroyActionSet Source #

Arguments

:: forall io. MonadIO io 
=> ActionSet

actionSet is the action set to destroy.

-> io () 

xrDestroyActionSet - Destroys an XrActionSet

Parameter Descriptions

Description

Action set handles can be destroyed by calling destroyActionSet. When an action set handle is destroyed, all handles of actions in that action set are also destroyed.

The implementation must not free underlying resources for the action set while there are other valid handles that refer to those resources. The implementation may release resources for an action set when all of the action spaces for actions in that action set have been destroyed. See Action Spaces Lifetime for details.

Resources for all action sets in an instance must be freed when the instance containing those actions sets is destroyed.

Valid Usage (Implicit)

Thread Safety

  • Access to actionSet, and any child handles, must be externally synchronized

Return Codes

Success
Failure

See Also

ActionSet, createActionSet

createAction Source #

Arguments

:: forall io. MonadIO io 
=> ActionSet

actionSet is a handle to an ActionSet.

actionSet must be a valid ActionSet handle

-> ActionCreateInfo

createInfo is a pointer to a valid ActionCreateInfo structure that defines the action being created.

createInfo must be a pointer to a valid ActionCreateInfo structure

-> io Action 

withAction :: forall io r. MonadIO io => ActionSet -> ActionCreateInfo -> (io Action -> (Action -> io ()) -> r) -> r Source #

A convenience wrapper to make a compatible pair of calls to createAction and destroyAction

To ensure that destroyAction is always called: pass bracket (or the allocate function from your favourite resource management library) as the last argument. To just extract the pair pass (,) as the last argument.

destroyAction Source #

Arguments

:: forall io. MonadIO io 
=> Action

action is the action to destroy.

-> io () 

xrDestroyAction - Destroys an XrAction

Parameter Descriptions

Description

Action handles can be destroyed by calling destroyAction. Handles for actions that are part of an action set are automatically destroyed when the action set’s handle is destroyed.

The implementation must not destroy the underlying resources for an action when destroyAction is called. Those resources are still used to make action spaces locatable and when processing action priority in syncActions. Destroying the action handle removes the application’s access to these resources, but has no other change on actions.

Resources for all actions in an instance must be freed when the instance containing those actions sets is destroyed.

Valid Usage (Implicit)

  • action must be a valid Action handle

Thread Safety

  • Access to action, and any child handles, must be externally synchronized

Return Codes

Success
Failure

See Also

Action, createAction

suggestInteractionProfileBindings Source #

Arguments

:: forall a io. (Extendss InteractionProfileSuggestedBinding a, PokeChain a, MonadIO io) 
=> Instance

instance is the Instance for which the application would like to set suggested bindings

instance must be a valid Instance handle

-> ("suggestedBindings" ::: InteractionProfileSuggestedBinding a)

suggestedBindings is the InteractionProfileSuggestedBinding that the application would like to set

suggestedBindings must be a pointer to a valid InteractionProfileSuggestedBinding structure

-> io () 

xrSuggestInteractionProfileBindings - Sets the application-suggested bindings for the interaction profile

Parameter Descriptions

Description

suggestInteractionProfileBindings sets an interaction profile for which the application can provide default bindings. The application can call suggestInteractionProfileBindings once per interaction profile that it supports.

The application can provide any number of bindings for each action.

If the application successfully calls suggestInteractionProfileBindings more than once for an interaction profile, the runtime must discard the previous suggested bindings and replace them with the new suggested bindings for that profile.

If the interaction profile path does not follow the structure defined in Interaction Profiles or suggested bindings contain paths that do not follow the format defined in Device input subpaths, the runtime must return ERROR_PATH_UNSUPPORTED. If the interaction profile or input source for any of the suggested bindings does not exist in the allowlist defined in Interaction Profile Paths, the runtime must return ERROR_PATH_UNSUPPORTED. A runtime must accept every valid binding in the allowlist though it is free to ignore any of them.

If the action set for any action referenced in the suggestedBindings parameter has been included in a call to attachSessionActionSets, the implementation must return ERROR_ACTIONSETS_ALREADY_ATTACHED.

Return Codes

Success
Failure

See Also

Instance, InteractionProfileSuggestedBinding

attachSessionActionSets Source #

Arguments

:: forall io. MonadIO io 
=> Session

session is the Session to attach the action sets to.

session must be a valid Session handle

-> SessionActionSetsAttachInfo

attachInfo is the SessionActionSetsAttachInfo to provide information to attach action sets to the session.

attachInfo must be a pointer to a valid SessionActionSetsAttachInfo structure

-> io Result 

xrAttachSessionActionSets - Attaches action sets to a given session

Parameter Descriptions

Description

attachSessionActionSets attaches the ActionSet handles in attachInfo.actionSets to the session. Action sets must be attached in order to be synchronized with syncActions.

When an action set is attached to a session, that action set becomes immutable. See createAction and suggestInteractionProfileBindings for details.

The runtime must return ERROR_ACTIONSETS_ALREADY_ATTACHED if attachSessionActionSets is called more than once for a given session. The runtime must return ERROR_ACTIONSET_NOT_ATTACHED for any action created after attachSessionActionSets is called for a given session if that handle is used with any call for the same session.

Return Codes

Success
Failure

See Also

Session, SessionActionSetsAttachInfo

getCurrentInteractionProfile Source #

Arguments

:: forall io. MonadIO io 
=> Session

session is the Session for which the application would like to retrieve the current interaction profile.

session must be a valid Session handle

-> ("topLevelUserPath" ::: Path)

topLevelUserPath is the top level user path the application would like to retrieve the interaction profile for.

-> io (Result, InteractionProfileState) 

xrGetCurrentInteractionProfile - Gets the current interaction profile for a top level user paths

Parameter Descriptions

Description

getCurrentInteractionProfile asks the runtime for the active interaction profiles for a top level user path.

The runtime must return only interaction profiles for which the application has provided bindings with suggestInteractionProfileBindings. The runtime may return interaction profiles that do not represent physically present hardware, for example if the runtime is using a known interaction profile to bind to hardware that the application is not aware of. The runtime may return the last-known interaction profile in the event that no controllers are active.

If attachSessionActionSets has not yet been called for the session, the runtime must return ERROR_ACTIONSET_NOT_ATTACHED. If topLevelUserPath is not one of the device input subpaths described in section /user paths, the runtime must return ERROR_PATH_UNSUPPORTED.

Return Codes

Success
Failure

See Also

InteractionProfileState, https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrPath, Session

syncActions Source #

Arguments

:: forall io. MonadIO io 
=> Session

session is a handle to the Session that all provided action set handles belong to.

session must be a valid Session handle

-> ActionsSyncInfo

syncInfo is an ActionsSyncInfo providing information to synchronize action states.

syncInfo must be a pointer to a valid ActionsSyncInfo structure

-> io Result 

xrSyncActions - Updates the current state of input actions

Parameter Descriptions

Description

syncActions updates the current state of input actions. Repeated input action state queries between subsequent synchronization calls must return the same values. The ActionSet structures referenced in the syncInfo.activeActionSets must have been previously attached to the session via attachSessionActionSets. If any action sets not attached to this session are passed to syncActions it must return ERROR_ACTIONSET_NOT_ATTACHED. Subsets of the bound action sets can be synchronized in order to control which actions are seen as active.

If session is not focused, the runtime must return SESSION_NOT_FOCUSED, and all action states in the session must be inactive.

Return Codes

Success
Failure

See Also

ActionSet, ActionsSyncInfo, ActiveActionSet, Session

enumerateBoundSourcesForAction :: forall io. MonadIO io => Session -> BoundSourcesForActionEnumerateInfo -> io (Result, "sources" ::: Vector Path) Source #

xrEnumerateBoundSourcesForAction - Queries the bound input sources for an action

Parameter Descriptions

  • session is the Session being queried.
  • enumerateInfo is an BoundSourcesForActionEnumerateInfo providing the query information.
  • sourceCapacityInput is the capacity of the array, or 0 to indicate a request to retrieve the required capacity.
  • sourceCountOutput is a pointer to the count of sources, or a pointer to the required capacity in the case that sourceCapacityInput is 0.
  • sources is a pointer to an application-allocated array that will be filled with the https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrPath values for all sources. It can be NULL if sourceCapacityInput is 0.
  • See Buffer Size Parameters chapter for a detailed description of retrieving the required sources size.

Description

If an action is unbound, enumerateBoundSourcesForAction must assign 0 to the value pointed-to by sourceCountOutput and not modify the array.

enumerateBoundSourcesForAction must return ERROR_ACTIONSET_NOT_ATTACHED if passed an action in an action set never attached to the session with attachSessionActionSets.

Valid Usage (Implicit)

  • session must be a valid Session handle

Return Codes

Success
Failure

See Also

Action, BoundSourcesForActionEnumerateInfo, https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrPath, Session

getInputSourceLocalizedName :: forall io. MonadIO io => Session -> InputSourceLocalizedNameGetInfo -> io (Result, "buffer" ::: ByteString) Source #

xrGetInputSourceLocalizedName - Gets a localized source name

Parameter Descriptions

  • session is a handle to the Session associated with the action that reported this source.
  • getInfo is an InputSourceLocalizedNameGetInfo providing the query information.
  • bufferCapacityInput is the capacity of the buffer, or 0 to indicate a request to retrieve the required capacity.
  • bufferCountOutput is a pointer to the count of name characters written (including the terminating \0), or a pointer to the required capacity in the case that bufferCapacityInput is 0.
  • buffer is a pointer to an application-allocated buffer that will be filled with the source name. It can be NULL if bufferCapacityInput is 0.
  • See Buffer Size Parameters chapter for a detailed description of retrieving the required buffer size.

Description

getInputSourceLocalizedName returns a string for the input source in the current system locale.

If attachSessionActionSets has not yet been called for the session, the runtime must return ERROR_ACTIONSET_NOT_ATTACHED.

Valid Usage (Implicit)

  • session must be a valid Session handle
  • getInfo must be a pointer to a valid InputSourceLocalizedNameGetInfo structure
  • bufferCountOutput must be a pointer to a uint32_t value
  • If bufferCapacityInput is not 0, buffer must be a pointer to an array of bufferCapacityInput char values

Return Codes

Success
Failure

See Also

Action, InputSourceLocalizedNameGetInfo, Session

data Vector2f Source #

XrVector2f - Two-dimensional vector

Member Descriptions

Description

If used to represent physical distances (rather than e.g. normalized direction) and not otherwise specified, values must be in meters.

See Also

ActionStateVector2f, CompositionLayerEquirectKHR, Posef, Quaternionf, Vector3f, Vector4f, VisibilityMaskKHR, xrSetInputDeviceStateVector2fEXT

Constructors

Vector2f 

Fields

  • x :: Float

    x is the x coordinate of the vector.

  • y :: Float

    y is the y coordinate of the vector.

Instances

Instances details
Eq Vector2f Source # 
Instance details

Defined in OpenXR.Core10.Input

Show Vector2f Source # 
Instance details

Defined in OpenXR.Core10.Input

Storable Vector2f Source # 
Instance details

Defined in OpenXR.Core10.Input

Zero Vector2f Source # 
Instance details

Defined in OpenXR.Core10.Input

Methods

zero :: Vector2f #

ToCStruct Vector2f Source # 
Instance details

Defined in OpenXR.Core10.Input

FromCStruct Vector2f Source # 
Instance details

Defined in OpenXR.Core10.Input

data ActionStateBoolean Source #

XrActionStateBoolean - Boolean action state

Member Descriptions

Description

When multiple input sources are bound to this action, the currentState follows the previously defined rule to resolve ambiguity.

Valid Usage (Implicit)

See Also

https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrBool32, StructureType, https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrTime, getActionStateBoolean

Constructors

ActionStateBoolean 

Fields

Instances

Instances details
Eq ActionStateBoolean Source # 
Instance details

Defined in OpenXR.Core10.Input

Show ActionStateBoolean Source # 
Instance details

Defined in OpenXR.Core10.Input

Storable ActionStateBoolean Source # 
Instance details

Defined in OpenXR.Core10.Input

Zero ActionStateBoolean Source # 
Instance details

Defined in OpenXR.Core10.Input

ToCStruct ActionStateBoolean Source # 
Instance details

Defined in OpenXR.Core10.Input

FromCStruct ActionStateBoolean Source # 
Instance details

Defined in OpenXR.Core10.Input

data ActionStateFloat Source #

XrActionStateFloat - Floating point action state

Member Descriptions

Description

When multiple input sources are bound to this action, the currentState follows the previously defined rule to resolve ambiguity.

Valid Usage (Implicit)

See Also

https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrBool32, StructureType, https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrTime, getActionStateFloat

Constructors

ActionStateFloat 

Fields

Instances

Instances details
Eq ActionStateFloat Source # 
Instance details

Defined in OpenXR.Core10.Input

Show ActionStateFloat Source # 
Instance details

Defined in OpenXR.Core10.Input

Storable ActionStateFloat Source # 
Instance details

Defined in OpenXR.Core10.Input

Zero ActionStateFloat Source # 
Instance details

Defined in OpenXR.Core10.Input

ToCStruct ActionStateFloat Source # 
Instance details

Defined in OpenXR.Core10.Input

FromCStruct ActionStateFloat Source # 
Instance details

Defined in OpenXR.Core10.Input

data ActionStateVector2f Source #

XrActionStateVector2f - 2D float vector action state

Member Descriptions

Description

When multiple input sources are bound to this action, the currentState follows the previously defined rule to resolve ambiguity.

Valid Usage (Implicit)

See Also

https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrBool32, StructureType, https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrTime, Vector2f, getActionStateVector2f

Constructors

ActionStateVector2f 

Fields

Instances

Instances details
Show ActionStateVector2f Source # 
Instance details

Defined in OpenXR.Core10.Input

Storable ActionStateVector2f Source # 
Instance details

Defined in OpenXR.Core10.Input

Zero ActionStateVector2f Source # 
Instance details

Defined in OpenXR.Core10.Input

ToCStruct ActionStateVector2f Source # 
Instance details

Defined in OpenXR.Core10.Input

FromCStruct ActionStateVector2f Source # 
Instance details

Defined in OpenXR.Core10.Input

data ActionStatePose Source #

XrActionStatePose - Pose action metadata

Member Descriptions

Description

A pose action must not be bound to multiple input sources, according to the previously defined rule.

Valid Usage (Implicit)

See Also

https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrBool32, StructureType, getActionStatePose

Constructors

ActionStatePose 

Fields

  • isActive :: Bool

    isActive is TRUE if and only if there exists an input source that is being tracked by this pose action.

Instances

Instances details
Eq ActionStatePose Source # 
Instance details

Defined in OpenXR.Core10.Input

Show ActionStatePose Source # 
Instance details

Defined in OpenXR.Core10.Input

Storable ActionStatePose Source # 
Instance details

Defined in OpenXR.Core10.Input

Zero ActionStatePose Source # 
Instance details

Defined in OpenXR.Core10.Input

ToCStruct ActionStatePose Source # 
Instance details

Defined in OpenXR.Core10.Input

FromCStruct ActionStatePose Source # 
Instance details

Defined in OpenXR.Core10.Input

data ActionStateGetInfo Source #

XrActionStateGetInfo - Information to get action state

Member Descriptions

Description

See ActionCreateInfo for a description of subaction paths, and the restrictions on their use.

Valid Usage (Implicit)

See Also

Action, https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrPath, StructureType, getActionStateBoolean, getActionStateFloat, getActionStatePose, getActionStateVector2f

Constructors

ActionStateGetInfo 

Fields

Instances

Instances details
Eq ActionStateGetInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

Show ActionStateGetInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

Storable ActionStateGetInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

Zero ActionStateGetInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

ToCStruct ActionStateGetInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

FromCStruct ActionStateGetInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

data ActionSetCreateInfo Source #

XrActionSetCreateInfo - XrActionSet creation info

Member Descriptions

Description

When multiple actions are bound to the same input source, the priority of each action set determines which bindings are suppressed. Runtimes must ignore input sources from action sets with a lower priority number if those specific input sources are also present in active actions within a higher priority action set. If multiple action sets with the same priority are bound to the same input source and that is the highest priority number, runtimes must process all those bindings at the same time.

Two actions are considered to be bound to the same input source if they use the same identifier and optional location path segments, even if they have different component segments.

When runtimes are ignoring bindings because of priority, they must treat the binding to that input source as though they do not exist. That means the isActive field must be FALSE when retrieving action data, and that the runtime must not provide any visual, haptic, or other feedback related to the binding of that action to that input source. Other actions in the same action set which are bound to input sources that do not collide are not affected and are processed as normal.

If actionSetName or localizedActionSetName are empty strings, the runtime must return ERROR_NAME_INVALID or ERROR_LOCALIZED_NAME_INVALID respectively. If actionSetName or localizedActionSetName are duplicates of the corresponding field for any existing action set in the specified instance, the runtime must return ERROR_NAME_DUPLICATED or ERROR_LOCALIZED_NAME_DUPLICATED respectively. If the conflicting action set is destroyed, the conflicting field is no longer considered duplicated. If actionSetName contains characters which are not allowed in a single level of a well-formed path string, the runtime must return ERROR_PATH_FORMAT_INVALID.

Valid Usage (Implicit)

See Also

ActionSet, StructureType, createActionSet

Constructors

ActionSetCreateInfo 

Fields

  • actionSetName :: ByteString

    actionSetName is an array containing a NULL terminated non-empty string with the name of this action set.

    actionSetName must be a null-terminated UTF-8 string whose length is less than or equal to MAX_ACTION_SET_NAME_SIZE

  • localizedActionSetName :: ByteString

    localizedActionSetName is an array containing a NULL terminated UTF-8 string that can be presented to the user as a description of the action set. This string should be presented in the system’s current active locale.

    localizedActionSetName must be a null-terminated UTF-8 string whose length is less than or equal to MAX_LOCALIZED_ACTION_SET_NAME_SIZE

  • priority :: Word32

    priority defines which action sets' actions are active on a given input source when actions on multiple active action sets are bound to the same input source. Larger priority numbers take precedence over smaller priority numbers.

Instances

Instances details
Show ActionSetCreateInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

Storable ActionSetCreateInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

Zero ActionSetCreateInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

ToCStruct ActionSetCreateInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

FromCStruct ActionSetCreateInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

data ActionSuggestedBinding Source #

XrActionSuggestedBinding - Suggested binding for a single action

Valid Usage (Implicit)

See Also

Action, InteractionProfileSuggestedBinding, https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrPath, suggestInteractionProfileBindings

Constructors

ActionSuggestedBinding 

Fields

Instances

Instances details
Eq ActionSuggestedBinding Source # 
Instance details

Defined in OpenXR.Core10.Input

Show ActionSuggestedBinding Source # 
Instance details

Defined in OpenXR.Core10.Input

Storable ActionSuggestedBinding Source # 
Instance details

Defined in OpenXR.Core10.Input

Zero ActionSuggestedBinding Source # 
Instance details

Defined in OpenXR.Core10.Input

ToCStruct ActionSuggestedBinding Source # 
Instance details

Defined in OpenXR.Core10.Input

FromCStruct ActionSuggestedBinding Source # 
Instance details

Defined in OpenXR.Core10.Input

data InteractionProfileSuggestedBinding (es :: [Type]) Source #

XrInteractionProfileSuggestedBinding - Suggested bindings for a interaction profile

Valid Usage (Implicit)

See Also

ActionSuggestedBinding, https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrPath, StructureType, suggestInteractionProfileBindings

Constructors

InteractionProfileSuggestedBinding 

Fields

Instances

Instances details
Extensible InteractionProfileSuggestedBinding Source # 
Instance details

Defined in OpenXR.Core10.Input

Show (Chain es) => Show (InteractionProfileSuggestedBinding es) Source # 
Instance details

Defined in OpenXR.Core10.Input

es ~ ('[] :: [Type]) => Zero (InteractionProfileSuggestedBinding es) Source # 
Instance details

Defined in OpenXR.Core10.Input

(Extendss InteractionProfileSuggestedBinding es, PokeChain es) => ToCStruct (InteractionProfileSuggestedBinding es) Source # 
Instance details

Defined in OpenXR.Core10.Input

(Extendss InteractionProfileSuggestedBinding es, PeekChain es) => FromCStruct (InteractionProfileSuggestedBinding es) Source # 
Instance details

Defined in OpenXR.Core10.Input

data ActiveActionSet Source #

XrActiveActionSet - Describes an active action set

Member Descriptions

Description

This structure defines a single active action set and subaction path combination. Applications can provide a list of these structures to the syncActions function.

Valid Usage (Implicit)

See Also

ActionSet, ActionsSyncInfo, https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrPath, syncActions

Constructors

ActiveActionSet 

Fields

  • actionSet :: Ptr ActionSet_T

    actionSet is the handle of the action set to activate.

    actionSet must be a valid ActionSet handle

  • subactionPath :: Path

    subactionPath is a subaction path that was declared when one or more actions in the action set was created or NULL_PATH. If the application wants to activate the action set on more than one subaction path, it can include additional ActiveActionSet structs with the other subactionPath values. Using NULL_PATH as the value for subactionPath, acts as a wildcard for all subaction paths on the actions in the action set. If the subaction path was not specified on any of the actions in the actionSet when that action was created, the runtime must return ERROR_PATH_UNSUPPORTED.

Instances

Instances details
Eq ActiveActionSet Source # 
Instance details

Defined in OpenXR.Core10.Input

Show ActiveActionSet Source # 
Instance details

Defined in OpenXR.Core10.Input

Storable ActiveActionSet Source # 
Instance details

Defined in OpenXR.Core10.Input

Zero ActiveActionSet Source # 
Instance details

Defined in OpenXR.Core10.Input

ToCStruct ActiveActionSet Source # 
Instance details

Defined in OpenXR.Core10.Input

FromCStruct ActiveActionSet Source # 
Instance details

Defined in OpenXR.Core10.Input

data SessionActionSetsAttachInfo Source #

XrSessionActionSetsAttachInfo - Information to attach action sets to a session

Valid Usage (Implicit)

See Also

ActionSet, StructureType, attachSessionActionSets

Constructors

SessionActionSetsAttachInfo 

Fields

data ActionsSyncInfo Source #

XrActionsSyncInfo - Information to sync actions

Valid Usage (Implicit)

See Also

ActiveActionSet, StructureType, syncActions

Constructors

ActionsSyncInfo 

Fields

data BoundSourcesForActionEnumerateInfo Source #

XrBoundSourcesForActionEnumerateInfo - Information to query the bound input sources for an action

Valid Usage (Implicit)

See Also

Action, StructureType, enumerateBoundSourcesForAction

Constructors

BoundSourcesForActionEnumerateInfo 

Fields

Instances

Instances details
Eq BoundSourcesForActionEnumerateInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

Show BoundSourcesForActionEnumerateInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

Storable BoundSourcesForActionEnumerateInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

Zero BoundSourcesForActionEnumerateInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

ToCStruct BoundSourcesForActionEnumerateInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

FromCStruct BoundSourcesForActionEnumerateInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

data InputSourceLocalizedNameGetInfo Source #

XrInputSourceLocalizedNameGetInfo - Information to query the bound input sources for an action

Valid Usage (Implicit)

See Also

InputSourceLocalizedNameFlags, https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrPath, StructureType, enumerateBoundSourcesForAction, getInputSourceLocalizedName

Constructors

InputSourceLocalizedNameGetInfo 

Fields

Instances

Instances details
Eq InputSourceLocalizedNameGetInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

Show InputSourceLocalizedNameGetInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

Storable InputSourceLocalizedNameGetInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

Zero InputSourceLocalizedNameGetInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

ToCStruct InputSourceLocalizedNameGetInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

FromCStruct InputSourceLocalizedNameGetInfo Source # 
Instance details

Defined in OpenXR.Core10.Input

data InteractionProfileState Source #

XrInteractionProfileState - Receives active interaction profile for a top level path

Member Descriptions

Description

The runtime must only include interaction profiles that the application has provided bindings for via suggestInteractionProfileBindings or NULL_PATH. If the runtime is rebinding an interaction profile provided by the application to a device that the application did not provide bindings for, it must return the interaction profile path that it is emulating. If the runtime is unable to provide input because it cannot emulate any of the application-provided interaction profiles, it must return NULL_PATH.

Valid Usage (Implicit)

See Also

ActionSuggestedBinding, https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrPath, StructureType, getCurrentInteractionProfile, suggestInteractionProfileBindings

Constructors

InteractionProfileState 

Fields

Instances

Instances details
Eq InteractionProfileState Source # 
Instance details

Defined in OpenXR.Core10.Input

Show InteractionProfileState Source # 
Instance details

Defined in OpenXR.Core10.Input

Storable InteractionProfileState Source # 
Instance details

Defined in OpenXR.Core10.Input

Zero InteractionProfileState Source # 
Instance details

Defined in OpenXR.Core10.Input

ToCStruct InteractionProfileState Source # 
Instance details

Defined in OpenXR.Core10.Input

FromCStruct InteractionProfileState Source # 
Instance details

Defined in OpenXR.Core10.Input

data ActionCreateInfo Source #

XrActionCreateInfo - XrAction creation info

Member Descriptions

Description

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 pick_up action with the /user/hand/left and /user/hand/right subaction paths and use the subaction paths to independently query the state of pick_up_with_left_hand and 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:

  • Each path provided is one of:

    • /user/head
    • /user/hand/left
    • /user/hand/right
    • /user/gamepad
  • No path appears in the list more than once

Extensions may append additional top level user paths to the above list.

Note

Earlier revisions of the spec mentioned /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:

  • The application specified subaction paths at action creation and the application called xrGetActionState* or a haptic function with an empty subaction path array.
  • The application called 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.

Valid Usage (Implicit)

See Also

Action, ActionType, https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrPath, StructureType, createAction, createActionSet

Constructors

ActionCreateInfo 

Fields