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";
22 typedef HANDLE HMONITOR;
23 typedef struct _LUID {
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,
41 typedef struct DXGI_SURFACE_DESC {
45 DXGI_SAMPLE_DESC SampleDesc;
48 typedef struct DXGI_MAPPED_RECT {
53 typedef struct DXGI_OUTPUT_DESC {
55 RECT DesktopCoordinates;
56 BOOL AttachedToDesktop;
57 DXGI_MODE_ROTATION Rotation;
61 typedef struct DXGI_FRAME_STATISTICS {
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];
75 SIZE_T DedicatedVideoMemory;
76 SIZE_T DedicatedSystemMemory;
77 SIZE_T SharedSystemMemory;
81 typedef struct DXGI_SWAP_CHAIN_DESC {
82 DXGI_MODE_DESC BufferDesc;
83 DXGI_SAMPLE_DESC SampleDesc;
84 DXGI_USAGE BufferUsage;
88 DXGI_SWAP_EFFECT SwapEffect;
90 } DXGI_SWAP_CHAIN_DESC;
95 uuid(aec22fb8-76f3-4639-9be0-28eb43a67a2e)
97 interface IDXGIObject : IUnknown
99 HRESULT SetPrivateData(
102 [in] const void *data
104 HRESULT SetPrivateDataInterface(
106 [in] const IUnknown *object
108 HRESULT GetPrivateData(
110 [in, out] UINT *data_size,
122 uuid(3d3e0379-f9de-4d58-bb6c-18d62992f1a6)
124 interface IDXGIDeviceSubObject : IDXGIObject
135 uuid(cafcb56c-6ac3-4889-bf47-9e23bbd260ec)
137 interface IDXGISurface : IDXGIDeviceSubObject
140 [out] DXGI_SURFACE_DESC *desc
143 [out] DXGI_MAPPED_RECT *mapped_rect,
153 uuid(ae02eedb-c735-4690-8d52-5a8dc20213aa)
155 interface IDXGIOutput : IDXGIObject
158 [out] DXGI_OUTPUT_DESC *desc
160 HRESULT GetDisplayModeList(
161 [in] DXGI_FORMAT format,
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,
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
202 uuid(2411e7e1-12ac-4ccf-bd14-9798e8534dc0)
204 interface IDXGIAdapter : IDXGIObject
207 [in] UINT output_idx,
208 [in, out] IDXGIOutput **output
211 [out] DXGI_ADAPTER_DESC *desc
213 HRESULT CheckInterfaceSupport(
215 [out] LARGE_INTEGER *umd_version
222 uuid(310d36a0-d2e7-4c0a-aa04-6a9d23b8886a)
224 interface IDXGISwapChain : IDXGIDeviceSubObject
227 [in] UINT sync_interval,
231 [in] UINT buffer_idx,
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
244 [out] DXGI_SWAP_CHAIN_DESC *desc
246 HRESULT ResizeBuffers(
247 [in] UINT buffer_count,
250 [in] DXGI_FORMAT format,
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