source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/dxgi1_2.idl@ 1170

Last change on this file since 1170 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 11.0 KB
Line 
1/*
2 * Copyright 2014 Jacek Caban for CodeWeavers
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
19import "dxgi.idl";
20
21const UINT DXGI_ENUM_MODES_STEREO = 0x4;
22const UINT DXGI_ENUM_MODES_DISABLED_STEREO = 0x8;
23
24const DWORD DXGI_SHARED_RESOURCE_READ = 0x80000000;
25const DWORD DXGI_SHARED_RESOURCE_WRITE = 0x00000001;
26
27typedef enum _DXGI_OFFER_RESOURCE_PRIORITY {
28 DXGI_OFFER_RESOURCE_PRIORITY_LOW = 1,
29 DXGI_OFFER_RESOURCE_PRIORITY_NORMAL,
30 DXGI_OFFER_RESOURCE_PRIORITY_HIGH
31} DXGI_OFFER_RESOURCE_PRIORITY;
32
33typedef enum DXGI_ALPHA_MODE {
34 DXGI_ALPHA_MODE_UNSPECIFIED = 0,
35 DXGI_ALPHA_MODE_PREMULTIPLIED = 1,
36 DXGI_ALPHA_MODE_STRAIGHT = 2,
37 DXGI_ALPHA_MODE_IGNORE = 3,
38 DXGI_ALPHA_MODE_FORCE_DWORD = 0xffffffff
39} DXGI_ALPHA_MODE;
40
41typedef struct DXGI_OUTDUPL_MOVE_RECT
42{
43 POINT SourcePoint;
44 RECT DestinationRect;
45} DXGI_OUTDUPL_MOVE_RECT;
46
47typedef struct DXGI_OUTDUPL_DESC
48{
49 DXGI_MODE_DESC ModeDesc;
50 DXGI_MODE_ROTATION Rotation;
51 BOOL DesktopImageInSystemMemory;
52} DXGI_OUTDUPL_DESC;
53
54typedef struct DXGI_OUTDUPL_POINTER_POSITION
55{
56 POINT Position;
57 BOOL Visible;
58} DXGI_OUTDUPL_POINTER_POSITION;
59
60typedef enum DXGI_OUTDUPL_POINTER_SHAPE_TYPE
61{
62 DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MONOCHROME = 0x00000001,
63 DXGI_OUTDUPL_POINTER_SHAPE_TYPE_COLOR = 0x00000002,
64 DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MASKED_COLOR = 0x00000004
65} DXGI_OUTDUPL_POINTER_SHAPE_TYPE;
66
67typedef struct DXGI_OUTDUPL_POINTER_SHAPE_INFO
68{
69 UINT Type;
70 UINT Width;
71 UINT Height;
72 UINT Pitch;
73 POINT HotSpot;
74} DXGI_OUTDUPL_POINTER_SHAPE_INFO;
75
76typedef struct DXGI_OUTDUPL_FRAME_INFO
77{
78 LARGE_INTEGER LastPresentTime;
79 LARGE_INTEGER LastMouseUpdateTime;
80 UINT AccumulatedFrames;
81 BOOL RectsCoalesced;
82 BOOL ProtectedContentMaskedOut;
83 DXGI_OUTDUPL_POINTER_POSITION PointerPosition;
84 UINT TotalMetadataBufferSize;
85 UINT PointerShapeBufferSize;
86} DXGI_OUTDUPL_FRAME_INFO;
87
88typedef struct DXGI_MODE_DESC1
89{
90 UINT Width;
91 UINT Height;
92 DXGI_RATIONAL RefreshRate;
93 DXGI_FORMAT Format;
94 DXGI_MODE_SCANLINE_ORDER ScanlineOrdering;
95 DXGI_MODE_SCALING Scaling;
96 BOOL Stereo;
97} DXGI_MODE_DESC1;
98
99[
100 object,
101 uuid(191cfac3-a341-470d-b26e-a864f428319c),
102 local,
103 pointer_default(unique)
104]
105interface IDXGIOutputDuplication : IDXGIObject
106{
107 void GetDesc(
108 [out] DXGI_OUTDUPL_DESC *desc
109 );
110
111 HRESULT AcquireNextFrame(
112 [in] UINT timeout_in_milliseconds,
113 [out] DXGI_OUTDUPL_FRAME_INFO *frame_info,
114 [out] IDXGIResource **desktop_resource
115 );
116
117 HRESULT GetFrameDirtyRects(
118 [in] UINT dirty_rects_buffer_size,
119 [out] RECT *dirty_rects_buffer,
120 [out] UINT *dirty_rects_buffer_size_required
121 );
122
123 HRESULT GetFrameMoveRects(
124 [in] UINT move_rects_buffer_size,
125 [out] DXGI_OUTDUPL_MOVE_RECT *move_rect_buffer,
126 [out] UINT *move_rects_buffer_size_required
127 );
128
129 HRESULT GetFramePointerShape(
130 [in] UINT pointer_shape_buffer_size,
131 [out] void *pointer_shape_buffer,
132 [out] UINT *pointer_shape_buffer_size_required,
133 [out] DXGI_OUTDUPL_POINTER_SHAPE_INFO *pointer_shape_info
134 );
135
136 HRESULT MapDesktopSurface(
137 [out] DXGI_MAPPED_RECT *locked_rect
138 );
139
140 HRESULT UnMapDesktopSurface();
141
142 HRESULT ReleaseFrame();
143}
144
145[
146 object,
147 uuid(aba496dd-b617-4cb8-a866-bc44d7eb1fa2),
148 local,
149 pointer_default(unique)
150]
151interface IDXGISurface2 : IDXGISurface1
152{
153 HRESULT GetResource(
154 [in] REFIID iid,
155 [out] void **parent_resource,
156 [out] UINT *subresource_idx
157 );
158}
159
160[
161 object,
162 uuid(30961379-4609-4a41-998e-54fe567ee0c1),
163 local,
164 pointer_default(unique)
165]
166interface IDXGIResource1 : IDXGIResource
167{
168 HRESULT CreateSubresourceSurface(
169 UINT index,
170 [out] IDXGISurface2 **surface
171 );
172 HRESULT CreateSharedHandle(
173 [in] const SECURITY_ATTRIBUTES *attributes,
174 [in] DWORD access,
175 [in] const WCHAR *name,
176 [out] HANDLE *handle
177 );
178}
179
180[
181 object,
182 uuid(ea9dbf1a-c88e-4486-854a-98aa0138f30c),
183 local,
184 pointer_default(unique)
185]
186interface IDXGIDisplayControl : IUnknown
187{
188 BOOL IsStereoEnabled();
189 void SetStereoEnabled(BOOL enabled);
190}
191
192[
193 object,
194 uuid(05008617-fbfd-4051-a790-144884b4f6a9),
195 local,
196 pointer_default(unique)
197]
198interface IDXGIDevice2 : IDXGIDevice1
199{
200 HRESULT OfferResources(
201 [in] UINT NumResources,
202 [in, size_is(NumResources)] IDXGIResource *const *ppResources,
203 [in] DXGI_OFFER_RESOURCE_PRIORITY Priority);
204
205 HRESULT ReclaimResources(
206 [in] UINT NumResources,
207 [in, size_is(NumResources)] IDXGIResource *const *ppResources,
208 [out, size_is(NumResources)] BOOL *pDiscarded);
209
210 HRESULT EnqueueSetEvent(
211 [in] HANDLE hEvent);
212}
213
214typedef enum DXGI_SCALING {
215 DXGI_SCALING_STRETCH = 0,
216 DXGI_SCALING_NONE = 1,
217 DXGI_SCALING_ASPECT_RATIO_STRETCH = 2,
218} DXGI_SCALING;
219
220typedef struct DXGI_SWAP_CHAIN_DESC1 {
221 UINT Width;
222 UINT Height;
223 DXGI_FORMAT Format;
224 BOOL Stereo;
225 DXGI_SAMPLE_DESC SampleDesc;
226 DXGI_USAGE BufferUsage;
227 UINT BufferCount;
228 DXGI_SCALING Scaling;
229 DXGI_SWAP_EFFECT SwapEffect;
230 DXGI_ALPHA_MODE AlphaMode;
231 UINT Flags;
232} DXGI_SWAP_CHAIN_DESC1;
233
234typedef struct DXGI_SWAP_CHAIN_FULLSCREEN_DESC {
235 DXGI_RATIONAL RefreshRate;
236 DXGI_MODE_SCANLINE_ORDER ScanlineOrdering;
237 DXGI_MODE_SCALING Scaling;
238 BOOL Windowed;
239} DXGI_SWAP_CHAIN_FULLSCREEN_DESC;
240
241typedef struct DXGI_PRESENT_PARAMETERS {
242 UINT DirtyRectsCount;
243 RECT *pDirtyRects;
244 RECT *pScrollRect;
245 POINT *pScrollOffset;
246} DXGI_PRESENT_PARAMETERS;
247
248[
249 object,
250 uuid(790a45f7-0d42-4876-983a-0a55cfe6f4aa),
251 local,
252 pointer_default(unique)
253]
254interface IDXGISwapChain1 : IDXGISwapChain
255{
256 HRESULT GetDesc1(
257 [out] DXGI_SWAP_CHAIN_DESC1 *pDesc);
258
259 HRESULT GetFullscreenDesc(
260 [out] DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pDesc);
261
262 HRESULT GetHwnd(
263 [out] HWND *pHwnd);
264
265 HRESULT GetCoreWindow(
266 [in] REFIID refiid,
267 [out] void **ppUnk);
268
269 HRESULT Present1(
270 [in] UINT SyncInterval,
271 [in] UINT PresentFlags,
272 [in] const DXGI_PRESENT_PARAMETERS *pPresentParameters);
273
274 BOOL IsTemporaryMonoSupported();
275
276 HRESULT GetRestrictToOutput(
277 [out] IDXGIOutput **ppRestrictToOutput);
278
279 HRESULT SetBackgroundColor(
280 [in] const DXGI_RGBA *pColor);
281
282 HRESULT GetBackgroundColor(
283 [out] DXGI_RGBA *pColor);
284
285 HRESULT SetRotation(
286 [in] DXGI_MODE_ROTATION Rotation);
287
288 HRESULT GetRotation(
289 [out] DXGI_MODE_ROTATION *pRotation);
290}
291
292[
293 object,
294 uuid(50c83a1c-e072-4c48-87b0-3630fa36a6d0),
295 local,
296 pointer_default(unique)
297]
298interface IDXGIFactory2 : IDXGIFactory1
299{
300 BOOL IsWindowedStereoEnabled();
301
302 HRESULT CreateSwapChainForHwnd(
303 [in] IUnknown *pDevice,
304 [in] HWND hWnd,
305 [in] const DXGI_SWAP_CHAIN_DESC1 *pDesc,
306 [in] const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc,
307 [in] IDXGIOutput *pRestrictToOutput,
308 [out] IDXGISwapChain1 **ppSwapChain);
309
310 HRESULT CreateSwapChainForCoreWindow(
311 [in] IUnknown *pDevice,
312 [in] IUnknown *pWindow,
313 [in] const DXGI_SWAP_CHAIN_DESC1 *pDesc,
314 [in] IDXGIOutput *pRestrictToOutput,
315 [out] IDXGISwapChain1 **ppSwapChain);
316
317 HRESULT GetSharedResourceAdapterLuid(
318 [in] HANDLE hResource,
319 [out] LUID *pLuid);
320
321 HRESULT RegisterStereoStatusWindow(
322 [in] HWND WindowHandle,
323 [in] UINT wMsg,
324 [out] DWORD *pdwCookie);
325
326 HRESULT RegisterStereoStatusEvent(
327 [in] HANDLE hEvent,
328 [out] DWORD *pdwCookie);
329
330 void UnregisterStereoStatus(
331 [in] DWORD dwCookie);
332
333 HRESULT RegisterOcclusionStatusWindow(
334 [in] HWND WindowHandle,
335 [in] UINT wMsg,
336 [out] DWORD *pdwCookie);
337
338 HRESULT RegisterOcclusionStatusEvent(
339 [in] HANDLE hEvent,
340 [out] DWORD *pdwCookie);
341
342 void UnregisterOcclusionStatus(
343 [in] DWORD dwCookie);
344
345 HRESULT CreateSwapChainForComposition(
346 [in] IUnknown *pDevice,
347 [in] const DXGI_SWAP_CHAIN_DESC1 *pDesc,
348 [in] IDXGIOutput *pRestrictToOutput,
349 [out] IDXGISwapChain1 **ppSwapChain);
350}
351
352typedef enum DXGI_GRAPHICS_PREEMPTION_GRANULARITY {
353 DXGI_GRAPHICS_PREEMPTION_DMA_BUFFER_BOUNDARY,
354 DXGI_GRAPHICS_PREEMPTION_PRIMITIVE_BOUNDARY,
355 DXGI_GRAPHICS_PREEMPTION_TRIANGLE_BOUNDARY,
356 DXGI_GRAPHICS_PREEMPTION_PIXEL_BOUNDARY,
357 DXGI_GRAPHICS_PREEMPTION_INSTRUCTION_BOUNDARY
358} DXGI_GRAPHICS_PREEMPTION_GRANULARITY;
359
360typedef enum DXGI_COMPUTE_PREEMPTION_GRANULARITY {
361 DXGI_COMPUTE_PREEMPTION_DMA_BUFFER_BOUNDARY,
362 DXGI_COMPUTE_PREEMPTION_DISPATCH_BOUNDARY,
363 DXGI_COMPUTE_PREEMPTION_THREAD_GROUP_BOUNDARY,
364 DXGI_COMPUTE_PREEMPTION_THREAD_BOUNDARY,
365 DXGI_COMPUTE_PREEMPTION_INSTRUCTION_BOUNDARY
366} DXGI_COMPUTE_PREEMPTION_GRANULARITY;
367
368typedef struct DXGI_ADAPTER_DESC2 {
369 WCHAR Description[128];
370 UINT VendorId;
371 UINT DeviceId;
372 UINT SubSysId;
373 UINT Revision;
374 SIZE_T DedicatedVideoMemory;
375 SIZE_T DedicatedSystemMemory;
376 SIZE_T SharedSystemMemory;
377 LUID AdapterLuid;
378 UINT Flags;
379 DXGI_GRAPHICS_PREEMPTION_GRANULARITY GraphicsPreemptionGranularity;
380 DXGI_COMPUTE_PREEMPTION_GRANULARITY ComputePreemptionGranularity;
381} DXGI_ADAPTER_DESC2;
382
383[
384 object,
385 uuid(0aa1ae0a-fa0e-4b84-8644-e05ff8e5acb5),
386 local,
387 pointer_default(unique)
388]
389interface IDXGIAdapter2 : IDXGIAdapter1
390{
391 HRESULT GetDesc2([out] DXGI_ADAPTER_DESC2 *pDesc);
392}
393
394[
395 object,
396 uuid(00cddea8-939b-4b83-a340-a685226666cc),
397 local,
398 pointer_default(unique)
399]
400interface IDXGIOutput1 : IDXGIOutput
401{
402 HRESULT GetDisplayModeList1(
403 [in] DXGI_FORMAT enum_format,
404 [in] UINT flags,
405 [in, out] UINT *num_modes,
406 [out] DXGI_MODE_DESC1 *desc
407 );
408
409 HRESULT FindClosestMatchingMode1(
410 [in] const DXGI_MODE_DESC1 *mode_to_match,
411 [out] DXGI_MODE_DESC1 *closest_match,
412 [in] IUnknown *concerned_device
413 );
414
415 HRESULT GetDisplaySurfaceData1(
416 [in] IDXGIResource *destination
417 );
418
419 HRESULT DuplicateOutput(
420 [in] IUnknown *device,
421 [out] IDXGIOutputDuplication **output_duplication
422 );
423}
Note: See TracBrowser for help on using the repository browser.