d3d11: Remove DECLSPEC_HIDDEN usage.
[wine.git] / include / dxgi1_2.idl
blob921a66e0c93456f253d559ce0e9aca719d68b698
1 /*
2 * Copyright 2014 Jacek Caban for CodeWeavers
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
19 import "dxgi.idl";
21 const UINT DXGI_ENUM_MODES_STEREO = 0x4;
22 const UINT DXGI_ENUM_MODES_DISABLED_STEREO = 0x8;
24 const DWORD DXGI_SHARED_RESOURCE_READ = 0x80000000;
25 const DWORD DXGI_SHARED_RESOURCE_WRITE = 0x00000001;
27 typedef 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;
33 typedef 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;
41 typedef struct DXGI_OUTDUPL_MOVE_RECT
43 POINT SourcePoint;
44 RECT DestinationRect;
45 } DXGI_OUTDUPL_MOVE_RECT;
47 typedef struct DXGI_OUTDUPL_DESC
49 DXGI_MODE_DESC ModeDesc;
50 DXGI_MODE_ROTATION Rotation;
51 BOOL DesktopImageInSystemMemory;
52 } DXGI_OUTDUPL_DESC;
54 typedef struct DXGI_OUTDUPL_POINTER_POSITION
56 POINT Position;
57 BOOL Visible;
58 } DXGI_OUTDUPL_POINTER_POSITION;
60 typedef enum DXGI_OUTDUPL_POINTER_SHAPE_TYPE
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;
67 typedef struct DXGI_OUTDUPL_POINTER_SHAPE_INFO
69 UINT Type;
70 UINT Width;
71 UINT Height;
72 UINT Pitch;
73 POINT HotSpot;
74 } DXGI_OUTDUPL_POINTER_SHAPE_INFO;
76 typedef struct DXGI_OUTDUPL_FRAME_INFO
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;
88 typedef struct DXGI_MODE_DESC1
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;
100 object,
101 uuid(191cfac3-a341-470d-b26e-a864f428319c),
102 local,
103 pointer_default(unique)
105 interface IDXGIOutputDuplication : IDXGIObject
107 void GetDesc(
108 [out] DXGI_OUTDUPL_DESC *desc
111 HRESULT AcquireNextFrame(
112 [in] UINT timeout_in_milliseconds,
113 [out] DXGI_OUTDUPL_FRAME_INFO *frame_info,
114 [out] IDXGIResource **desktop_resource
117 HRESULT GetFrameDirtyRects(
118 [in] UINT dirty_rects_buffer_size,
119 [out] RECT *dirty_rects_buffer,
120 [out] UINT *dirty_rects_buffer_size_required
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
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
136 HRESULT MapDesktopSurface(
137 [out] DXGI_MAPPED_RECT *locked_rect
140 HRESULT UnMapDesktopSurface();
142 HRESULT ReleaseFrame();
146 object,
147 uuid(aba496dd-b617-4cb8-a866-bc44d7eb1fa2),
148 local,
149 pointer_default(unique)
151 interface IDXGISurface2 : IDXGISurface1
153 HRESULT GetResource(
154 [in] REFIID iid,
155 [out] void **parent_resource,
156 [out] UINT *subresource_idx
161 object,
162 uuid(30961379-4609-4a41-998e-54fe567ee0c1),
163 local,
164 pointer_default(unique)
166 interface IDXGIResource1 : IDXGIResource
168 HRESULT CreateSubresourceSurface(
169 UINT index,
170 [out] IDXGISurface2 **surface
172 HRESULT CreateSharedHandle(
173 [in] const SECURITY_ATTRIBUTES *attributes,
174 [in] DWORD access,
175 [in] const WCHAR *name,
176 [out] HANDLE *handle
181 object,
182 uuid(ea9dbf1a-c88e-4486-854a-98aa0138f30c),
183 local,
184 pointer_default(unique)
186 interface IDXGIDisplayControl : IUnknown
188 BOOL IsStereoEnabled();
189 void SetStereoEnabled(BOOL enabled);
193 object,
194 uuid(05008617-fbfd-4051-a790-144884b4f6a9),
195 local,
196 pointer_default(unique)
198 interface IDXGIDevice2 : IDXGIDevice1
200 HRESULT OfferResources(
201 [in] UINT NumResources,
202 [in, size_is(NumResources)] IDXGIResource *const *ppResources,
203 [in] DXGI_OFFER_RESOURCE_PRIORITY Priority);
205 HRESULT ReclaimResources(
206 [in] UINT NumResources,
207 [in, size_is(NumResources)] IDXGIResource *const *ppResources,
208 [out, size_is(NumResources)] BOOL *pDiscarded);
210 HRESULT EnqueueSetEvent(
211 [in] HANDLE hEvent);
214 typedef enum DXGI_SCALING {
215 DXGI_SCALING_STRETCH = 0,
216 DXGI_SCALING_NONE = 1,
217 DXGI_SCALING_ASPECT_RATIO_STRETCH = 2,
218 } DXGI_SCALING;
220 typedef 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;
234 typedef 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;
241 typedef struct DXGI_PRESENT_PARAMETERS {
242 UINT DirtyRectsCount;
243 RECT *pDirtyRects;
244 RECT *pScrollRect;
245 POINT *pScrollOffset;
246 } DXGI_PRESENT_PARAMETERS;
249 object,
250 uuid(790a45f7-0d42-4876-983a-0a55cfe6f4aa),
251 local,
252 pointer_default(unique)
254 interface IDXGISwapChain1 : IDXGISwapChain
256 HRESULT GetDesc1(
257 [out] DXGI_SWAP_CHAIN_DESC1 *pDesc);
259 HRESULT GetFullscreenDesc(
260 [out] DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pDesc);
262 HRESULT GetHwnd(
263 [out] HWND *pHwnd);
265 HRESULT GetCoreWindow(
266 [in] REFIID refiid,
267 [out] void **ppUnk);
269 HRESULT Present1(
270 [in] UINT SyncInterval,
271 [in] UINT PresentFlags,
272 [in] const DXGI_PRESENT_PARAMETERS *pPresentParameters);
274 BOOL IsTemporaryMonoSupported();
276 HRESULT GetRestrictToOutput(
277 [out] IDXGIOutput **ppRestrictToOutput);
279 HRESULT SetBackgroundColor(
280 [in] const DXGI_RGBA *pColor);
282 HRESULT GetBackgroundColor(
283 [out] DXGI_RGBA *pColor);
285 HRESULT SetRotation(
286 [in] DXGI_MODE_ROTATION Rotation);
288 HRESULT GetRotation(
289 [out] DXGI_MODE_ROTATION *pRotation);
293 object,
294 uuid(50c83a1c-e072-4c48-87b0-3630fa36a6d0),
295 local,
296 pointer_default(unique)
298 interface IDXGIFactory2 : IDXGIFactory1
300 BOOL IsWindowedStereoEnabled();
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);
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);
317 HRESULT GetSharedResourceAdapterLuid(
318 [in] HANDLE hResource,
319 [out] LUID *pLuid);
321 HRESULT RegisterStereoStatusWindow(
322 [in] HWND WindowHandle,
323 [in] UINT wMsg,
324 [out] DWORD *pdwCookie);
326 HRESULT RegisterStereoStatusEvent(
327 [in] HANDLE hEvent,
328 [out] DWORD *pdwCookie);
330 void UnregisterStereoStatus(
331 [in] DWORD dwCookie);
333 HRESULT RegisterOcclusionStatusWindow(
334 [in] HWND WindowHandle,
335 [in] UINT wMsg,
336 [out] DWORD *pdwCookie);
338 HRESULT RegisterOcclusionStatusEvent(
339 [in] HANDLE hEvent,
340 [out] DWORD *pdwCookie);
342 void UnregisterOcclusionStatus(
343 [in] DWORD dwCookie);
345 HRESULT CreateSwapChainForComposition(
346 [in] IUnknown *pDevice,
347 [in] const DXGI_SWAP_CHAIN_DESC1 *pDesc,
348 [in] IDXGIOutput *pRestrictToOutput,
349 [out] IDXGISwapChain1 **ppSwapChain);
352 typedef 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;
360 typedef 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;
368 typedef 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;
384 object,
385 uuid(0aa1ae0a-fa0e-4b84-8644-e05ff8e5acb5),
386 local,
387 pointer_default(unique)
389 interface IDXGIAdapter2 : IDXGIAdapter1
391 HRESULT GetDesc2([out] DXGI_ADAPTER_DESC2 *pDesc);
395 object,
396 uuid(00cddea8-939b-4b83-a340-a685226666cc),
397 local,
398 pointer_default(unique)
400 interface IDXGIOutput1 : IDXGIOutput
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
409 HRESULT FindClosestMatchingMode1(
410 [in] const DXGI_MODE_DESC1 *mode_to_match,
411 [out] DXGI_MODE_DESC1 *closest_match,
412 [in] IUnknown *concerned_device
415 HRESULT GetDisplaySurfaceData1(
416 [in] IDXGIResource *destination
419 HRESULT DuplicateOutput(
420 [in] IUnknown *device,
421 [out] IDXGIOutputDuplication **output_duplication