xmllite/tests: Fix a memory leak (Valgrind).
[wine.git] / include / dxgi1_2.idl
blob92f9c0e272102372df596840b061132d4a74f490
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;
36 object,
37 uuid(05008617-fbfd-4051-a790-144884b4f6a9),
38 local,
39 pointer_default(unique)
41 interface IDXGIDevice2 : IDXGIDevice1
43 HRESULT OfferResources(
44 [in] UINT NumResources,
45 [in, size_is(NumResources)] IDXGIResource *const *ppResources,
46 [in] DXGI_OFFER_RESOURCE_PRIORITY Priority);
48 HRESULT ReclaimResources(
49 [in] UINT NumResources,
50 [in, size_is(NumResources)] IDXGIResource *const *ppResources,
51 [out, size_is(NumResources)] BOOL *pDiscarded);
53 HRESULT EnqueueSetEvent(
54 [in] HANDLE hEvent);
57 typedef enum DXGI_SCALING {
58 DXGI_SCALING_STRETCH = 0,
59 DXGI_SCALING_NONE = 1
60 } DXGI_SCALING;
62 typedef struct DXGI_SWAP_CHAIN_DESC1 {
63 UINT Width;
64 UINT Height;
65 DXGI_FORMAT Format;
66 BOOL Stereo;
67 DXGI_SAMPLE_DESC SampleDesc;
68 DXGI_USAGE BufferUsage;
69 UINT BufferCount;
70 DXGI_SCALING Scaling;
71 DXGI_SWAP_EFFECT SwapEffect;
72 DXGI_ALPHA_MODE AlphaMode;
73 UINT Flags;
74 } DXGI_SWAP_CHAIN_DESC1;
76 typedef struct DXGI_SWAP_CHAIN_FULLSCREEN_DESC {
77 DXGI_RATIONAL RefreshRate;
78 DXGI_MODE_SCANLINE_ORDER ScanlineOrdering;
79 DXGI_MODE_SCALING Scaling;
80 BOOL Windowed;
81 } DXGI_SWAP_CHAIN_FULLSCREEN_DESC;
83 typedef struct DXGI_PRESENT_PARAMETERS {
84 UINT DirtyRectsCount;
85 RECT *pDirtyRects;
86 RECT *pScrollRect;
87 POINT *pScrollOffset;
88 } DXGI_PRESENT_PARAMETERS;
91 object,
92 uuid(790a45f7-0d42-4876-983a-0a55cfe6f4aa),
93 local,
94 pointer_default(unique)
96 interface IDXGISwapChain1 : IDXGISwapChain
98 HRESULT GetDesc1(
99 [out] DXGI_SWAP_CHAIN_DESC1 *pDesc);
101 HRESULT GetFullscreenDesc(
102 [out] DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pDesc);
104 HRESULT GetHwnd(
105 [out] HWND *pHwnd);
107 HRESULT GetCoreWindow(
108 [in] REFIID refiid,
109 [out] void **ppUnk);
111 HRESULT Present1(
112 [in] UINT SyncInterval,
113 [in] UINT PresentFlags,
114 [in] const DXGI_PRESENT_PARAMETERS *pPresentParameters);
116 BOOL IsTemporaryMonoSupported();
118 HRESULT GetRestrictToOutput(
119 [out] IDXGIOutput **ppRestrictToOutput);
121 HRESULT SetBackgroundColor(
122 [in] const DXGI_RGBA *pColor);
124 HRESULT GetBackgroundColor(
125 [out] DXGI_RGBA *pColor);
127 HRESULT SetRotation(
128 [in] DXGI_MODE_ROTATION Rotation);
130 HRESULT GetRotation(
131 [out] DXGI_MODE_ROTATION *pRotation);
135 object,
136 uuid(50c83a1c-e072-4c48-87b0-3630fa36a6d0),
137 local,
138 pointer_default(unique)
140 interface IDXGIFactory2 : IDXGIFactory1
142 BOOL IsWindowedStereoEnabled();
144 HRESULT CreateSwapChainForHwnd(
145 [in] IUnknown *pDevice,
146 [in] HWND hWnd,
147 [in] const DXGI_SWAP_CHAIN_DESC1 *pDesc,
148 [in] const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc,
149 [in] IDXGIOutput *pRestrictToOutput,
150 [out] IDXGISwapChain1 **ppSwapChain);
152 HRESULT CreateSwapChainForCoreWindow(
153 [in] IUnknown *pDevice,
154 [in] IUnknown *pWindow,
155 [in] const DXGI_SWAP_CHAIN_DESC1 *pDesc,
156 [in] IDXGIOutput *pRestrictToOutput,
157 [out] IDXGISwapChain1 **ppSwapChain);
159 HRESULT GetSharedResourceAdapterLuid(
160 [in] HANDLE hResource,
161 [out] LUID *pLuid);
163 HRESULT RegisterOcclusionStatusWindow(
164 [in] HWND WindowHandle,
165 [in] UINT wMsg,
166 [out] DWORD *pdwCookie);
168 HRESULT RegisterStereoStatusEvent(
169 [in] HANDLE hEvent,
170 [out] DWORD *pdwCookie);
172 void UnregisterStereoStatus(
173 [in] DWORD dwCookie);
175 HRESULT RegisterStereoStatusWindow(
176 [in] HWND WindowHandle,
177 [in] UINT wMsg,
178 [out] DWORD *pdwCookie);
180 HRESULT RegisterOcclusionStatusEvent(
181 [in] HANDLE hEvent,
182 [out] DWORD *pdwCookie);
184 void UnregisterOcclusionStatus(
185 [in] DWORD dwCookie);
187 HRESULT CreateSwapChainForComposition(
188 [in] IUnknown *pDevice,
189 [in] const DXGI_SWAP_CHAIN_DESC1 *pDesc,
190 [in] IDXGIOutput *pRestrictToOutput,
191 [out] IDXGISwapChain1 **ppSwapChain);
194 typedef enum DXGI_GRAPHICS_PREEMPTION_GRANULARITY {
195 DXGI_GRAPHICS_PREEMPTION_DMA_BUFFER_BOUNDARY,
196 DXGI_GRAPHICS_PREEMPTION_PRIMITIVE_BOUNDARY,
197 DXGI_GRAPHICS_PREEMPTION_TRIANGLE_BOUNDARY,
198 DXGI_GRAPHICS_PREEMPTION_PIXEL_BOUNDARY,
199 DXGI_GRAPHICS_PREEMPTION_INSTRUCTION_BOUNDARY
200 } DXGI_GRAPHICS_PREEMPTION_GRANULARITY;
202 typedef enum DXGI_COMPUTE_PREEMPTION_GRANULARITY {
203 DXGI_COMPUTE_PREEMPTION_DMA_BUFFER_BOUNDARY,
204 DXGI_COMPUTE_PREEMPTION_DISPATCH_BOUNDARY,
205 DXGI_COMPUTE_PREEMPTION_THREAD_GROUP_BOUNDARY,
206 DXGI_COMPUTE_PREEMPTION_THREAD_BOUNDARY,
207 DXGI_COMPUTE_PREEMPTION_INSTRUCTION_BOUNDARY
208 } DXGI_COMPUTE_PREEMPTION_GRANULARITY;
210 typedef struct DXGI_ADAPTER_DESC2 {
211 WCHAR Description[128];
212 UINT VendorId;
213 UINT DeviceId;
214 UINT SubSysId;
215 UINT Revision;
216 SIZE_T DedicatedVideoMemory;
217 SIZE_T DedicatedSystemMemory;
218 SIZE_T SharedSystemMemory;
219 LUID AdapterLuid;
220 UINT Flags;
221 DXGI_GRAPHICS_PREEMPTION_GRANULARITY GraphicsPreemptionGranularity;
222 DXGI_COMPUTE_PREEMPTION_GRANULARITY ComputePreemptionGranularity;
223 } DXGI_ADAPTER_DESC2;
226 object,
227 uuid(0aa1ae0a-fa0e-4b84-8644-e05ff8e5acb5),
228 local,
229 pointer_default(unique)
231 interface IDXGIAdapter2 : IDXGIAdapter1
233 HRESULT GetDesc2([out] DXGI_ADAPTER_DESC2 *pDesc);