2 * Copyright (C) 2023 Mohamad Al-Jaf
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.
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.
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
20 #pragma winrt ns_prefix
23 import
"inspectable.idl";
24 import
"asyncinfo.idl";
25 import
"eventtoken.idl";
26 import
"windowscontracts.idl";
27 import
"windows.foundation.idl";
28 import
"windows.graphics.idl";
29 import
"windows.graphics.directx.idl";
30 import
"windows.graphics.directx.direct3d11.idl";
31 /* import "windows.security.authorization.appcapabilityaccess.idl"; */
32 import
"windows.system.idl";
33 import
"windows.ui.idl";
34 import
"windows.ui.composition.idl";
36 namespace Windows.Graphics.Capture
{
37 typedef enum GraphicsCaptureDirtyRegionMode GraphicsCaptureDirtyRegionMode
;
39 interface IDirect3D11CaptureFrame
;
40 interface IDirect3D11CaptureFrame2
;
41 interface IDirect3D11CaptureFramePool
;
42 interface IDirect3D11CaptureFramePoolStatics
;
43 interface IDirect3D11CaptureFramePoolStatics2
;
44 interface IGraphicsCaptureItem
;
45 interface IGraphicsCaptureItemStatics
;
46 interface IGraphicsCaptureItemStatics2
;
47 interface IGraphicsCaptureSession
;
48 interface IGraphicsCaptureSession2
;
49 interface IGraphicsCaptureSession3
;
50 interface IGraphicsCaptureSessionStatics
;
52 runtimeclass Direct3D11CaptureFrame
;
53 runtimeclass Direct3D11CaptureFramePool
;
54 runtimeclass GraphicsCaptureItem
;
55 runtimeclass GraphicsCaptureSession
;
58 interface Windows.Foundation.AsyncOperationCompletedHandler
<Windows.Graphics.Capture.GraphicsCaptureItem
*>;
59 interface Windows.Foundation.IAsyncOperation
<Windows.Graphics.Capture.GraphicsCaptureItem
*>;
60 interface Windows.Foundation.TypedEventHandler
<Windows.Graphics.Capture.Direct3D11CaptureFramePool
*, IInspectable
*>;
61 interface Windows.Foundation.TypedEventHandler
<Windows.Graphics.Capture.GraphicsCaptureItem
*, IInspectable
*>;
65 contract
(Windows.Foundation.UniversalApiContract
, 19.0)
67 enum GraphicsCaptureDirtyRegionMode
74 contract
(Windows.Foundation.UniversalApiContract
, 6.0),
75 exclusiveto
(Windows.Graphics.Capture.Direct3D11CaptureFrame
),
76 uuid(fa50c623
-38da
-4b32
-acf3
-fa9734ad800e
)
78 interface IDirect3D11CaptureFrame
: IInspectable
80 [propget] HRESULT Surface
([out, retval] Windows.Graphics.DirectX.Direct3D11.IDirect3DSurface
**value
);
81 [propget] HRESULT SystemRelativeTime
([out, retval] Windows.Foundation.TimeSpan
*value
);
82 [propget] HRESULT ContentSize
([out, retval] Windows.Graphics.SizeInt32
*value
);
86 contract
(Windows.Foundation.UniversalApiContract
, 19.0),
87 exclusiveto
(Windows.Graphics.Capture.Direct3D11CaptureFrame
),
88 uuid(37869cfa
-2b48
-5ebf
-9afb
-dffd805defdb
)
90 interface IDirect3D11CaptureFrame2
: IInspectable
92 [propget] HRESULT DirtyRegions
([out, retval] Windows.Foundation.Collections.IVectorView
<Windows.Graphics.RectInt32
> **value
);
93 [propget] HRESULT DirtyRegionMode
([out, retval] Windows.Graphics.Capture.GraphicsCaptureDirtyRegionMode
*value
);
97 contract
(Windows.Foundation.UniversalApiContract
, 6.0),
98 exclusiveto
(Windows.Graphics.Capture.Direct3D11CaptureFramePool
),
99 uuid(24eb6d22
-1975-422e-82e7
-780dbd8ddf24
)
101 interface IDirect3D11CaptureFramePool
: IInspectable
104 [in] Windows.Graphics.DirectX.Direct3D11.IDirect3DDevice
*device
,
105 [in] Windows.Graphics.DirectX.DirectXPixelFormat pixel_format
,
106 [in] INT32 number_of_buffers
, [in] Windows.Graphics.SizeInt32 size
);
107 HRESULT TryGetNextFrame
(
108 [out, retval] Windows.Graphics.Capture.Direct3D11CaptureFrame
**result
);
109 [eventadd
] HRESULT FrameArrived
(
110 [in] Windows.Foundation.TypedEventHandler
<Windows.Graphics.Capture.Direct3D11CaptureFramePool
*, IInspectable
*> *handler
,
111 [out, retval] EventRegistrationToken
* token
);
112 [eventremove
] HRESULT FrameArrived
([in] EventRegistrationToken token
);
113 HRESULT CreateCaptureSession
(
114 [in] Windows.Graphics.Capture.GraphicsCaptureItem
*item
,
115 [out, retval] Windows.Graphics.Capture.GraphicsCaptureSession
**result
);
116 [propget] HRESULT DispatcherQueue
([out, retval] Windows.System.DispatcherQueue
**value
);
120 contract
(Windows.Foundation.UniversalApiContract
, 6.0),
121 exclusiveto
(Windows.Graphics.Capture.Direct3D11CaptureFramePool
),
122 uuid(7784056a
-67aa
-4d53
-ae54
-1088d5a8ca21
)
124 interface IDirect3D11CaptureFramePoolStatics
: IInspectable
127 [in] Windows.Graphics.DirectX.Direct3D11.IDirect3DDevice
*device
,
128 [in] Windows.Graphics.DirectX.DirectXPixelFormat pixel_format
,
129 [in] INT32 number_of_buffers
,
130 [in] Windows.Graphics.SizeInt32 size
,
131 [out, retval] Windows.Graphics.Capture.Direct3D11CaptureFramePool
**result
);
135 contract
(Windows.Foundation.UniversalApiContract
, 7.0),
136 exclusiveto
(Windows.Graphics.Capture.Direct3D11CaptureFramePool
),
137 uuid(589b103f
-6bbc
-5df5
-a991
-02e28b3b66d5
)
139 interface IDirect3D11CaptureFramePoolStatics2
: IInspectable
141 HRESULT CreateFreeThreaded
(
142 [in] Windows.Graphics.DirectX.Direct3D11.IDirect3DDevice
*device
,
143 [in] Windows.Graphics.DirectX.DirectXPixelFormat pixel_format
,
144 [in] INT32 number_of_buffers
,
145 [in] Windows.Graphics.SizeInt32 size
,
146 [out, retval] Windows.Graphics.Capture.Direct3D11CaptureFramePool
**result
);
150 contract
(Windows.Foundation.UniversalApiContract
, 6.0),
151 exclusiveto
(Windows.Graphics.Capture.GraphicsCaptureItem
),
152 uuid(79c3f95b
-31f7
-4ec2
-a464
-632ef5d30760
)
154 interface IGraphicsCaptureItem
: IInspectable
156 [propget] HRESULT DisplayName
([out, retval] HSTRING
*value
);
157 [propget] HRESULT Size
([out, retval] Windows.Graphics.SizeInt32
*value
);
158 [eventadd
] HRESULT Closed
(
159 [in] Windows.Foundation.TypedEventHandler
<Windows.Graphics.Capture.GraphicsCaptureItem
*, IInspectable
*> *handler
,
160 [out, retval] EventRegistrationToken
*token
);
161 [eventremove
] HRESULT Closed
([in] EventRegistrationToken token
);
165 contract
(Windows.Foundation.UniversalApiContract
, 7.0),
166 exclusiveto
(Windows.Graphics.Capture.GraphicsCaptureItem
),
167 uuid(a87ebea5
-457c
-5788-ab47
-0cf1d3637e74
)
169 interface IGraphicsCaptureItemStatics
: IInspectable
171 HRESULT CreateFromVisual
(
172 [in] Windows.UI.Composition.Visual
*visual
,
173 [out, retval] Windows.Graphics.Capture.GraphicsCaptureItem
**result
);
177 contract
(Windows.Foundation.UniversalApiContract
, 12.0),
178 exclusiveto
(Windows.Graphics.Capture.GraphicsCaptureItem
),
179 uuid(3b92acc9
-e584
-5862-bf5c
-9c316c6d2dbb
)
181 interface IGraphicsCaptureItemStatics2
: IInspectable
183 HRESULT TryCreateFromWindowId
(
184 [in] Windows.UI.WindowId window_id
,
185 [out, retval] Windows.Graphics.Capture.GraphicsCaptureItem
**result
);
186 HRESULT TryCreateFromDisplayId
(
187 [in] Windows.Graphics.DisplayId display_id
,
188 [out, retval] Windows.Graphics.Capture.GraphicsCaptureItem
**result
);
192 contract
(Windows.Foundation.UniversalApiContract
, 6.0),
193 exclusiveto
(Windows.Graphics.Capture.GraphicsCaptureSession
),
194 uuid(814e42a9
-f70f
-4ad7
-939b
-fddcc6eb880d
)
196 interface IGraphicsCaptureSession
: IInspectable
198 HRESULT StartCapture
();
202 contract
(Windows.Foundation.UniversalApiContract
, 10.0),
203 exclusiveto
(Windows.Graphics.Capture.GraphicsCaptureSession
),
204 uuid(2c39ae40
-7d2e
-5044
-804e-8b6799d4cf9e
)
206 interface IGraphicsCaptureSession2
: IInspectable
208 [propget] HRESULT IsCursorCaptureEnabled
([out, retval] boolean *value
);
209 [propput] HRESULT IsCursorCaptureEnabled
([in] boolean value
);
213 contract
(Windows.Foundation.UniversalApiContract
, 12.0),
214 exclusiveto
(Windows.Graphics.Capture.GraphicsCaptureSession
),
215 uuid(f2cdd966
-22ae
-5ea1
-9596-3a289344c3be
)
217 interface IGraphicsCaptureSession3
: IInspectable
219 [propget] HRESULT IsBorderRequired
([out, retval] boolean *value
);
220 [propput] HRESULT IsBorderRequired
([in] boolean value
);
224 contract
(Windows.Foundation.UniversalApiContract
, 6.0),
225 exclusiveto
(Windows.Graphics.Capture.GraphicsCaptureSession
),
226 uuid(2224a540
-5974-49aa
-b232
-0882536f4cb5
)
228 interface IGraphicsCaptureSessionStatics
: IInspectable
230 HRESULT IsSupported
([out, retval] boolean *result
);
234 contract
(Windows.Foundation.UniversalApiContract
, 6.0),
235 marshaling_behavior
(agile
)
237 runtimeclass Direct3D11CaptureFrame
239 [default] interface Windows.Graphics.Capture.IDirect3D11CaptureFrame
;
240 [contract
(Windows.Foundation.UniversalApiContract
, 19.0)] interface Windows.Graphics.Capture.IDirect3D11CaptureFrame2
;
241 interface Windows.Foundation.IClosable
;
245 contract
(Windows.Foundation.UniversalApiContract
, 6.0),
246 marshaling_behavior
(agile
),
247 static
(Windows.Graphics.Capture.IDirect3D11CaptureFramePoolStatics
, Windows.Foundation.UniversalApiContract
, 6.0),
248 static
(Windows.Graphics.Capture.IDirect3D11CaptureFramePoolStatics2
, Windows.Foundation.UniversalApiContract
, 7.0),
251 runtimeclass Direct3D11CaptureFramePool
253 [default] interface Windows.Graphics.Capture.IDirect3D11CaptureFramePool
;
254 interface Windows.Foundation.IClosable
;
258 contract
(Windows.Foundation.UniversalApiContract
, 6.0),
259 marshaling_behavior
(agile
),
260 static
(Windows.Graphics.Capture.IGraphicsCaptureItemStatics
, Windows.Foundation.UniversalApiContract
, 7.0),
261 static
(Windows.Graphics.Capture.IGraphicsCaptureItemStatics2
, Windows.Foundation.UniversalApiContract
, 12.0),
264 runtimeclass GraphicsCaptureItem
266 [default] interface Windows.Graphics.Capture.IGraphicsCaptureItem
;
270 contract
(Windows.Foundation.UniversalApiContract
, 6.0),
271 marshaling_behavior
(agile
),
272 static
(Windows.Graphics.Capture.IGraphicsCaptureSessionStatics
, Windows.Foundation.UniversalApiContract
, 6.0),
275 runtimeclass GraphicsCaptureSession
277 [default] interface Windows.Graphics.Capture.IGraphicsCaptureSession
;
278 [contract
(Windows.Foundation.UniversalApiContract
, 10.0)] interface Windows.Graphics.Capture.IGraphicsCaptureSession2
;
279 [contract
(Windows.Foundation.UniversalApiContract
, 12.0)] interface Windows.Graphics.Capture.IGraphicsCaptureSession3
;
280 interface Windows.Foundation.IClosable
;