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

This holds all of the action state that belongs on the session level. More...

#include <oxr/actions/oxr_session_action_context.h>

Collaboration diagram for oxr_session_action_context:

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_intact_sets_attachments_by_key
 A map of action set key to action set attachments.
 
struct oxr_action_set_attachmentact_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
 

Detailed Description

This holds all of the action state that belongs on the session level.

Future extensions might enable multiple action contexts per session.

Member Function Documentation

◆ oxr_session_action_context_find_set()

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.

Returns
true if the action set was found, false otherwise

References act_sets_attachments_by_key.

◆ oxr_session_action_context_fini()

XRT_NONNULL_ALL void oxr_session_action_context_fini ( struct oxr_session_action_context action_context)

◆ oxr_session_action_context_has_attached_act_sets()

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.

Returns
true if action sets are attached, false otherwise

References act_set_attachments.

◆ oxr_session_action_context_init()

XRT_NONNULL_ALL XRT_CHECK_RESULT XrResult oxr_session_action_context_init ( struct oxr_session_action_context action_context)

Field Documentation

◆ act_set_attachments

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().

◆ act_sets_attachments_by_key

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().

◆ action_set_attachment_count

◆ dynamic_roles_generation_id

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().

◆ profiles_on_attachment

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().

◆ sync_actions_mutex

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().


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