| 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.perception.spatial.idl"; |
| 31 |
import "windows.storage.streams.idl"; |
| 32 |
|
| 33 |
namespace Windows.Perception.Spatial.Surfaces { |
| 34 |
interface ISpatialSurfaceInfo; |
| 35 |
interface ISpatialSurfaceMesh; |
| 36 |
interface ISpatialSurfaceMeshBuffer; |
| 37 |
interface ISpatialSurfaceMeshOptions; |
| 38 |
interface ISpatialSurfaceMeshOptionsStatics; |
| 39 |
interface ISpatialSurfaceObserver; |
| 40 |
interface ISpatialSurfaceObserverStatics; |
| 41 |
interface ISpatialSurfaceObserverStatics2; |
| 42 |
|
| 43 |
runtimeclass SpatialSurfaceInfo; |
| 44 |
runtimeclass SpatialSurfaceMesh; |
| 45 |
runtimeclass SpatialSurfaceMeshBuffer; |
| 46 |
runtimeclass SpatialSurfaceMeshOptions; |
| 47 |
runtimeclass SpatialSurfaceObserver; |
| 48 |
|
| 49 |
declare { |
| 50 |
interface Windows.Foundation.Collections.IMapView<GUID, Windows.Perception.Spatial.Surfaces.SpatialSurfaceInfo *>; |
| 51 |
interface Windows.Foundation.Collections.IKeyValuePair<GUID, Windows.Perception.Spatial.Surfaces.SpatialSurfaceInfo *>; |
| 52 |
interface Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<GUID, Windows.Perception.Spatial.Surfaces.SpatialSurfaceInfo *> *>; |
| 53 |
interface Windows.Foundation.Collections.IIterator<Windows.Foundation.Collections.IKeyValuePair<GUID, Windows.Perception.Spatial.Surfaces.SpatialSurfaceInfo *> *>; |
| 54 |
interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Perception.Spatial.Surfaces.SpatialSurfaceMesh *>; |
| 55 |
interface Windows.Foundation.IAsyncOperation<Windows.Perception.Spatial.Surfaces.SpatialSurfaceMesh *>; |
| 56 |
interface Windows.Foundation.TypedEventHandler<Windows.Perception.Spatial.Surfaces.SpatialSurfaceObserver *, IInspectable *>; |
| 57 |
} |
| 58 |
|
| 59 |
[ |
| 60 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 61 |
exclusiveto(Windows.Perception.Spatial.Surfaces.SpatialSurfaceInfo), |
| 62 |
uuid(f8e9ebe7-39b7-3962-bb03-57f56e1fb0a1) |
| 63 |
] |
| 64 |
interface ISpatialSurfaceInfo : IInspectable |
| 65 |
{ |
| 66 |
[propget] HRESULT Id([out, retval] GUID *value); |
| 67 |
[propget] HRESULT UpdateTime([out, retval] Windows.Foundation.DateTime *value); |
| 68 |
HRESULT TryGetBounds( |
| 69 |
[in] Windows.Perception.Spatial.SpatialCoordinateSystem *system, |
| 70 |
[out, retval] Windows.Foundation.IReference<Windows.Perception.Spatial.SpatialBoundingOrientedBox> **value |
| 71 |
); |
| 72 |
[overload("TryComputeLatestMeshAsync")] HRESULT TryComputeLatestMeshAsync( |
| 73 |
[in] DOUBLE triangles, |
| 74 |
[out, retval] Windows.Foundation.IAsyncOperation<Windows.Perception.Spatial.Surfaces.SpatialSurfaceMesh *> **value |
| 75 |
); |
| 76 |
[overload("TryComputeLatestMeshAsync")] HRESULT TryComputeLatestMeshWithOptionsAsync( |
| 77 |
[in] DOUBLE triangles, |
| 78 |
[in] Windows.Perception.Spatial.Surfaces.SpatialSurfaceMeshOptions *options, |
| 79 |
[out, retval] Windows.Foundation.IAsyncOperation<Windows.Perception.Spatial.Surfaces.SpatialSurfaceMesh *> **value |
| 80 |
); |
| 81 |
} |
| 82 |
|
| 83 |
[ |
| 84 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 85 |
exclusiveto(Windows.Perception.Spatial.Surfaces.SpatialSurfaceMesh), |
| 86 |
uuid(108f57d9-df0d-3950-a0fd-f972c77c27b4) |
| 87 |
] |
| 88 |
interface ISpatialSurfaceMesh : IInspectable |
| 89 |
{ |
| 90 |
[propget] HRESULT SurfaceInfo([out, retval] Windows.Perception.Spatial.Surfaces.SpatialSurfaceInfo **value); |
| 91 |
[propget] HRESULT CoordinateSystem([out, retval] Windows.Perception.Spatial.SpatialCoordinateSystem **value); |
| 92 |
[propget] HRESULT TriangleIndices([out, retval] Windows.Perception.Spatial.Surfaces.SpatialSurfaceMeshBuffer **value); |
| 93 |
[propget] HRESULT VertexPositions([out, retval] Windows.Perception.Spatial.Surfaces.SpatialSurfaceMeshBuffer **value); |
| 94 |
[propget] HRESULT VertexPositionScale([out, retval] Windows.Foundation.Numerics.Vector3 *value); |
| 95 |
[propget] HRESULT VertexNormals([out, retval] Windows.Perception.Spatial.Surfaces.SpatialSurfaceMeshBuffer **value); |
| 96 |
} |
| 97 |
|
| 98 |
[ |
| 99 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 100 |
exclusiveto(Windows.Perception.Spatial.Surfaces.SpatialSurfaceMeshBuffer), |
| 101 |
uuid(93cf59e0-871f-33f8-98b2-03d101458f6f) |
| 102 |
] |
| 103 |
interface ISpatialSurfaceMeshBuffer : IInspectable |
| 104 |
{ |
| 105 |
[propget] HRESULT Format([out, retval] Windows.Graphics.DirectX.DirectXPixelFormat *value); |
| 106 |
[propget] HRESULT Stride([out, retval] UINT32 *value); |
| 107 |
[propget] HRESULT ElementCount([out, retval] UINT32 *value); |
| 108 |
[propget] HRESULT Data([out, retval] Windows.Storage.Streams.IBuffer **value); |
| 109 |
} |
| 110 |
|
| 111 |
[ |
| 112 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 113 |
exclusiveto(Windows.Perception.Spatial.Surfaces.SpatialSurfaceMeshOptions), |
| 114 |
uuid(d2759f89-3572-3d2d-a10d-5fee9394aa37) |
| 115 |
] |
| 116 |
interface ISpatialSurfaceMeshOptions : IInspectable |
| 117 |
{ |
| 118 |
[propget] HRESULT VertexPositionFormat([out, retval] Windows.Graphics.DirectX.DirectXPixelFormat *value); |
| 119 |
[propput] HRESULT VertexPositionFormat([in] Windows.Graphics.DirectX.DirectXPixelFormat value); |
| 120 |
[propget] HRESULT TriangleIndexFormat([out, retval] Windows.Graphics.DirectX.DirectXPixelFormat *value); |
| 121 |
[propput] HRESULT TriangleIndexFormat([in] Windows.Graphics.DirectX.DirectXPixelFormat value); |
| 122 |
[propget] HRESULT VertexNormalFormat([out, retval] Windows.Graphics.DirectX.DirectXPixelFormat *value); |
| 123 |
[propput] HRESULT VertexNormalFormat([in] Windows.Graphics.DirectX.DirectXPixelFormat value); |
| 124 |
[propget] HRESULT IncludeVertexNormals([out, retval] boolean *value); |
| 125 |
[propput] HRESULT IncludeVertexNormals([in] boolean value); |
| 126 |
} |
| 127 |
|
| 128 |
[ |
| 129 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 130 |
exclusiveto(Windows.Perception.Spatial.Surfaces.SpatialSurfaceMeshOptions), |
| 131 |
uuid(9b340abf-9781-4505-8935-013575caae5e) |
| 132 |
] |
| 133 |
interface ISpatialSurfaceMeshOptionsStatics : IInspectable |
| 134 |
{ |
| 135 |
[propget] HRESULT SupportedVertexPositionFormats([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Graphics.DirectX.DirectXPixelFormat> **value); |
| 136 |
[propget] HRESULT SupportedTriangleIndexFormats([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Graphics.DirectX.DirectXPixelFormat> **value); |
| 137 |
[propget] HRESULT SupportedVertexNormalFormats([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Graphics.DirectX.DirectXPixelFormat> **value); |
| 138 |
} |
| 139 |
|
| 140 |
[ |
| 141 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 142 |
exclusiveto(Windows.Perception.Spatial.Surfaces.SpatialSurfaceObserver), |
| 143 |
uuid(10b69819-ddca-3483-ac3a-748fe8c86df5) |
| 144 |
] |
| 145 |
interface ISpatialSurfaceObserver : IInspectable |
| 146 |
{ |
| 147 |
HRESULT GetObservedSurfaces([out, retval] Windows.Foundation.Collections.IMapView<GUID, Windows.Perception.Spatial.Surfaces.SpatialSurfaceInfo *> **value); |
| 148 |
HRESULT SetBoundingVolume([in] Windows.Perception.Spatial.SpatialBoundingVolume *bounds); |
| 149 |
HRESULT SetBoundingVolumes([in] Windows.Foundation.Collections.IIterable<Windows.Perception.Spatial.SpatialBoundingVolume *> *bounds); |
| 150 |
[eventadd] HRESULT ObservedSurfacesChanged( |
| 151 |
[in] Windows.Foundation.TypedEventHandler<Windows.Perception.Spatial.Surfaces.SpatialSurfaceObserver *, IInspectable *> *handler, |
| 152 |
[out, retval] EventRegistrationToken *token |
| 153 |
); |
| 154 |
[eventremove] HRESULT ObservedSurfacesChanged([in] EventRegistrationToken token); |
| 155 |
} |
| 156 |
|
| 157 |
[ |
| 158 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 159 |
exclusiveto(Windows.Perception.Spatial.Surfaces.SpatialSurfaceObserver), |
| 160 |
uuid(165951ed-2108-4168-9175-87e027bc9285) |
| 161 |
] |
| 162 |
interface ISpatialSurfaceObserverStatics : IInspectable |
| 163 |
{ |
| 164 |
HRESULT RequestAccessAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Perception.Spatial.SpatialPerceptionAccessStatus> **result); |
| 165 |
} |
| 166 |
|
| 167 |
[ |
| 168 |
contract(Windows.Foundation.UniversalApiContract, 4.0), |
| 169 |
exclusiveto(Windows.Perception.Spatial.Surfaces.SpatialSurfaceObserver), |
| 170 |
uuid(0f534261-c55d-4e6b-a895-a19de69a42e3) |
| 171 |
] |
| 172 |
interface ISpatialSurfaceObserverStatics2 : IInspectable |
| 173 |
requires Windows.Perception.Spatial.Surfaces.ISpatialSurfaceObserverStatics |
| 174 |
{ |
| 175 |
HRESULT IsSupported([out, retval] boolean *value); |
| 176 |
} |
| 177 |
|
| 178 |
[ |
| 179 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 180 |
marshaling_behavior(agile), |
| 181 |
threading(both) |
| 182 |
] |
| 183 |
runtimeclass SpatialSurfaceInfo |
| 184 |
{ |
| 185 |
[default] interface Windows.Perception.Spatial.Surfaces.ISpatialSurfaceInfo; |
| 186 |
} |
| 187 |
|
| 188 |
[ |
| 189 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 190 |
marshaling_behavior(agile), |
| 191 |
threading(both) |
| 192 |
] |
| 193 |
runtimeclass SpatialSurfaceMesh |
| 194 |
{ |
| 195 |
[default] interface Windows.Perception.Spatial.Surfaces.ISpatialSurfaceMesh; |
| 196 |
} |
| 197 |
|
| 198 |
[ |
| 199 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 200 |
marshaling_behavior(agile), |
| 201 |
threading(both) |
| 202 |
] |
| 203 |
runtimeclass SpatialSurfaceMeshBuffer |
| 204 |
{ |
| 205 |
[default] interface Windows.Perception.Spatial.Surfaces.ISpatialSurfaceMeshBuffer; |
| 206 |
} |
| 207 |
|
| 208 |
[ |
| 209 |
activatable(Windows.Foundation.UniversalApiContract, 2.0), |
| 210 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 211 |
marshaling_behavior(agile), |
| 212 |
static(Windows.Perception.Spatial.Surfaces.ISpatialSurfaceMeshOptionsStatics, Windows.Foundation.UniversalApiContract, 2.0), |
| 213 |
threading(both) |
| 214 |
] |
| 215 |
runtimeclass SpatialSurfaceMeshOptions |
| 216 |
{ |
| 217 |
[default] interface Windows.Perception.Spatial.Surfaces.ISpatialSurfaceMeshOptions; |
| 218 |
} |
| 219 |
|
| 220 |
[ |
| 221 |
activatable(Windows.Foundation.UniversalApiContract, 2.0), |
| 222 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 223 |
marshaling_behavior(agile), |
| 224 |
static(Windows.Perception.Spatial.Surfaces.ISpatialSurfaceObserverStatics, Windows.Foundation.UniversalApiContract, 2.0), |
| 225 |
static(Windows.Perception.Spatial.Surfaces.ISpatialSurfaceObserverStatics2, Windows.Foundation.UniversalApiContract, 4.0), |
| 226 |
threading(both) |
| 227 |
] |
| 228 |
runtimeclass SpatialSurfaceObserver |
| 229 |
{ |
| 230 |
[default] interface Windows.Perception.Spatial.Surfaces.ISpatialSurfaceObserver; |
| 231 |
} |
| 232 |
} |