| 1 |
/* |
| 2 |
* Copyright (C) 2023 Mohamad Al-Jaf |
| 3 |
* |
| 4 |
* This library is free software; you can redistribute it and/or |
| 5 |
* modify it under the terms of the GNU Lesser General Public |
| 6 |
* License as published by the Free Software Foundation; either |
| 7 |
* version 2.1 of the License, or (at your option) any later version. |
| 8 |
* |
| 9 |
* This library is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 |
* Lesser General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU Lesser General Public |
| 15 |
* License along with this library; if not, write to the Free Software |
| 16 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
| 17 |
*/ |
| 18 |
|
| 19 |
#ifdef __WIDL__ |
| 20 |
#pragma winrt ns_prefix |
| 21 |
#endif |
| 22 |
|
| 23 |
import "inspectable.idl"; |
| 24 |
import "asyncinfo.idl"; |
| 25 |
import "eventtoken.idl"; |
| 26 |
import "windowscontracts.idl"; |
| 27 |
import "windows.foundation.idl"; |
| 28 |
import "windows.foundation.numerics.idl"; |
| 29 |
import "windows.graphics.directx.idl"; |
| 30 |
import "windows.graphics.directx.direct3d11.idl"; |
| 31 |
import "windows.perception.idl"; |
| 32 |
import "windows.perception.spatial.idl"; |
| 33 |
import "windows.ui.core.idl"; |
| 34 |
|
| 35 |
namespace Windows.Perception { |
| 36 |
runtimeclass PerceptionTimestamp; |
| 37 |
} |
| 38 |
|
| 39 |
namespace Windows.Graphics.Holographic { |
| 40 |
typedef enum HolographicFramePresentResult HolographicFramePresentResult; |
| 41 |
typedef enum HolographicFramePresentWaitBehavior HolographicFramePresentWaitBehavior; |
| 42 |
|
| 43 |
typedef struct HolographicAdapterId HolographicAdapterId; |
| 44 |
typedef struct HolographicStereoTransform HolographicStereoTransform; |
| 45 |
|
| 46 |
interface IHolographicCamera; |
| 47 |
interface IHolographicCameraPose; |
| 48 |
interface IHolographicCameraRenderingParameters; |
| 49 |
interface IHolographicFrame; |
| 50 |
interface IHolographicFramePrediction; |
| 51 |
interface IHolographicSpaceStatics; |
| 52 |
interface IHolographicSpaceStatics2; |
| 53 |
interface IHolographicSpaceStatics3; |
| 54 |
interface IHolographicSpaceCameraAddedEventArgs; |
| 55 |
interface IHolographicSpaceCameraRemovedEventArgs; |
| 56 |
|
| 57 |
runtimeclass HolographicCamera; |
| 58 |
runtimeclass HolographicCameraPose; |
| 59 |
runtimeclass HolographicCameraRenderingParameters; |
| 60 |
runtimeclass HolographicFrame; |
| 61 |
runtimeclass HolographicFramePrediction; |
| 62 |
runtimeclass HolographicSpace; |
| 63 |
runtimeclass HolographicSpaceCameraAddedEventArgs; |
| 64 |
runtimeclass HolographicSpaceCameraRemovedEventArgs; |
| 65 |
|
| 66 |
declare { |
| 67 |
interface Windows.Foundation.Collections.IVectorView<Windows.Graphics.Holographic.HolographicCamera *>; |
| 68 |
interface Windows.Foundation.Collections.IVectorView<Windows.Graphics.Holographic.HolographicCameraPose *>; |
| 69 |
interface Windows.Foundation.IReference<Windows.Graphics.Holographic.HolographicStereoTransform>; |
| 70 |
interface Windows.Foundation.TypedEventHandler<Windows.Graphics.Holographic.HolographicSpace *, IInspectable *>; |
| 71 |
interface Windows.Foundation.TypedEventHandler<Windows.Graphics.Holographic.HolographicSpace *, Windows.Graphics.Holographic.HolographicSpaceCameraAddedEventArgs *>; |
| 72 |
interface Windows.Foundation.TypedEventHandler<Windows.Graphics.Holographic.HolographicSpace *, Windows.Graphics.Holographic.HolographicSpaceCameraRemovedEventArgs *>; |
| 73 |
} |
| 74 |
|
| 75 |
[ |
| 76 |
contract(Windows.Foundation.UniversalApiContract, 2.0) |
| 77 |
] |
| 78 |
enum HolographicFramePresentResult |
| 79 |
{ |
| 80 |
Success = 0, |
| 81 |
DeviceRemoved = 1, |
| 82 |
}; |
| 83 |
|
| 84 |
[ |
| 85 |
contract(Windows.Foundation.UniversalApiContract, 2.0) |
| 86 |
] |
| 87 |
enum HolographicFramePresentWaitBehavior |
| 88 |
{ |
| 89 |
WaitForFrameToFinish = 0, |
| 90 |
DoNotWaitForFrameToFinish = 1, |
| 91 |
}; |
| 92 |
|
| 93 |
[ |
| 94 |
contract(Windows.Foundation.UniversalApiContract, 2.0) |
| 95 |
] |
| 96 |
struct HolographicAdapterId |
| 97 |
{ |
| 98 |
UINT32 LowPart; |
| 99 |
INT32 HighPart; |
| 100 |
}; |
| 101 |
|
| 102 |
[ |
| 103 |
contract(Windows.Foundation.UniversalApiContract, 2.0) |
| 104 |
] |
| 105 |
struct HolographicStereoTransform |
| 106 |
{ |
| 107 |
Windows.Foundation.Numerics.Matrix4x4 Left; |
| 108 |
Windows.Foundation.Numerics.Matrix4x4 Right; |
| 109 |
}; |
| 110 |
|
| 111 |
[ |
| 112 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 113 |
exclusiveto(Windows.Graphics.Holographic.HolographicCamera), |
| 114 |
uuid(e4e98445-9bed-4980-9ba0-e87680d1cb74) |
| 115 |
] |
| 116 |
interface IHolographicCamera : IInspectable |
| 117 |
{ |
| 118 |
[propget] HRESULT RenderTargetSize([out, retval] Windows.Foundation.Size *value); |
| 119 |
[propget] HRESULT ViewportScaleFactor([out, retval] DOUBLE *value); |
| 120 |
[propput] HRESULT ViewportScaleFactor([in] DOUBLE value); |
| 121 |
[propget] HRESULT IsStereo([out, retval] boolean *value); |
| 122 |
[propget] HRESULT Id([out, retval] UINT32 *value); |
| 123 |
HRESULT SetNearPlaneDistance([in] DOUBLE value); |
| 124 |
HRESULT SetFarPlaneDistance([in] DOUBLE value); |
| 125 |
} |
| 126 |
|
| 127 |
[ |
| 128 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 129 |
exclusiveto(Windows.Graphics.Holographic.HolographicCameraPose), |
| 130 |
uuid(0d7d7e30-12de-45bd-912b-c7f6561599d1) |
| 131 |
] |
| 132 |
interface IHolographicCameraPose : IInspectable |
| 133 |
{ |
| 134 |
[propget] HRESULT HolographicCamera([out, retval] Windows.Graphics.Holographic.HolographicCamera **value); |
| 135 |
[propget] HRESULT Viewport([out, retval] Windows.Foundation.Rect *value); |
| 136 |
HRESULT TryGetViewTransform([in] Windows.Perception.Spatial.SpatialCoordinateSystem *coordinate_system, [out, retval] Windows.Foundation.IReference<Windows.Graphics.Holographic.HolographicStereoTransform> **value); |
| 137 |
[propget] HRESULT ProjectionTransform([out, retval] Windows.Graphics.Holographic.HolographicStereoTransform *value); |
| 138 |
HRESULT TryGetCullingFrustum([in] Windows.Perception.Spatial.SpatialCoordinateSystem *coordinate_system, [out, retval] Windows.Foundation.IReference<Windows.Perception.Spatial.SpatialBoundingFrustum> **value); |
| 139 |
HRESULT TryGetVisibleFrustum([in] Windows.Perception.Spatial.SpatialCoordinateSystem* coordinateSystem, [out, retval] Windows.Foundation.IReference<Windows.Perception.Spatial.SpatialBoundingFrustum> **value); |
| 140 |
[propget] HRESULT NearPlaneDistance([out, retval] DOUBLE *value); |
| 141 |
[propget] HRESULT FarPlaneDistance([out, retval] DOUBLE *value); |
| 142 |
} |
| 143 |
|
| 144 |
[ |
| 145 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 146 |
exclusiveto(Windows.Graphics.Holographic.HolographicCameraRenderingParameters), |
| 147 |
uuid(8eac2ed1-5bf4-4e16-8236-ae0800c11d0d) |
| 148 |
] |
| 149 |
interface IHolographicCameraRenderingParameters : IInspectable |
| 150 |
{ |
| 151 |
[overload("SetFocusPoint")] HRESULT SetFocusPoint([in] Windows.Perception.Spatial.SpatialCoordinateSystem *coordinate_system, [in] Windows.Foundation.Numerics.Vector3 position); |
| 152 |
[overload("SetFocusPoint")] HRESULT SetFocusPointWithNormal([in] Windows.Perception.Spatial.SpatialCoordinateSystem *coordinate_system, [in] Windows.Foundation.Numerics.Vector3 position, [in] Windows.Foundation.Numerics.Vector3 normal); |
| 153 |
[overload("SetFocusPoint")] HRESULT SetFocusPointWithNormalLinearVelocity([in] Windows.Perception.Spatial.SpatialCoordinateSystem *coordinate_system, [in] Windows.Foundation.Numerics.Vector3 position, [in] Windows.Foundation.Numerics.Vector3 normal, [in] Windows.Foundation.Numerics.Vector3 linearVelocity); |
| 154 |
[propget] HRESULT Direct3D11Device([out, retval] Windows.Graphics.DirectX.Direct3D11.IDirect3DDevice **value); |
| 155 |
[propget] HRESULT Direct3D11BackBuffer([out, retval] Windows.Graphics.DirectX.Direct3D11.IDirect3DSurface **value); |
| 156 |
} |
| 157 |
|
| 158 |
[ |
| 159 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 160 |
exclusiveto(Windows.Graphics.Holographic.HolographicFrame), |
| 161 |
uuid(c6988eb6-a8b9-3054-a6eb-d624b6536375) |
| 162 |
] |
| 163 |
interface IHolographicFrame : IInspectable |
| 164 |
{ |
| 165 |
[propget] HRESULT AddedCameras([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Graphics.Holographic.HolographicCamera *> **value); |
| 166 |
[propget] HRESULT RemovedCameras([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Graphics.Holographic.HolographicCamera *> **value); |
| 167 |
HRESULT GetRenderingParameters([in] Windows.Graphics.Holographic.HolographicCameraPose *camera_pose, [out, retval] Windows.Graphics.Holographic.HolographicCameraRenderingParameters **value); |
| 168 |
[propget] HRESULT Duration([out, retval] Windows.Foundation.TimeSpan *value); |
| 169 |
[propget] HRESULT CurrentPrediction([out, retval] Windows.Graphics.Holographic.HolographicFramePrediction **value); |
| 170 |
HRESULT UpdateCurrentPrediction(); |
| 171 |
[overload("PresentUsingCurrentPrediction")] HRESULT PresentUsingCurrentPrediction([out, retval] Windows.Graphics.Holographic.HolographicFramePresentResult *result); |
| 172 |
[overload("PresentUsingCurrentPrediction")] HRESULT PresentUsingCurrentPredictionWithBehavior([in] Windows.Graphics.Holographic.HolographicFramePresentWaitBehavior wait_behavior, [out, retval] Windows.Graphics.Holographic.HolographicFramePresentResult *result); |
| 173 |
HRESULT WaitForFrameToFinish(); |
| 174 |
} |
| 175 |
|
| 176 |
[ |
| 177 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 178 |
exclusiveto(Windows.Graphics.Holographic.HolographicFramePrediction), |
| 179 |
uuid(520f4de1-5c0a-4e79-a81e-6abe02bb2739) |
| 180 |
] |
| 181 |
interface IHolographicFramePrediction : IInspectable |
| 182 |
{ |
| 183 |
[propget] HRESULT CameraPoses([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Graphics.Holographic.HolographicCameraPose *> **value); |
| 184 |
[propget] HRESULT Timestamp([out, retval] Windows.Perception.PerceptionTimestamp **value); |
| 185 |
} |
| 186 |
|
| 187 |
[ |
| 188 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 189 |
exclusiveto(Windows.Graphics.Holographic.HolographicSpace), |
| 190 |
uuid(4380dba6-5e78-434f-807c-3433d1efe8b7) |
| 191 |
] |
| 192 |
interface IHolographicSpace : IInspectable |
| 193 |
{ |
| 194 |
[propget] HRESULT PrimaryAdapterId([out, retval] Windows.Graphics.Holographic.HolographicAdapterId *value); |
| 195 |
HRESULT SetDirect3D11Device([in] Windows.Graphics.DirectX.Direct3D11.IDirect3DDevice *value); |
| 196 |
[eventadd] HRESULT CameraAdded( |
| 197 |
[in] Windows.Foundation.TypedEventHandler<Windows.Graphics.Holographic.HolographicSpace *, Windows.Graphics.Holographic.HolographicSpaceCameraAddedEventArgs *> *handler, |
| 198 |
[out, retval] EventRegistrationToken *cookie |
| 199 |
); |
| 200 |
[eventremove] HRESULT CameraAdded([in] EventRegistrationToken cookie); |
| 201 |
[eventadd] HRESULT CameraRemoved( |
| 202 |
[in] Windows.Foundation.TypedEventHandler<Windows.Graphics.Holographic.HolographicSpace *, Windows.Graphics.Holographic.HolographicSpaceCameraRemovedEventArgs *> *handler, |
| 203 |
[out, retval] EventRegistrationToken *cookie |
| 204 |
); |
| 205 |
[eventremove] HRESULT CameraRemoved([in] EventRegistrationToken cookie); |
| 206 |
HRESULT CreateNextFrame([out, retval] Windows.Graphics.Holographic.HolographicFrame **value); |
| 207 |
} |
| 208 |
|
| 209 |
[ |
| 210 |
contract(Windows.Foundation.UniversalApiContract, 4.0), |
| 211 |
exclusiveto(Windows.Graphics.Holographic.HolographicSpace), |
| 212 |
uuid(0e777088-75fc-48af-8758-0652f6f07c59) |
| 213 |
] |
| 214 |
interface IHolographicSpaceStatics2 : IInspectable |
| 215 |
{ |
| 216 |
[propget] HRESULT IsSupported([out, retval] boolean *value); |
| 217 |
[propget] HRESULT IsAvailable([out, retval] boolean *value); |
| 218 |
[eventadd] HRESULT IsAvailableChanged([in] Windows.Foundation.EventHandler<IInspectable *> *handler, [out, retval] EventRegistrationToken *token); |
| 219 |
[eventremove] HRESULT IsAvailableChanged([in] EventRegistrationToken token); |
| 220 |
} |
| 221 |
|
| 222 |
[ |
| 223 |
contract(Windows.Foundation.UniversalApiContract, 5.0), |
| 224 |
exclusiveto(Windows.Graphics.Holographic.HolographicSpace), |
| 225 |
uuid(3b00de3d-b1a3-4dfe-8e79-fec5909e6df8) |
| 226 |
] |
| 227 |
interface IHolographicSpaceStatics3 : IInspectable |
| 228 |
{ |
| 229 |
[propget] HRESULT IsConfigured([out, retval] boolean *value); |
| 230 |
} |
| 231 |
|
| 232 |
[ |
| 233 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 234 |
exclusiveto(Windows.Graphics.Holographic.HolographicSpaceCameraAddedEventArgs), |
| 235 |
uuid(58f1da35-bbb3-3c8f-993d-6c80e7feb99f) |
| 236 |
] |
| 237 |
interface IHolographicSpaceCameraAddedEventArgs : IInspectable |
| 238 |
{ |
| 239 |
[propget] HRESULT Camera([out, retval] Windows.Graphics.Holographic.HolographicCamera **value); |
| 240 |
HRESULT GetDeferral([out, retval] Windows.Foundation.Deferral **value); |
| 241 |
} |
| 242 |
|
| 243 |
[ |
| 244 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 245 |
exclusiveto(Windows.Graphics.Holographic.HolographicSpaceCameraRemovedEventArgs), |
| 246 |
uuid(805444a8-f2ae-322e-8da9-836a0a95a4c1) |
| 247 |
] |
| 248 |
interface IHolographicSpaceCameraRemovedEventArgs : IInspectable |
| 249 |
{ |
| 250 |
[propget] HRESULT Camera([out, retval] Windows.Graphics.Holographic.HolographicCamera **value); |
| 251 |
} |
| 252 |
|
| 253 |
[ |
| 254 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 255 |
marshaling_behavior(agile), |
| 256 |
threading(both) |
| 257 |
] |
| 258 |
runtimeclass HolographicCamera |
| 259 |
{ |
| 260 |
[default] interface Windows.Graphics.Holographic.IHolographicCamera; |
| 261 |
} |
| 262 |
|
| 263 |
[ |
| 264 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 265 |
marshaling_behavior(agile), |
| 266 |
threading(both) |
| 267 |
] |
| 268 |
runtimeclass HolographicCameraPose |
| 269 |
{ |
| 270 |
[default] interface Windows.Graphics.Holographic.IHolographicCameraPose; |
| 271 |
} |
| 272 |
|
| 273 |
[ |
| 274 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 275 |
marshaling_behavior(agile), |
| 276 |
threading(both) |
| 277 |
] |
| 278 |
runtimeclass HolographicCameraRenderingParameters |
| 279 |
{ |
| 280 |
[default] interface Windows.Graphics.Holographic.IHolographicCameraRenderingParameters; |
| 281 |
} |
| 282 |
|
| 283 |
[ |
| 284 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 285 |
marshaling_behavior(agile), |
| 286 |
threading(both) |
| 287 |
] |
| 288 |
runtimeclass HolographicFrame |
| 289 |
{ |
| 290 |
[default] interface Windows.Graphics.Holographic.IHolographicFrame; |
| 291 |
} |
| 292 |
|
| 293 |
[ |
| 294 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 295 |
marshaling_behavior(agile), |
| 296 |
threading(both) |
| 297 |
] |
| 298 |
runtimeclass HolographicFramePrediction |
| 299 |
{ |
| 300 |
[default] interface Windows.Graphics.Holographic.IHolographicFramePrediction; |
| 301 |
} |
| 302 |
|
| 303 |
[ |
| 304 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 305 |
marshaling_behavior(agile), |
| 306 |
/* static(Windows.Graphics.Holographic.IHolographicSpaceStatics, Windows.Foundation.UniversalApiContract, 2.0), */ |
| 307 |
static(Windows.Graphics.Holographic.IHolographicSpaceStatics2, Windows.Foundation.UniversalApiContract, 4.0), |
| 308 |
static(Windows.Graphics.Holographic.IHolographicSpaceStatics3, Windows.Foundation.UniversalApiContract, 5.0), |
| 309 |
threading(both) |
| 310 |
] |
| 311 |
runtimeclass HolographicSpace |
| 312 |
{ |
| 313 |
[default] interface Windows.Graphics.Holographic.IHolographicSpace; |
| 314 |
} |
| 315 |
|
| 316 |
[ |
| 317 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 318 |
marshaling_behavior(agile), |
| 319 |
threading(both) |
| 320 |
] |
| 321 |
runtimeclass HolographicSpaceCameraAddedEventArgs |
| 322 |
{ |
| 323 |
[default] interface Windows.Graphics.Holographic.IHolographicSpaceCameraAddedEventArgs; |
| 324 |
} |
| 325 |
|
| 326 |
[ |
| 327 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 328 |
marshaling_behavior(agile), |
| 329 |
threading(both) |
| 330 |
] |
| 331 |
runtimeclass HolographicSpaceCameraRemovedEventArgs |
| 332 |
{ |
| 333 |
[default] interface Windows.Graphics.Holographic.IHolographicSpaceCameraRemovedEventArgs; |
| 334 |
} |
| 335 |
} |