Monado OpenXR Runtime
Loading...
Searching...
No Matches
oxr_instance_action_context Struct Reference

Holds all action-related state that lives at the instance level (shared across sessions). More...

#include <oxr/actions/oxr_instance_action_context.h>

Collaboration diagram for oxr_instance_action_context:

Public Member Functions

XRT_CHECK_RESULT XrResult oxr_instance_action_context_create (struct oxr_logger *log, struct oxr_binding_registry *registry, struct oxr_instance_action_context **out_context)
 Create a new instance action context (reference count 1).
 

Data Fields

struct oxr_refcounted base
 
struct oxr_pair_hashset action_sets
 Action set name and localized name stores.
 
struct oxr_suggested_profile_array suggested_profiles
 Interaction profile bindings that have been suggested by the client.
 
struct oxr_binding_registry * binding_registry
 Runtime binding registry used by this action context.
 

Detailed Description

Holds all action-related state that lives at the instance level (shared across sessions).

Used for duplicate checking and storage of client-suggested that are later applied when action sets are attached to a session.

Reference-counted; use oxr_refcounted_ref and oxr_refcounted_unref on the Base implementations member to manage references. Destroy is only called when the reference count reaches zero.

  • action_sets: Registry of action set name and localized name pairs. Used to enforce uniqueness in xrCreateActionSet and to remove entries when an action set is destroyed.
  • suggested_profiles: Interaction profile binding suggestions from the app. When the app calls xrAttachSessionActionSets, this array is cloned into the session’s action context.

In a future extension, this context is intended to support namespaced action sets and to allow plugins (e.g. in a game) to suggest their own bindings without affecting the main application’s bindings.

Field Documentation

◆ action_sets

struct oxr_pair_hashset oxr_instance_action_context::action_sets

Action set name and localized name stores.

Referenced by oxr_xrCreateActionSet().

◆ binding_registry

struct oxr_binding_registry* oxr_instance_action_context::binding_registry

Runtime binding registry used by this action context.

Multiple action contexts may share the same registry, and future action contexts may install a modified registry.

Referenced by oxr_instance::oxr_action_suggest_interaction_profile_bindings(), and oxr_session::oxr_session_attach_action_sets().

◆ suggested_profiles

struct oxr_suggested_profile_array oxr_instance_action_context::suggested_profiles

Interaction profile bindings that have been suggested by the client.

Referenced by oxr_session::oxr_session_attach_action_sets().


The documentation for this struct was generated from the following file: