|
Monado OpenXR Runtime
|
Complete runtime binding registry for all action contexts of an XrInstance. More...
#include <oxr/actions/oxr_binding_registry.h>

Public Member Functions | |
| XRT_CHECK_RESULT XrResult | oxr_binding_registry_create (struct oxr_logger *log, struct oxr_path_store *store, struct oxr_binding_registry **out_registry) |
| Create a complete runtime registry from generated templates. | |
| void | oxr_binding_registry_ref (struct oxr_binding_registry *registry) |
| Add a reference to a registry. | |
| void | oxr_binding_registry_unref (struct oxr_binding_registry *registry) |
| Drop a reference to a registry and destroy it when the count reaches zero. | |
| bool | oxr_binding_registry_find_profile (const struct oxr_binding_registry *registry, XrPath path, const struct oxr_binding_profile **out_profile) |
| Find a binding profile by interaction profile path. | |
| bool | oxr_binding_registry_get_for_source_path (const struct oxr_binding_registry *registry, XrPath source_path, const struct oxr_binding_point **out_binding_point) |
| Resolve the generated unique source path returned by xrEnumerateBoundSourcesForAction. | |
| bool | oxr_binding_registry_find_rebinding_from_source_for_device (const struct oxr_binding_registry *registry, XrPath source_profile_path, enum xrt_device_name target_device_name, const struct oxr_rebinding_profile **out_rebinding) |
| Find a rebinding profile from a source profile to a target device. | |
Data Fields | |
| struct oxr_refcounted | base |
| struct oxr_binding_profile * | profiles |
| All generated interaction profiles. | |
| size_t | profile_count |
| struct u_hashmap_int * | profiles_by_path |
| Maps interaction profile XrPath to profiles entries. | |
| struct oxr_binding_point_store | binding_points |
| struct oxr_subaction_store | subactions |
| Maps subaction paths to subaction payloads, used to singleton subactions payloads so they are shared between all the profiles. | |
| struct oxr_rebinding_profile * | rebindings |
| All generated OpenXR-level rebinding profiles. | |
| size_t | rebinding_count |
Complete runtime binding registry for all action contexts of an XrInstance.
The registry owns all generated interaction profiles, all binding points, and all rebinding profiles. It deliberately includes generated data even when an interaction profile or path is not currently enabled for API suggestions. It is constant through the lifetime of the XrInstance, and is shared between all sessions and action contexts, and their actions.
| XRT_CHECK_RESULT XrResult oxr_binding_registry_create | ( | struct oxr_logger * | log, |
| struct oxr_path_store * | store, | ||
| struct oxr_binding_registry ** | out_registry | ||
| ) |
Create a complete runtime registry from generated templates.
The registry does not filter by extension support or OpenXR version. Suggestion-time validation rejects paths that are unavailable to the app.
References ARRAY_SIZE, oxr_refcounted::destroy, oxr_binding_registry_unref(), oxr_error(), profiles, profiles_by_path, rebindings, subactions, U_TYPED_ARRAY_CALLOC, and U_TYPED_CALLOC.
Referenced by oxr_instance_action_context::oxr_instance_action_context_create_with_registry().
| bool oxr_binding_registry_find_profile | ( | const struct oxr_binding_registry * | registry, |
| XrPath | path, | ||
| const struct oxr_binding_profile ** | out_profile | ||
| ) |
Find a binding profile by interaction profile path.
References profiles_by_path.
| bool oxr_binding_registry_find_rebinding_from_source_for_device | ( | const struct oxr_binding_registry * | registry, |
| XrPath | source_profile_path, | ||
| enum xrt_device_name | target_device_name, | ||
| const struct oxr_rebinding_profile ** | out_rebinding | ||
| ) |
Find a rebinding profile from a source profile to a target device.
References oxr_binding_profile::device_name, rebindings, oxr_binding_profile::registry, oxr_rebinding_profile::source_profile_path, and oxr_rebinding_profile::target_profile_path.
| bool oxr_binding_registry_get_for_source_path | ( | const struct oxr_binding_registry * | registry, |
| XrPath | source_path, | ||
| const struct oxr_binding_point ** | out_binding_point | ||
| ) |
Resolve the generated unique source path returned by xrEnumerateBoundSourcesForAction.
References oxr_binding_profile::registry.
| void oxr_binding_registry_ref | ( | struct oxr_binding_registry * | registry | ) |
Add a reference to a registry.
References oxr_refcounted_ref().
| void oxr_binding_registry_unref | ( | struct oxr_binding_registry * | registry | ) |
Drop a reference to a registry and destroy it when the count reaches zero.
References oxr_refcounted_unref().
Referenced by oxr_binding_registry_create(), and oxr_instance_action_context::oxr_instance_action_context_create_with_registry().
| struct oxr_binding_profile* oxr_binding_registry::profiles |
All generated interaction profiles.
Referenced by bindings.Bindings::__init__(), and oxr_binding_registry_create().
| struct u_hashmap_int* oxr_binding_registry::profiles_by_path |
Maps interaction profile XrPath to profiles entries.
Referenced by oxr_binding_registry_create(), and oxr_binding_registry_find_profile().
| struct oxr_rebinding_profile* oxr_binding_registry::rebindings |
All generated OpenXR-level rebinding profiles.
Referenced by oxr_binding_registry_create(), oxr_binding_registry_find_rebinding_from_source_for_device(), and oxr_suggested_profile_array_find_rebinding_for_device_name().
| struct oxr_subaction_store oxr_binding_registry::subactions |
Maps subaction paths to subaction payloads, used to singleton subactions payloads so they are shared between all the profiles.
Referenced by oxr_binding_registry_create().