|
Monado OpenXR Runtime
|
This holds all of the action state that belongs on the session level. More...
#include <oxr/actions/oxr_session_action_context.h>

Public Member Functions | |
| XRT_NONNULL_ALL XRT_CHECK_RESULT XrResult | oxr_session_action_context_init (struct oxr_session_action_context *action_context) |
| Initialize the action context for a session. | |
| XRT_NONNULL_ALL void | oxr_session_action_context_fini (struct oxr_session_action_context *action_context) |
| Finalize and cleanup the action context for a session. | |
| XRT_NONNULL_ALL bool | oxr_session_action_context_has_attached_act_sets (const struct oxr_session_action_context *action_context) |
| Check if action sets have been attached to the action context. | |
| XRT_NONNULL_ALL bool | oxr_session_action_context_find_set (struct oxr_session_action_context *action_context, uint32_t act_set_key, struct oxr_action_set_attachment **out_act_set_attached) |
| Helper to find action set attachment. | |
Data Fields | |
| struct u_hashmap_int * | act_sets_attachments_by_key |
| A map of action set key to action set attachments. | |
| struct oxr_action_set_attachment * | act_set_attachments |
| An array of action set attachments that this session owns. | |
| size_t | action_set_attachment_count |
| Length of oxr_session_action_context::act_set_attachments. | |
| struct oxr_interaction_profile_array | profiles_on_attachment |
| Clone of all suggested binding profiles at the point of action set/session attachment. | |
| uint64_t | dynamic_roles_generation_id |
| Cache of the last known system roles generation_id. | |
| struct os_mutex | sync_actions_mutex |
| Protects access to dynamic_roles_generation_id during sync actions. | |
| XrPath | left |
| XrPath | right |
| XrPath | head |
| XrPath | gamepad |
| XrPath | eyes |
This holds all of the action state that belongs on the session level.
Future extensions might enable multiple action contexts per session.
| XRT_NONNULL_ALL bool oxr_session_action_context_find_set | ( | struct oxr_session_action_context * | action_context, |
| uint32_t | act_set_key, | ||
| struct oxr_action_set_attachment ** | out_act_set_attached | ||
| ) |
Helper to find action set attachment.
References act_sets_attachments_by_key.
| XRT_NONNULL_ALL void oxr_session_action_context_fini | ( | struct oxr_session_action_context * | action_context | ) |
Finalize and cleanup the action context for a session.
References act_set_attachments, act_sets_attachments_by_key, action_set_attachment_count, profiles_on_attachment, sync_actions_mutex, and u_hashmap_int_empty().
| XRT_NONNULL_ALL bool oxr_session_action_context_has_attached_act_sets | ( | const struct oxr_session_action_context * | action_context | ) |
Check if action sets have been attached to the action context.
References act_set_attachments.
| XRT_NONNULL_ALL XRT_CHECK_RESULT XrResult oxr_session_action_context_init | ( | struct oxr_session_action_context * | action_context | ) |
Initialize the action context for a session.
References act_set_attachments, act_sets_attachments_by_key, action_set_attachment_count, dynamic_roles_generation_id, OXR_FOR_EACH_VALID_SUBACTION_PATH, and sync_actions_mutex.
| struct oxr_action_set_attachment* oxr_session_action_context::act_set_attachments |
An array of action set attachments that this session owns.
If non-null, this means action sets have been attached to this session.
Referenced by oxr_action_sync_data(), oxr_session_action_context_fini(), oxr_session_action_context_has_attached_act_sets(), oxr_session_action_context_init(), and oxr_session::oxr_session_attach_action_sets().
| struct u_hashmap_int* oxr_session_action_context::act_sets_attachments_by_key |
A map of action set key to action set attachments.
If non-null, this means action sets have been attached to this session, since this map points to elements of oxr_session_action_context::act_set_attachments
Referenced by oxr_action_set_attachment::oxr_action_set_attachment_teardown(), oxr_session_action_context_find_set(), oxr_session_action_context_fini(), and oxr_session_action_context_init().
| size_t oxr_session_action_context::action_set_attachment_count |
| uint64_t oxr_session_action_context::dynamic_roles_generation_id |
Cache of the last known system roles generation_id.
Referenced by oxr_action_sync_data(), and oxr_session_action_context_init().
| struct oxr_interaction_profile_array oxr_session_action_context::profiles_on_attachment |
Clone of all suggested binding profiles at the point of action set/session attachment.
oxr_session_attach_action_sets
Referenced by oxr_session::oxr_action_get_input_source_localized_name(), oxr_session_action_context_fini(), and oxr_session::oxr_session_attach_action_sets().
| struct os_mutex oxr_session_action_context::sync_actions_mutex |
Protects access to dynamic_roles_generation_id during sync actions.
Referenced by oxr_action_sync_data(), oxr_session_action_context_fini(), and oxr_session_action_context_init().