po: Update Lithuanian translation.
[wine.git] / include / dxgi1_2.idl
blobeeabd031ed41614c67f5cbca4c03ded95669c3ec
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;
219 typedef struct DXGI_SWAP_CHAIN_DESC1 {
220 UINT Width;
221 UINT Height;
222 DXGI_FORMAT Format;
223 BOOL Stereo;
224 DXGI_SAMPLE_DESC SampleDesc;
225 DXGI_USAGE BufferUsage;
226 UINT BufferCount;
227 DXGI_SCALING Scaling;
228 DXGI_SWAP_EFFECT SwapEffect;
229 DXGI_ALPHA_MODE AlphaMode;
230 UINT Flags;
231 } DXGI_SWAP_CHAIN_DESC1;
233 typedef struct DXGI_SWAP_CHAIN_FULLSCREEN_DESC {
234 DXGI_RATIONAL RefreshRate;
235 DXGI_MODE_SCANLINE_ORDER ScanlineOrdering;
236 DXGI_MODE_SCALING Scaling;
237 BOOL Windowed;
238 } DXGI_SWAP_CHAIN_FULLSCREEN_DESC;
240 typedef struct DXGI_PRESENT_PARAMETERS {
241 UINT DirtyRectsCount;
242 RECT *pDirtyRects;
243 RECT *pScrollRect;
244 POINT *pScrollOffset;
245 } DXGI_PRESENT_PARAMETERS;
248 object,
249 uuid(790a45f7-0d42-4876-983a-0a55cfe6f4aa),
250 local,
251 pointer_default(unique)
253 interface IDXGISwapChain1 : IDXGISwapChain
255 HRESULT GetDesc1(
256 [out] DXGI_SWAP_CHAIN_DESC1 *pDesc);
258 HRESULT GetFullscreenDesc(
259 [out] DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pDesc);
261 HRESULT GetHwnd(
262 [out] HWND *pHwnd);
264 HRESULT GetCoreWindow(
265 [in] REFIID refiid,
266 [out] void **ppUnk);
268 HRESULT Present1(
269 [in] UINT SyncInterval,
270 [in] UINT PresentFlags,
271 [in] const DXGI_PRESENT_PARAMETERS *pPresentParameters);
273 BOOL IsTemporaryMonoSupported();
275 HRESULT GetRestrictToOutput(
276 [out] IDXGIOutput **ppRestrictToOutput);
278 HRESULT SetBackgroundColor(
279 [in] const DXGI_RGBA *pColor);
281 HRESULT GetBackgroundColor(
282 [out] DXGI_RGBA *pColor);
284 HRESULT SetRotation(
285 [in] DXGI_MODE_ROTATION Rotation);
287 HRESULT GetRotation(
288 [out] DXGI_MODE_ROTATION *pRotation);
292 object,
293 uuid(50c83a1c-e072-4c48-87b0-3630fa36a6d0),
294 local,
295 pointer_default(unique)
297 interface IDXGIFactory2 : IDXGIFactory1
299 BOOL IsWindowedStereoEnabled();
301 HRESULT CreateSwapChainForHwnd(
302 [in] IUnknown *pDevice,
303 [in] HWND hWnd,
304 [in] const DXGI_SWAP_CHAIN_DESC1 *pDesc,
305 [in] const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc,
306 [in] IDXGIOutput *pRestrictToOutput,
307 [out] IDXGISwapChain1 **ppSwapChain);
309 HRESULT CreateSwapChainForCoreWindow(
310 [in] IUnknown *pDevice,
311 [in] IUnknown *pWindow,
312 [in] const DXGI_SWAP_CHAIN_DESC1 *pDesc,
313 [in] IDXGIOutput *pRestrictToOutput,
314 [out] IDXGISwapChain1 **ppSwapChain);
316 HRESULT GetSharedResourceAdapterLuid(
317 [in] HANDLE hResource,
318 [out] LUID *pLuid);
320 HRESULT RegisterOcclusionStatusWindow(
321 [in] HWND WindowHandle,
322 [in] UINT wMsg,
323 [out] DWORD *pdwCookie);
325 HRESULT RegisterStereoStatusEvent(
326 [in] HANDLE hEvent,
327 [out] DWORD *pdwCookie);
329 void UnregisterStereoStatus(
330 [in] DWORD dwCookie);
332 HRESULT RegisterStereoStatusWindow(
333 [in] HWND WindowHandle,
334 [in] UINT wMsg,
335 [out] DWORD *pdwCookie);
337 HRESULT RegisterOcclusionStatusEvent(
338 [in] HANDLE hEvent,
339 [out] DWORD *pdwCookie);
341 void UnregisterOcclusionStatus(
342 [in] DWORD dwCookie);
344 HRESULT CreateSwapChainForComposition(
345 [in] IUnknown *pDevice,
346 [in] const DXGI_SWAP_CHAIN_DESC1 *pDesc,
347 [in] IDXGIOutput *pRestrictToOutput,
348 [out] IDXGISwapChain1 **ppSwapChain);
351 typedef enum DXGI_GRAPHICS_PREEMPTION_GRANULARITY {
352 DXGI_GRAPHICS_PREEMPTION_DMA_BUFFER_BOUNDARY,
353 DXGI_GRAPHICS_PREEMPTION_PRIMITIVE_BOUNDARY,
354 DXGI_GRAPHICS_PREEMPTION_TRIANGLE_BOUNDARY,
355 DXGI_GRAPHICS_PREEMPTION_PIXEL_BOUNDARY,
356 DXGI_GRAPHICS_PREEMPTION_INSTRUCTION_BOUNDARY
357 } DXGI_GRAPHICS_PREEMPTION_GRANULARITY;
359 typedef enum DXGI_COMPUTE_PREEMPTION_GRANULARITY {
360 DXGI_COMPUTE_PREEMPTION_DMA_BUFFER_BOUNDARY,
361 DXGI_COMPUTE_PREEMPTION_DISPATCH_BOUNDARY,
362 DXGI_COMPUTE_PREEMPTION_THREAD_GROUP_BOUNDARY,
363 DXGI_COMPUTE_PREEMPTION_THREAD_BOUNDARY,
364 DXGI_COMPUTE_PREEMPTION_INSTRUCTION_BOUNDARY
365 } DXGI_COMPUTE_PREEMPTION_GRANULARITY;
367 typedef struct DXGI_ADAPTER_DESC2 {
368 WCHAR Description[128];
369 UINT VendorId;
370 UINT DeviceId;
371 UINT SubSysId;
372 UINT Revision;
373 SIZE_T DedicatedVideoMemory;
374 SIZE_T DedicatedSystemMemory;
375 SIZE_T SharedSystemMemory;
376 LUID AdapterLuid;
377 UINT Flags;
378 DXGI_GRAPHICS_PREEMPTION_GRANULARITY GraphicsPreemptionGranularity;
379 DXGI_COMPUTE_PREEMPTION_GRANULARITY ComputePreemptionGranularity;
380 } DXGI_ADAPTER_DESC2;
383 object,
384 uuid(0aa1ae0a-fa0e-4b84-8644-e05ff8e5acb5),
385 local,
386 pointer_default(unique)
388 interface IDXGIAdapter2 : IDXGIAdapter1
390 HRESULT GetDesc2([out] DXGI_ADAPTER_DESC2 *pDesc);
394 object,
395 uuid(00cddea8-939b-4b83-a340-a685226666cc),
396 local,
397 pointer_default(unique)
399 interface IDXGIOutput1 : IDXGIOutput
401 HRESULT GetDisplayModeList1(
402 [in] DXGI_FORMAT enum_format,
403 [in] UINT flags,
404 [in, out] UINT *num_modes,
405 [out] DXGI_MODE_DESC1 *desc
408 HRESULT FindClosestMatchingMode1(
409 [in] const DXGI_MODE_DESC1 *mode_to_match,
410 [out] DXGI_MODE_DESC1 *closest_match,
411 [in] IUnknown *concerned_device
414 HRESULT GetDisplaySurfaceData1(
415 [in] IDXGIResource *destination
418 HRESULT DuplicateOutput(
419 [in] IUnknown *device,
420 [out] IDXGIOutputDuplication **output_duplication