Monado OpenXR Runtime
Loading...
Searching...
No Matches
oxr_suggested_profile.h
Go to the documentation of this file.
1// Copyright 2026, NVIDIA CORPORATION.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Suggested interaction profile state.
6 * @ingroup oxr_main
7 */
8
9#pragma once
10
11#include "xrt/xrt_device.h"
12
13#include "oxr_extension_support.h"
14#include "oxr_dpad_state.h"
15#include "oxr_generated_bindings.h"
16
17#include <stddef.h>
18#include <stdint.h>
19
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25
26/*!
27 * One action-to-path binding suggested by the OpenXR client.
28 *
29 * This is the client's suggestion: bind this action to this path on an
30 * interaction profile. It is created from xrSuggestInteractionProfileBindings
31 * and grouped on @ref oxr_suggested_profile. The @ref binding_point field
32 * points at the immutable @ref oxr_binding_point the suggested path resolved
33 * to in the @ref oxr_binding_registry.
34 */
36{
37 //! Action this suggestion applies to, from @ref oxr_action::act_key.
38 uint32_t act_key;
39 //! Binding path suggested by the client.
40 XrPath path;
41 //! Registry binding point this client suggestion points to.
43};
44
45/*!
46 * Client-suggested bindings for one OpenXR interaction profile.
47 *
48 * Groups the @ref oxr_suggested_binding entries submitted by the application
49 * for a single interaction profile (for example
50 * `/interaction_profiles/khr/simple_controller`). Each suggested binding
51 * points at an @ref oxr_binding_point in the @ref oxr_binding_registry.
52 *
53 * Profiles live on @ref oxr_instance_action_context::suggested_profiles and
54 * are snapshotted onto the session at xrAttachSessionActionSets. The
55 * snapshotting is required by the OpenXR spec.
56 */
58{
59 //! Interaction profile path this suggestion set is for.
60 XrPath path;
61
62 //! Used to lookup @ref xrt_binding_profile for fallback.
63 const struct oxr_profile_template *templ;
64
65 //! Client-suggested action-to-path bindings for this profile.
67 size_t binding_count;
68
69 //! Optional DPAD modifications from the same suggest call.
71};
72
73void
74oxr_suggested_profile_destroy(struct oxr_suggested_profile *profile);
75
77oxr_suggested_profile_clone(const struct oxr_suggested_profile *src_profile);
78
79
80#ifdef __cplusplus
81}
82#endif
Holds dpad state related functions.
Runtime description of one bindable path on an interaction profile.
Definition oxr_binding_point.h:103
Holds dpad binding state for a single interaction profile.
Definition oxr_dpad_state.h:83
One action-to-path binding suggested by the OpenXR client.
Definition oxr_suggested_profile.h:36
const struct oxr_binding_point * binding_point
Registry binding point this client suggestion points to.
Definition oxr_suggested_profile.h:42
XrPath path
Binding path suggested by the client.
Definition oxr_suggested_profile.h:40
uint32_t act_key
Action this suggestion applies to, from oxr_action::act_key.
Definition oxr_suggested_profile.h:38
Client-suggested bindings for one OpenXR interaction profile.
Definition oxr_suggested_profile.h:58
XrPath path
Interaction profile path this suggestion set is for.
Definition oxr_suggested_profile.h:60
struct oxr_dpad_state dpad_state
Optional DPAD modifications from the same suggest call.
Definition oxr_suggested_profile.h:70
const struct oxr_profile_template * templ
Used to lookup xrt_binding_profile for fallback.
Definition oxr_suggested_profile.h:63
struct oxr_suggested_binding * bindings
Client-suggested action-to-path bindings for this profile.
Definition oxr_suggested_profile.h:66
Header defining an xrt display or controller device.