tools: Convert source files to utf-8.
[wine/multimedia.git] / include / dxgi.idl
blob8cba6156cb84dc117311c126ffdfd3c4d467a1e8
1 /*
2 * Copyright 2007 Andras Kovacs
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 "dxgitype.idl";
21 cpp_quote("#if 0")
22 typedef HANDLE HMONITOR;
23 typedef struct _LUID {
24 DWORD LowPart;
25 LONG HighPart;
26 } LUID, *PLUID;
27 cpp_quote("#endif")
29 typedef UINT DXGI_USAGE;
30 const DXGI_USAGE DXGI_USAGE_SHADER_INPUT = 0x10L;
31 const DXGI_USAGE DXGI_USAGE_RENDER_TARGET_OUTPUT = 0x20L;
32 const DXGI_USAGE DXGI_USAGE_BACK_BUFFER = 0x40L;
33 const DXGI_USAGE DXGI_USAGE_SHARED = 0x80L;
34 const DXGI_USAGE DXGI_USAGE_READ_ONLY = 0x100L;
36 typedef enum DXGI_SWAP_EFFECT {
37 DXGI_SWAP_EFFECT_DISCARD = 0,
38 DXGI_SWAP_EFFECT_SEQUENTIAL = 1,
39 } DXGI_SWAP_EFFECT;
41 typedef struct DXGI_SURFACE_DESC {
42 UINT Width;
43 UINT Height;
44 DXGI_FORMAT Format;
45 DXGI_SAMPLE_DESC SampleDesc;
46 } DXGI_SURFACE_DESC;
48 typedef struct DXGI_MAPPED_RECT {
49 INT Pitch;
50 BYTE *pBits;
51 } DXGI_MAPPED_RECT;
53 typedef struct DXGI_OUTPUT_DESC {
54 WCHAR DeviceName[32];
55 RECT DesktopCoordinates;
56 BOOL AttachedToDesktop;
57 DXGI_MODE_ROTATION Rotation;
58 HMONITOR Monitor;
59 } DXGI_OUTPUT_DESC;
61 typedef struct DXGI_FRAME_STATISTICS {
62 UINT PresentCount;
63 UINT PresentRefreshCount;
64 UINT SyncRefreshCount;
65 LARGE_INTEGER SyncQPCTime;
66 LARGE_INTEGER SyncGPUTime;
67 } DXGI_FRAME_STATISTICS;
69 typedef struct DXGI_ADAPTER_DESC {
70 WCHAR Description[128];
71 UINT VendorId;
72 UINT DeviceId;
73 UINT SubSysId;
74 UINT Revision;
75 SIZE_T DedicatedVideoMemory;
76 SIZE_T DedicatedSystemMemory;
77 SIZE_T SharedSystemMemory;
78 LUID AdapterLuid;
79 } DXGI_ADAPTER_DESC;
81 typedef struct DXGI_SWAP_CHAIN_DESC {
82 DXGI_MODE_DESC BufferDesc;
83 DXGI_SAMPLE_DESC SampleDesc;
84 DXGI_USAGE BufferUsage;
85 UINT BufferCount;
86 HWND OutputWindow;
87 BOOL Windowed;
88 DXGI_SWAP_EFFECT SwapEffect;
89 UINT Flags;
90 } DXGI_SWAP_CHAIN_DESC;
93 object,
94 local,
95 uuid(aec22fb8-76f3-4639-9be0-28eb43a67a2e)
97 interface IDXGIObject : IUnknown
99 HRESULT SetPrivateData(
100 [in] REFGUID guid,
101 [in] UINT data_size,
102 [in] const void *data
104 HRESULT SetPrivateDataInterface(
105 [in] REFGUID guid,
106 [in] const IUnknown *object
108 HRESULT GetPrivateData(
109 [in] REFGUID guid,
110 [in, out] UINT data_size,
111 [out] void *data
113 HRESULT GetParent(
114 [in] REFIID riid,
115 [out] void **parent
120 object,
121 local,
122 uuid(3d3e0379-f9de-4d58-bb6c-18d62992f1a6)
124 interface IDXGIDeviceSubObject : IDXGIObject
126 HRESULT GetDevice(
127 [in] REFIID riid,
128 [out] void **device
133 object,
134 local,
135 uuid(cafcb56c-6ac3-4889-bf47-9e23bbd260ec)
137 interface IDXGISurface : IDXGIDeviceSubObject
139 HRESULT GetDesc(
140 [out] DXGI_SURFACE_DESC *desc
142 HRESULT Map(
143 [out] DXGI_MAPPED_RECT *mapped_rect,
144 [in] UINT flags
146 HRESULT Unmap(
151 object,
152 local,
153 uuid(ae02eedb-c735-4690-8d52-5a8dc20213aa)
155 interface IDXGIOutput : IDXGIObject
157 HRESULT GetDesc(
158 [out] DXGI_OUTPUT_DESC *desc
160 HRESULT GetDisplayModeList(
161 [in] DXGI_FORMAT format,
162 [in] UINT flags,
163 [in, out] UINT *mode_count,
164 [out] DXGI_MODE_DESC *desc
166 HRESULT FindClosestMatchingMode(
167 [in] const DXGI_MODE_DESC *mode,
168 [out] DXGI_MODE_DESC *closest_match,
169 [in] IUnknown *device
171 HRESULT WaitForVBlank(
173 HRESULT TakeOwnership(
174 [in] IUnknown *device,
175 [in] BOOL exclusive
177 void ReleaseOwnership(
179 HRESULT GetGammaControlCapabilities(
180 [out] DXGI_GAMMA_CONTROL_CAPABILITIES *gamma_caps
182 HRESULT SetGammaControl(
183 [in] const DXGI_GAMMA_CONTROL *gamma_control
185 HRESULT GetGammaControl(
186 [out] DXGI_GAMMA_CONTROL *gamma_control
188 HRESULT SetDisplaySurface(
189 [in] IDXGISurface *surface
191 HRESULT GetDisplaySurfaceData(
192 [in] IDXGISurface *surface
194 HRESULT GetFrameStatistics(
195 [out] DXGI_FRAME_STATISTICS *stats
200 object,
201 local,
202 uuid(2411e7e1-12ac-4ccf-bd14-9798e8534dc0)
204 interface IDXGIAdapter : IDXGIObject
206 HRESULT EnumOutputs(
207 [in] UINT output_idx,
208 [in, out] IDXGIOutput **output
210 HRESULT GetDesc(
211 [out] DXGI_ADAPTER_DESC *desc
213 HRESULT CheckInterfaceSupport(
214 [in] REFGUID guid,
215 [out] LARGE_INTEGER umd_version
220 object,
221 local,
222 uuid(310d36a0-d2e7-4c0a-aa04-6a9d23b8886a)
224 interface IDXGISwapChain : IDXGIDeviceSubObject
226 HRESULT Present(
227 [in] UINT sync_interval,
228 [in] UINT flags
230 HRESULT GetBuffer(
231 [in] UINT buffer_idx,
232 [in] REFIID riid,
233 [in, out] void **surface
235 HRESULT SetFullscreenState(
236 [in] BOOL fullscreen,
237 [in] IDXGIOutput *target
239 HRESULT GetFullscreenState(
240 [out] BOOL *fullscreen,
241 [out] IDXGIOutput **target
243 HRESULT GetDesc(
244 [out] DXGI_SWAP_CHAIN_DESC *desc
246 HRESULT ResizeBuffers(
247 [in] UINT buffer_count,
248 [in] UINT width,
249 [in] UINT height,
250 [in] DXGI_FORMAT format,
251 [in] UINT flags
253 HRESULT ResizeTarget(
254 [in] const DXGI_MODE_DESC target_mode_desc
256 HRESULT GetContainingOutput(
257 [out] IDXGIOutput **output
259 HRESULT GetFrameStatistics(
260 [out] DXGI_FRAME_STATISTICS *stats
262 HRESULT GetLastPresentCount(
263 [out] UINT *last_present_count