From: Mohamad Al-Jaf mohamadaljaf@gmail.com
--- include/Makefile.in | 1 + include/windows.graphics.holographic.idl | 162 +++++++++++++++++++++++ 2 files changed, 163 insertions(+) create mode 100644 include/windows.graphics.holographic.idl
diff --git a/include/Makefile.in b/include/Makefile.in index 198145d59f9..7e0b9d89085 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -817,6 +817,7 @@ SOURCES = \ windows.globalization.idl \ windows.graphics.directx.direct3d11.idl \ windows.graphics.directx.idl \ + windows.graphics.holographic.idl \ windows.h \ windows.media.closedcaptioning.idl \ windows.media.devices.idl \ diff --git a/include/windows.graphics.holographic.idl b/include/windows.graphics.holographic.idl new file mode 100644 index 00000000000..d2ac0ee48e8 --- /dev/null +++ b/include/windows.graphics.holographic.idl @@ -0,0 +1,162 @@ +/* + * Copyright (C) 2023 Mohamad Al-Jaf + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifdef __WIDL__ +#pragma winrt ns_prefix +#endif + +import "inspectable.idl"; +import "asyncinfo.idl"; +import "eventtoken.idl"; +import "windowscontracts.idl"; +import "windows.foundation.idl"; +import "windows.foundation.numerics.idl"; +import "windows.graphics.directx.idl"; +import "windows.graphics.directx.direct3d11.idl"; +/* import "windows.perception.idl"; */ +import "windows.perception.spatial.idl"; +/* import "windows.ui.core.idl"; */ + +namespace Windows.Graphics.Holographic { + typedef struct HolographicAdapterId HolographicAdapterId; + + interface IHolographicCamera; + interface IHolographicFrame; + interface IHolographicSpaceStatics; + interface IHolographicSpaceStatics2; + interface IHolographicSpaceStatics3; + interface IHolographicSpaceCameraAddedEventArgs; + interface IHolographicSpaceCameraRemovedEventArgs; + + runtimeclass HolographicCamera; + runtimeclass HolographicFrame; + runtimeclass HolographicSpace; + runtimeclass HolographicSpaceCameraAddedEventArgs; + runtimeclass HolographicSpaceCameraRemovedEventArgs; + + declare { + interface Windows.Foundation.TypedEventHandler<Windows.Graphics.Holographic.HolographicSpace *, IInspectable *>; + interface Windows.Foundation.TypedEventHandler<Windows.Graphics.Holographic.HolographicSpace *, Windows.Graphics.Holographic.HolographicSpaceCameraAddedEventArgs *>; + interface Windows.Foundation.TypedEventHandler<Windows.Graphics.Holographic.HolographicSpace *, Windows.Graphics.Holographic.HolographicSpaceCameraRemovedEventArgs *>; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0) + ] + struct HolographicAdapterId + { + UINT32 LowPart; + INT32 HighPart; + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + exclusiveto(Windows.Graphics.Holographic.HolographicSpace), + uuid(4380dba6-5e78-434f-807c-3433d1efe8b7) + ] + interface IHolographicSpace : IInspectable + { + [propget] HRESULT PrimaryAdapterId([out, retval] Windows.Graphics.Holographic.HolographicAdapterId *value); + HRESULT SetDirect3D11Device([in] Windows.Graphics.DirectX.Direct3D11.IDirect3DDevice *value); + [eventadd] HRESULT CameraAdded( + [in] Windows.Foundation.TypedEventHandler<Windows.Graphics.Holographic.HolographicSpace *, Windows.Graphics.Holographic.HolographicSpaceCameraAddedEventArgs *> *handler, + [out, retval] EventRegistrationToken *cookie + ); + [eventremove] HRESULT CameraAdded([in] EventRegistrationToken cookie); + [eventadd] HRESULT CameraRemoved( + [in] Windows.Foundation.TypedEventHandler<Windows.Graphics.Holographic.HolographicSpace *, Windows.Graphics.Holographic.HolographicSpaceCameraRemovedEventArgs *> *handler, + [out, retval] EventRegistrationToken *cookie + ); + [eventremove] HRESULT CameraRemoved([in] EventRegistrationToken cookie); + HRESULT CreateNextFrame([out, retval] Windows.Graphics.Holographic.HolographicFrame **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + exclusiveto(Windows.Graphics.Holographic.HolographicSpaceCameraAddedEventArgs), + uuid(58f1da35-bbb3-3c8f-993d-6c80e7feb99f) + ] + interface IHolographicSpaceCameraAddedEventArgs : IInspectable + { + [propget] HRESULT Camera([out, retval] Windows.Graphics.Holographic.HolographicCamera **value); + HRESULT GetDeferral([out, retval] Windows.Foundation.Deferral **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + exclusiveto(Windows.Graphics.Holographic.HolographicSpaceCameraRemovedEventArgs), + uuid(805444a8-f2ae-322e-8da9-836a0a95a4c1) + ] + interface IHolographicSpaceCameraRemovedEventArgs : IInspectable + { + [propget] HRESULT Camera([out, retval] Windows.Graphics.Holographic.HolographicCamera **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass HolographicCamera + { + [default] interface Windows.Graphics.Holographic.IHolographicCamera; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass HolographicFrame + { + [default] interface Windows.Graphics.Holographic.IHolographicFrame; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + marshaling_behavior(agile), + static(Windows.Graphics.Holographic.IHolographicSpaceStatics, Windows.Foundation.UniversalApiContract, 2.0), + static(Windows.Graphics.Holographic.IHolographicSpaceStatics2, Windows.Foundation.UniversalApiContract, 4.0), + static(Windows.Graphics.Holographic.IHolographicSpaceStatics3, Windows.Foundation.UniversalApiContract, 5.0), + threading(both) + ] + runtimeclass HolographicSpace + { + [default] interface Windows.Graphics.Holographic.IHolographicSpace; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass HolographicSpaceCameraAddedEventArgs + { + [default] interface Windows.Graphics.Holographic.IHolographicSpaceCameraAddedEventArgs; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 2.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass HolographicSpaceCameraRemovedEventArgs + { + [default] interface Windows.Graphics.Holographic.IHolographicSpaceCameraRemovedEventArgs; + } +}