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;
25 typedef UINT DXGI_USAGE;
26 const DXGI_USAGE DXGI_USAGE_SHADER_INPUT = 0x10L;
27 const DXGI_USAGE DXGI_USAGE_RENDER_TARGET_OUTPUT = 0x20L;
28 const DXGI_USAGE DXGI_USAGE_BACK_BUFFER = 0x40L;
29 const DXGI_USAGE DXGI_USAGE_SHARED = 0x80L;
30 const DXGI_USAGE DXGI_USAGE_READ_ONLY = 0x100L;
32 typedef enum DXGI_SWAP_EFFECT {
33 DXGI_SWAP_EFFECT_DISCARD = 0,
34 DXGI_SWAP_EFFECT_SEQUENTIAL = 1,
37 typedef struct DXGI_SURFACE_DESC {
41 DXGI_SAMPLE_DESC SampleDesc;
44 typedef struct DXGI_MAPPED_RECT {
49 typedef struct DXGI_OUTPUT_DESC {
51 RECT DesktopCoordinates;
52 BOOL AttachedToDesktop;
53 DXGI_MODE_ROTATION Rotation;
57 typedef struct DXGI_FRAME_STATISTICS {
59 UINT PresentRefreshCount;
60 UINT SyncRefreshCount;
61 LARGE_INTEGER SyncQPCTime;
62 LARGE_INTEGER SyncGPUTime;
63 } DXGI_FRAME_STATISTICS;
65 typedef struct DXGI_SWAP_CHAIN_DESC {
66 DXGI_MODE_DESC BufferDesc;
67 DXGI_SAMPLE_DESC SampleDesc;
68 DXGI_USAGE BufferUsage;
72 DXGI_SWAP_EFFECT SwapEffect;
74 } DXGI_SWAP_CHAIN_DESC;
79 uuid(aec22fb8-76f3-4639-9be0-28eb43a67a2e)
81 interface IDXGIObject : IUnknown
83 HRESULT SetPrivateData(
88 HRESULT SetPrivateDataInterface(
90 [in] const IUnknown *object
92 HRESULT GetPrivateData(
94 [in, out] UINT data_size,
106 uuid(3d3e0379-f9de-4d58-bb6c-18d62992f1a6)
108 interface IDXGIDeviceSubObject : IDXGIObject
119 uuid(cafcb56c-6ac3-4889-bf47-9e23bbd260ec)
121 interface IDXGISurface : IDXGIDeviceSubObject
124 [out] DXGI_SURFACE_DESC *desc
127 [out] DXGI_MAPPED_RECT *mapped_rect,
137 uuid(ae02eedb-c735-4690-8d52-5a8dc20213aa)
139 interface IDXGIOutput : IDXGIObject
142 [out] DXGI_OUTPUT_DESC *desc
144 HRESULT GetDisplayModeList(
145 [in] DXGI_FORMAT format,
147 [in, out] UINT *mode_count,
148 [out] DXGI_MODE_DESC *desc
150 HRESULT FindClosestMatchingMode(
151 [in] const DXGI_MODE_DESC *mode,
152 [out] DXGI_MODE_DESC *closest_match,
153 [in] IUnknown *device
155 HRESULT WaitForVBlank(
157 HRESULT TakeOwnership(
158 [in] IUnknown *device,
161 void ReleaseOwnership(
163 HRESULT GetGammaControlCapabilities(
164 [out] DXGI_GAMMA_CONTROL_CAPABILITIES *gamma_caps
166 HRESULT SetGammaControl(
167 [in] const DXGI_GAMMA_CONTROL *gamma_control
169 HRESULT GetGammaControl(
170 [out] DXGI_GAMMA_CONTROL *gamma_control
172 HRESULT SetDisplaySurface(
173 [in] IDXGISurface *surface
175 HRESULT GetDisplaySurfaceData(
176 [in] IDXGISurface *surface
178 HRESULT GetFrameStatistics(
179 [out] DXGI_FRAME_STATISTICS *stats
186 uuid(310d36a0-d2e7-4c0a-aa04-6a9d23b8886a)
188 interface IDXGISwapChain : IDXGIDeviceSubObject
191 [in] UINT sync_interval,
195 [in] UINT buffer_idx,
197 [in, out] void **surface
199 HRESULT SetFullscreenState(
200 [in] BOOL fullscreen,
201 [in] IDXGIOutput *target
203 HRESULT GetFullscreenState(
204 [out] BOOL *fullscreen,
205 [out] IDXGIOutput **target
208 [out] DXGI_SWAP_CHAIN_DESC *desc
210 HRESULT ResizeBuffers(
211 [in] UINT buffer_count,
214 [in] DXGI_FORMAT format,
217 HRESULT ResizeTarget(
218 [in] const DXGI_MODE_DESC target_mode_desc
220 HRESULT GetContainingOutput(
221 [out] IDXGIOutput **output
223 HRESULT GetFrameStatistics(
224 [out] DXGI_FRAME_STATISTICS *stats
226 HRESULT GetLastPresentCount(
227 [out] UINT *last_present_count