xinput9_1_0: Avoid DLL forwarding.
[wine.git] / include / dxgi1_2.idl
blob64163dd23de83ce21c3333af396d81fe3a6cfb7f
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 typedef enum _DXGI_OFFER_RESOURCE_PRIORITY {
22 DXGI_OFFER_RESOURCE_PRIORITY_LOW = 1,
23 DXGI_OFFER_RESOURCE_PRIORITY_NORMAL,
24 DXGI_OFFER_RESOURCE_PRIORITY_HIGH
25 } DXGI_OFFER_RESOURCE_PRIORITY;
27 typedef enum DXGI_ALPHA_MODE {
28 DXGI_ALPHA_MODE_UNSPECIFIED = 0,
29 DXGI_ALPHA_MODE_PREMULTIPLIED = 1,
30 DXGI_ALPHA_MODE_STRAIGHT = 2,
31 DXGI_ALPHA_MODE_IGNORE = 3,
32 DXGI_ALPHA_MODE_FORCE_DWORD = 0xffffffff
33 } DXGI_ALPHA_MODE;
35 typedef struct DXGI_OUTDUPL_MOVE_RECT
37 POINT SourcePoint;
38 RECT DestinationRect;
39 } DXGI_OUTDUPL_MOVE_RECT;
41 typedef struct DXGI_OUTDUPL_DESC
43 DXGI_MODE_DESC ModeDesc;
44 DXGI_MODE_ROTATION Rotation;
45 BOOL DesktopImageInSystemMemory;
46 } DXGI_OUTDUPL_DESC;
48 typedef struct DXGI_OUTDUPL_POINTER_POSITION
50 POINT Position;
51 BOOL Visible;
52 } DXGI_OUTDUPL_POINTER_POSITION;
54 typedef enum DXGI_OUTDUPL_POINTER_SHAPE_TYPE
56 DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MONOCHROME = 0x00000001,
57 DXGI_OUTDUPL_POINTER_SHAPE_TYPE_COLOR = 0x00000002,
58 DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MASKED_COLOR = 0x00000004
59 } DXGI_OUTDUPL_POINTER_SHAPE_TYPE;
61 typedef struct DXGI_OUTDUPL_POINTER_SHAPE_INFO
63 UINT Type;
64 UINT Width;
65 UINT Height;
66 UINT Pitch;
67 POINT HotSpot;
68 } DXGI_OUTDUPL_POINTER_SHAPE_INFO;
70 typedef struct DXGI_OUTDUPL_FRAME_INFO
72 LARGE_INTEGER LastPresentTime;
73 LARGE_INTEGER LastMouseUpdateTime;
74 UINT AccumulatedFrames;
75 BOOL RectsCoalesced;
76 BOOL ProtectedContentMaskedOut;
77 DXGI_OUTDUPL_POINTER_POSITION PointerPosition;
78 UINT TotalMetadataBufferSize;
79 UINT PointerShapeBufferSize;
80 } DXGI_OUTDUPL_FRAME_INFO;
82 typedef struct DXGI_MODE_DESC1
84 UINT Width;
85 UINT Height;
86 DXGI_RATIONAL RefreshRate;
87 DXGI_FORMAT Format;
88 DXGI_MODE_SCANLINE_ORDER ScanlineOrdering;
89 DXGI_MODE_SCALING Scaling;
90 BOOL Stereo;
91 } DXGI_MODE_DESC1;
94 object,
95 uuid(191cfac3-a341-470d-b26e-a864f428319c),
96 local,
97 pointer_default(unique)
99 interface IDXGIOutputDuplication : IDXGIObject
101 void GetDesc(
102 [out] DXGI_OUTDUPL_DESC *desc
105 HRESULT AcquireNextFrame(
106 [in] UINT timeout_in_milliseconds,
107 [out] DXGI_OUTDUPL_FRAME_INFO *frame_info,
108 [out] IDXGIResource **desktop_resource
111 HRESULT GetFrameDirtyRects(
112 [in] UINT dirty_rects_buffer_size,
113 [out] RECT *dirty_rects_buffer,
114 [out] UINT *dirty_rects_buffer_size_required
117 HRESULT GetFrameMoveRects(
118 [in] UINT move_rects_buffer_size,
119 [out] DXGI_OUTDUPL_MOVE_RECT *move_rect_buffer,
120 [out] UINT *move_rects_buffer_size_required
123 HRESULT GetFramePointerShape(
124 [in] UINT pointer_shape_buffer_size,
125 [out] void *pointer_shape_buffer,
126 [out] UINT *pointer_shape_buffer_size_required,
127 [out] DXGI_OUTDUPL_POINTER_SHAPE_INFO *pointer_shape_info
130 HRESULT MapDesktopSurface(
131 [out] DXGI_MAPPED_RECT *locked_rect
134 HRESULT UnMapDesktopSurface();
136 HRESULT ReleaseFrame();
140 object,
141 uuid(ea9dbf1a-c88e-4486-854a-98aa0138f30c),
142 local,
143 pointer_default(unique)
145 interface IDXGIDisplayControl : IUnknown
147 BOOL IsStereoEnabled();
148 void SetStereoEnabled(BOOL enabled);
152 object,
153 uuid(05008617-fbfd-4051-a790-144884b4f6a9),
154 local,
155 pointer_default(unique)
157 interface IDXGIDevice2 : IDXGIDevice1
159 HRESULT OfferResources(
160 [in] UINT NumResources,
161 [in, size_is(NumResources)] IDXGIResource *const *ppResources,
162 [in] DXGI_OFFER_RESOURCE_PRIORITY Priority);
164 HRESULT ReclaimResources(
165 [in] UINT NumResources,
166 [in, size_is(NumResources)] IDXGIResource *const *ppResources,
167 [out, size_is(NumResources)] BOOL *pDiscarded);
169 HRESULT EnqueueSetEvent(
170 [in] HANDLE hEvent);
173 typedef enum DXGI_SCALING {
174 DXGI_SCALING_STRETCH = 0,
175 DXGI_SCALING_NONE = 1
176 } DXGI_SCALING;
178 typedef struct DXGI_SWAP_CHAIN_DESC1 {
179 UINT Width;
180 UINT Height;
181 DXGI_FORMAT Format;
182 BOOL Stereo;
183 DXGI_SAMPLE_DESC SampleDesc;
184 DXGI_USAGE BufferUsage;
185 UINT BufferCount;
186 DXGI_SCALING Scaling;
187 DXGI_SWAP_EFFECT SwapEffect;
188 DXGI_ALPHA_MODE AlphaMode;
189 UINT Flags;
190 } DXGI_SWAP_CHAIN_DESC1;
192 typedef struct DXGI_SWAP_CHAIN_FULLSCREEN_DESC {
193 DXGI_RATIONAL RefreshRate;
194 DXGI_MODE_SCANLINE_ORDER ScanlineOrdering;
195 DXGI_MODE_SCALING Scaling;
196 BOOL Windowed;
197 } DXGI_SWAP_CHAIN_FULLSCREEN_DESC;
199 typedef struct DXGI_PRESENT_PARAMETERS {
200 UINT DirtyRectsCount;
201 RECT *pDirtyRects;
202 RECT *pScrollRect;
203 POINT *pScrollOffset;
204 } DXGI_PRESENT_PARAMETERS;
207 object,
208 uuid(790a45f7-0d42-4876-983a-0a55cfe6f4aa),
209 local,
210 pointer_default(unique)
212 interface IDXGISwapChain1 : IDXGISwapChain
214 HRESULT GetDesc1(
215 [out] DXGI_SWAP_CHAIN_DESC1 *pDesc);
217 HRESULT GetFullscreenDesc(
218 [out] DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pDesc);
220 HRESULT GetHwnd(
221 [out] HWND *pHwnd);
223 HRESULT GetCoreWindow(
224 [in] REFIID refiid,
225 [out] void **ppUnk);
227 HRESULT Present1(
228 [in] UINT SyncInterval,
229 [in] UINT PresentFlags,
230 [in] const DXGI_PRESENT_PARAMETERS *pPresentParameters);
232 BOOL IsTemporaryMonoSupported();
234 HRESULT GetRestrictToOutput(
235 [out] IDXGIOutput **ppRestrictToOutput);
237 HRESULT SetBackgroundColor(
238 [in] const DXGI_RGBA *pColor);
240 HRESULT GetBackgroundColor(
241 [out] DXGI_RGBA *pColor);
243 HRESULT SetRotation(
244 [in] DXGI_MODE_ROTATION Rotation);
246 HRESULT GetRotation(
247 [out] DXGI_MODE_ROTATION *pRotation);
251 object,
252 uuid(50c83a1c-e072-4c48-87b0-3630fa36a6d0),
253 local,
254 pointer_default(unique)
256 interface IDXGIFactory2 : IDXGIFactory1
258 BOOL IsWindowedStereoEnabled();
260 HRESULT CreateSwapChainForHwnd(
261 [in] IUnknown *pDevice,
262 [in] HWND hWnd,
263 [in] const DXGI_SWAP_CHAIN_DESC1 *pDesc,
264 [in] const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc,
265 [in] IDXGIOutput *pRestrictToOutput,
266 [out] IDXGISwapChain1 **ppSwapChain);
268 HRESULT CreateSwapChainForCoreWindow(
269 [in] IUnknown *pDevice,
270 [in] IUnknown *pWindow,
271 [in] const DXGI_SWAP_CHAIN_DESC1 *pDesc,
272 [in] IDXGIOutput *pRestrictToOutput,
273 [out] IDXGISwapChain1 **ppSwapChain);
275 HRESULT GetSharedResourceAdapterLuid(
276 [in] HANDLE hResource,
277 [out] LUID *pLuid);
279 HRESULT RegisterOcclusionStatusWindow(
280 [in] HWND WindowHandle,
281 [in] UINT wMsg,
282 [out] DWORD *pdwCookie);
284 HRESULT RegisterStereoStatusEvent(
285 [in] HANDLE hEvent,
286 [out] DWORD *pdwCookie);
288 void UnregisterStereoStatus(
289 [in] DWORD dwCookie);
291 HRESULT RegisterStereoStatusWindow(
292 [in] HWND WindowHandle,
293 [in] UINT wMsg,
294 [out] DWORD *pdwCookie);
296 HRESULT RegisterOcclusionStatusEvent(
297 [in] HANDLE hEvent,
298 [out] DWORD *pdwCookie);
300 void UnregisterOcclusionStatus(
301 [in] DWORD dwCookie);
303 HRESULT CreateSwapChainForComposition(
304 [in] IUnknown *pDevice,
305 [in] const DXGI_SWAP_CHAIN_DESC1 *pDesc,
306 [in] IDXGIOutput *pRestrictToOutput,
307 [out] IDXGISwapChain1 **ppSwapChain);
310 typedef enum DXGI_GRAPHICS_PREEMPTION_GRANULARITY {
311 DXGI_GRAPHICS_PREEMPTION_DMA_BUFFER_BOUNDARY,
312 DXGI_GRAPHICS_PREEMPTION_PRIMITIVE_BOUNDARY,
313 DXGI_GRAPHICS_PREEMPTION_TRIANGLE_BOUNDARY,
314 DXGI_GRAPHICS_PREEMPTION_PIXEL_BOUNDARY,
315 DXGI_GRAPHICS_PREEMPTION_INSTRUCTION_BOUNDARY
316 } DXGI_GRAPHICS_PREEMPTION_GRANULARITY;
318 typedef enum DXGI_COMPUTE_PREEMPTION_GRANULARITY {
319 DXGI_COMPUTE_PREEMPTION_DMA_BUFFER_BOUNDARY,
320 DXGI_COMPUTE_PREEMPTION_DISPATCH_BOUNDARY,
321 DXGI_COMPUTE_PREEMPTION_THREAD_GROUP_BOUNDARY,
322 DXGI_COMPUTE_PREEMPTION_THREAD_BOUNDARY,
323 DXGI_COMPUTE_PREEMPTION_INSTRUCTION_BOUNDARY
324 } DXGI_COMPUTE_PREEMPTION_GRANULARITY;
326 typedef struct DXGI_ADAPTER_DESC2 {
327 WCHAR Description[128];
328 UINT VendorId;
329 UINT DeviceId;
330 UINT SubSysId;
331 UINT Revision;
332 SIZE_T DedicatedVideoMemory;
333 SIZE_T DedicatedSystemMemory;
334 SIZE_T SharedSystemMemory;
335 LUID AdapterLuid;
336 UINT Flags;
337 DXGI_GRAPHICS_PREEMPTION_GRANULARITY GraphicsPreemptionGranularity;
338 DXGI_COMPUTE_PREEMPTION_GRANULARITY ComputePreemptionGranularity;
339 } DXGI_ADAPTER_DESC2;
342 object,
343 uuid(0aa1ae0a-fa0e-4b84-8644-e05ff8e5acb5),
344 local,
345 pointer_default(unique)
347 interface IDXGIAdapter2 : IDXGIAdapter1
349 HRESULT GetDesc2([out] DXGI_ADAPTER_DESC2 *pDesc);
353 object,
354 uuid(00cddea8-939b-4b83-a340-a685226666cc),
355 local,
356 pointer_default(unique)
358 interface IDXGIOutput1 : IDXGIOutput
360 HRESULT GetDisplayModeList1(
361 [in] DXGI_FORMAT enum_format,
362 [in] UINT flags,
363 [in, out] UINT *num_modes,
364 [out] DXGI_MODE_DESC1 *desc
367 HRESULT FindClosestMatchingMode1(
368 [in] const DXGI_MODE_DESC1 *mode_to_match,
369 [out] DXGI_MODE_DESC1 *closest_match,
370 [in] IUnknown *concerned_device
373 HRESULT GetDisplaySurfaceData1(
374 [in] IDXGIResource *destination
377 HRESULT DuplicateOutput(
378 [in] IUnknown *device,
379 [out] IDXGIOutputDuplication **output_duplication