1 | // Copyright (c) 2017-2023, The Khronos Group Inc. |
2 | // Copyright (c) 2017-2019 Valve Corporation |
3 | // Copyright (c) 2017-2019 LunarG, Inc. |
4 | // SPDX-License-Identifier: Apache-2.0 OR MIT |
5 | // *********** THIS FILE IS GENERATED - DO NOT EDIT *********** |
6 | // See loader_source_generator.py for modifications |
7 | // ************************************************************ |
8 | |
9 | // Copyright (c) 2017-2023, The Khronos Group Inc. |
10 | // Copyright (c) 2017-2019 Valve Corporation |
11 | // Copyright (c) 2017-2019 LunarG, Inc. |
12 | // |
13 | // SPDX-License-Identifier: Apache-2.0 |
14 | // |
15 | // Licensed under the Apache License, Version 2.0 (the "License"); |
16 | // you may not use this file except in compliance with the License. |
17 | // You may obtain a copy of the License at |
18 | // |
19 | // http://www.apache.org/licenses/LICENSE-2.0 |
20 | // |
21 | // Unless required by applicable law or agreed to in writing, software |
22 | // distributed under the License is distributed on an "AS IS" BASIS, |
23 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
24 | // See the License for the specific language governing permissions and |
25 | // limitations under the License. |
26 | // |
27 | // Author: Mark Young <marky@lunarg.com> |
28 | // |
29 | |
30 | #pragma once |
31 | #include <unordered_map> |
32 | #include <thread> |
33 | #include <mutex> |
34 | |
35 | #include "xr_dependencies.h" |
36 | #include "openxr/openxr.h" |
37 | #include "openxr/openxr_platform.h" |
38 | |
39 | #include "loader_interfaces.h" |
40 | |
41 | #include "loader_instance.hpp" |
42 | |
43 | #include "loader_platform.hpp" |
44 | |
45 | |
46 | #ifdef __cplusplus |
47 | extern "C" { |
48 | #endif |
49 | |
50 | // Loader manually generated function prototypes |
51 | |
52 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrGetInstanceProperties( |
53 | XrInstance instance, |
54 | XrInstanceProperties* instanceProperties); |
55 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrPollEvent( |
56 | XrInstance instance, |
57 | XrEventDataBuffer* eventData); |
58 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrResultToString( |
59 | XrInstance instance, |
60 | XrResult value, |
61 | char buffer[XR_MAX_RESULT_STRING_SIZE]); |
62 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrStructureTypeToString( |
63 | XrInstance instance, |
64 | XrStructureType value, |
65 | char buffer[XR_MAX_STRUCTURE_NAME_SIZE]); |
66 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrGetSystem( |
67 | XrInstance instance, |
68 | const XrSystemGetInfo* getInfo, |
69 | XrSystemId* systemId); |
70 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrGetSystemProperties( |
71 | XrInstance instance, |
72 | XrSystemId systemId, |
73 | XrSystemProperties* properties); |
74 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateEnvironmentBlendModes( |
75 | XrInstance instance, |
76 | XrSystemId systemId, |
77 | XrViewConfigurationType viewConfigurationType, |
78 | uint32_t environmentBlendModeCapacityInput, |
79 | uint32_t* environmentBlendModeCountOutput, |
80 | XrEnvironmentBlendMode* environmentBlendModes); |
81 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrCreateSession( |
82 | XrInstance instance, |
83 | const XrSessionCreateInfo* createInfo, |
84 | XrSession* session); |
85 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrDestroySession( |
86 | XrSession session); |
87 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateReferenceSpaces( |
88 | XrSession session, |
89 | uint32_t spaceCapacityInput, |
90 | uint32_t* spaceCountOutput, |
91 | XrReferenceSpaceType* spaces); |
92 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrCreateReferenceSpace( |
93 | XrSession session, |
94 | const XrReferenceSpaceCreateInfo* createInfo, |
95 | XrSpace* space); |
96 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrGetReferenceSpaceBoundsRect( |
97 | XrSession session, |
98 | XrReferenceSpaceType referenceSpaceType, |
99 | XrExtent2Df* bounds); |
100 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrCreateActionSpace( |
101 | XrSession session, |
102 | const XrActionSpaceCreateInfo* createInfo, |
103 | XrSpace* space); |
104 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrLocateSpace( |
105 | XrSpace space, |
106 | XrSpace baseSpace, |
107 | XrTime time, |
108 | XrSpaceLocation* location); |
109 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrDestroySpace( |
110 | XrSpace space); |
111 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateViewConfigurations( |
112 | XrInstance instance, |
113 | XrSystemId systemId, |
114 | uint32_t viewConfigurationTypeCapacityInput, |
115 | uint32_t* viewConfigurationTypeCountOutput, |
116 | XrViewConfigurationType* viewConfigurationTypes); |
117 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrGetViewConfigurationProperties( |
118 | XrInstance instance, |
119 | XrSystemId systemId, |
120 | XrViewConfigurationType viewConfigurationType, |
121 | XrViewConfigurationProperties* configurationProperties); |
122 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateViewConfigurationViews( |
123 | XrInstance instance, |
124 | XrSystemId systemId, |
125 | XrViewConfigurationType viewConfigurationType, |
126 | uint32_t viewCapacityInput, |
127 | uint32_t* viewCountOutput, |
128 | XrViewConfigurationView* views); |
129 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateSwapchainFormats( |
130 | XrSession session, |
131 | uint32_t formatCapacityInput, |
132 | uint32_t* formatCountOutput, |
133 | int64_t* formats); |
134 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrCreateSwapchain( |
135 | XrSession session, |
136 | const XrSwapchainCreateInfo* createInfo, |
137 | XrSwapchain* swapchain); |
138 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrDestroySwapchain( |
139 | XrSwapchain swapchain); |
140 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateSwapchainImages( |
141 | XrSwapchain swapchain, |
142 | uint32_t imageCapacityInput, |
143 | uint32_t* imageCountOutput, |
144 | XrSwapchainImageBaseHeader* images); |
145 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrAcquireSwapchainImage( |
146 | XrSwapchain swapchain, |
147 | const XrSwapchainImageAcquireInfo* acquireInfo, |
148 | uint32_t* index); |
149 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrWaitSwapchainImage( |
150 | XrSwapchain swapchain, |
151 | const XrSwapchainImageWaitInfo* waitInfo); |
152 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrReleaseSwapchainImage( |
153 | XrSwapchain swapchain, |
154 | const XrSwapchainImageReleaseInfo* releaseInfo); |
155 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrBeginSession( |
156 | XrSession session, |
157 | const XrSessionBeginInfo* beginInfo); |
158 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrEndSession( |
159 | XrSession session); |
160 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrRequestExitSession( |
161 | XrSession session); |
162 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrWaitFrame( |
163 | XrSession session, |
164 | const XrFrameWaitInfo* frameWaitInfo, |
165 | XrFrameState* frameState); |
166 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrBeginFrame( |
167 | XrSession session, |
168 | const XrFrameBeginInfo* frameBeginInfo); |
169 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrEndFrame( |
170 | XrSession session, |
171 | const XrFrameEndInfo* frameEndInfo); |
172 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrLocateViews( |
173 | XrSession session, |
174 | const XrViewLocateInfo* viewLocateInfo, |
175 | XrViewState* viewState, |
176 | uint32_t viewCapacityInput, |
177 | uint32_t* viewCountOutput, |
178 | XrView* views); |
179 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrStringToPath( |
180 | XrInstance instance, |
181 | const char* pathString, |
182 | XrPath* path); |
183 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrPathToString( |
184 | XrInstance instance, |
185 | XrPath path, |
186 | uint32_t bufferCapacityInput, |
187 | uint32_t* bufferCountOutput, |
188 | char* buffer); |
189 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrCreateActionSet( |
190 | XrInstance instance, |
191 | const XrActionSetCreateInfo* createInfo, |
192 | XrActionSet* actionSet); |
193 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrDestroyActionSet( |
194 | XrActionSet actionSet); |
195 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrCreateAction( |
196 | XrActionSet actionSet, |
197 | const XrActionCreateInfo* createInfo, |
198 | XrAction* action); |
199 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrDestroyAction( |
200 | XrAction action); |
201 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrSuggestInteractionProfileBindings( |
202 | XrInstance instance, |
203 | const XrInteractionProfileSuggestedBinding* suggestedBindings); |
204 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrAttachSessionActionSets( |
205 | XrSession session, |
206 | const XrSessionActionSetsAttachInfo* attachInfo); |
207 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrGetCurrentInteractionProfile( |
208 | XrSession session, |
209 | XrPath topLevelUserPath, |
210 | XrInteractionProfileState* interactionProfile); |
211 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrGetActionStateBoolean( |
212 | XrSession session, |
213 | const XrActionStateGetInfo* getInfo, |
214 | XrActionStateBoolean* state); |
215 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrGetActionStateFloat( |
216 | XrSession session, |
217 | const XrActionStateGetInfo* getInfo, |
218 | XrActionStateFloat* state); |
219 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrGetActionStateVector2f( |
220 | XrSession session, |
221 | const XrActionStateGetInfo* getInfo, |
222 | XrActionStateVector2f* state); |
223 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrGetActionStatePose( |
224 | XrSession session, |
225 | const XrActionStateGetInfo* getInfo, |
226 | XrActionStatePose* state); |
227 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrSyncActions( |
228 | XrSession session, |
229 | const XrActionsSyncInfo* syncInfo); |
230 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateBoundSourcesForAction( |
231 | XrSession session, |
232 | const XrBoundSourcesForActionEnumerateInfo* enumerateInfo, |
233 | uint32_t sourceCapacityInput, |
234 | uint32_t* sourceCountOutput, |
235 | XrPath* sources); |
236 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrGetInputSourceLocalizedName( |
237 | XrSession session, |
238 | const XrInputSourceLocalizedNameGetInfo* getInfo, |
239 | uint32_t bufferCapacityInput, |
240 | uint32_t* bufferCountOutput, |
241 | char* buffer); |
242 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrApplyHapticFeedback( |
243 | XrSession session, |
244 | const XrHapticActionInfo* hapticActionInfo, |
245 | const XrHapticBaseHeader* hapticFeedback); |
246 | extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrStopHapticFeedback( |
247 | XrSession session, |
248 | const XrHapticActionInfo* hapticActionInfo); |
249 | #ifdef __cplusplus |
250 | } // extern "C" |
251 | #endif |
252 | |
253 | |