Monado OpenXR Runtime
Loading...
Searching...
No Matches
oxr_input.h
Go to the documentation of this file.
1// Copyright 2018-2024, Collabora, Ltd.
2// Copyright 2023-2026, NVIDIA CORPORATION.
3// SPDX-License-Identifier: BSL-1.0
4/*!
5 * @file
6 * @brief Holds input related functions.
7 * @author Jakob Bornecrantz <jakob@collabora.com>
8 * @author Korcan Hussein <korcan.hussein@collabora.com>
9 * @ingroup oxr_main
10 */
11
12#pragma once
13
14#include "oxr_extension_support.h"
16
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22
23/*
24 *
25 * Action Set functions
26 *
27 */
28
29/*!
30 * @public @memberof oxr_instance
31 */
32XrResult
33oxr_action_set_create(struct oxr_logger *log,
34 struct oxr_instance *inst,
35 struct oxr_instance_action_context *inst_context,
36 const XrActionSetCreateInfo *createInfo,
37 struct oxr_action_set **out_act_set);
38
39/*!
40 * De-initialize an action set attachment and its action attachments.
41 *
42 * Frees the action attachments, but does not de-allocate the action set
43 * attachment.
44 *
45 * @public @memberof oxr_action_set_attachment
46 */
47void
48oxr_action_set_attachment_teardown(struct oxr_action_set_attachment *act_set_attached);
49
50
51/*
52 *
53 * Action functions
54 *
55 */
56
57/*!
58 * @public @memberof oxr_action
59 */
60XrResult
62 struct oxr_action_set *act_set,
63 const XrActionCreateInfo *createInfo,
64 struct oxr_action **out_act);
65
66
67/*
68 *
69 * Action input/output functions
70 *
71 */
72
73/*!
74 * Find the pose input for the set of subaction_paths
75 *
76 * @public @memberof oxr_session
77 */
78XrResult
79oxr_action_get_pose_input(struct oxr_session *sess,
80 uint32_t act_key,
81 const struct oxr_subaction_paths *subaction_paths_ptr,
82 struct oxr_action_input **out_input);
83
84void
85oxr_action_cache_stop_output(struct oxr_logger *log, struct oxr_session *sess, struct oxr_action_cache *cache);
86
87
88/*
89 *
90 * Session action functions
91 *
92 */
93
94/*!
95 * @public @memberof oxr_session
96 * @see oxr_action_set
97 */
98XrResult
99oxr_session_attach_action_sets(struct oxr_logger *log,
100 struct oxr_session *sess,
101 const XrSessionActionSetsAttachInfo *bindInfo);
102
103/*!
104 * @public @memberof oxr_session
105 */
106XrResult
108 struct oxr_session *sess,
109 uint32_t countActionSets,
110 const XrActiveActionSet *actionSets,
111 const XrActiveActionSetPrioritiesEXT *activePriorities);
112
113/*!
114 * @public @memberof oxr_session
115 */
116XrResult
117oxr_action_enumerate_bound_sources(struct oxr_logger *log,
118 struct oxr_session *sess,
119 uint32_t act_key,
120 uint32_t sourceCapacityInput,
121 uint32_t *sourceCountOutput,
122 XrPath *sources);
123
124
125#ifdef __cplusplus
126}
127#endif
Forward declarations for OpenXR state tracker structs.
XrResult oxr_action_sync_data(struct oxr_logger *log, struct oxr_session *sess, uint32_t countActionSets, const XrActiveActionSet *actionSets, const XrActiveActionSetPrioritiesEXT *activePriorities)
Definition oxr_input.c:1952
XrResult oxr_action_create(struct oxr_logger *log, struct oxr_action_set *act_set, const XrActionCreateInfo *createInfo, struct oxr_action **out_act)
Definition oxr_input.c:452
The set of inputs/outputs for a single sub-action path for an action.
Definition oxr_objects.h:1685
A input action pair of a xrt_input and a xrt_device, along with the required transform.
Definition oxr_objects.h:1646
The data associated with the attachment of an Action Set (oxr_action_set) to as Session (oxr_session)...
Definition oxr_objects.h:1588
A group of actions.
Definition oxr_objects.h:1930
A single action.
Definition oxr_objects.h:2003
Holds all action-related state that lives at the instance level (shared across sessions).
Definition oxr_instance_action_context.h:47
Main object that ties everything together.
Definition oxr_objects.h:1217
Logger struct that lives on the stack, one for each call client call.
Definition oxr_logger.h:44
Object that client program interact with.
Definition oxr_objects.h:1357
A parsed equivalent of a list of sub-action paths.
Definition oxr_subaction.h:98