VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/dxgi.idl@ 19982

Last change on this file since 19982 was 19678, checked in by vboxsync, 16 years ago

opengl: update wine to 1.1.21, add d3d9.dll to build list

  • Property svn:eol-style set to native
File size: 10.2 KB
Line 
1/*
2 * Copyright 2007 Andras Kovacs
3 *
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.
8 *
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.
13 *
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
17 */
18
19/*
20 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
21 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
22 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
23 * a choice of LGPL license versions is made available with the language indicating
24 * that LGPLv2 or any later version may be used, or where a choice of which version
25 * of the LGPL is applied is otherwise unspecified.
26 */
27
28import "dxgitype.idl";
29
30const UINT _FACDXGI = 0x87a;
31
32cpp_quote("#define MAKE_DXGI_STATUS(x) MAKE_HRESULT(0, _FACDXGI, x)")
33cpp_quote("#define DXGI_STATUS_OCCLUDED MAKE_DXGI_STATUS(1)")
34cpp_quote("#define DXGI_STATUS_CLIPPED MAKE_DXGI_STATUS(2)")
35cpp_quote("#define DXGI_STATUS_NO_REDIRECTION MAKE_DXGI_STATUS(4)")
36cpp_quote("#define DXGI_STATUS_NO_DESKTOP_ACCESS MAKE_DXGI_STATUS(5)")
37cpp_quote("#define DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE MAKE_DXGI_STATUS(6)")
38cpp_quote("#define DXGI_STATUS_MODE_CHANGED MAKE_DXGI_STATUS(7)")
39cpp_quote("#define DXGI_STATUS_MODE_CHANGE_IN_PROGRESS MAKE_DXGI_STATUS(8)")
40
41cpp_quote("#define MAKE_DXGI_HRESULT(x) MAKE_HRESULT(1, _FACDXGI, x)")
42cpp_quote("#define DXGI_ERROR_INVALID_CALL MAKE_DXGI_HRESULT(1)")
43cpp_quote("#define DXGI_ERROR_NOT_FOUND MAKE_DXGI_HRESULT(2)")
44cpp_quote("#define DXGI_ERROR_MORE_DATA MAKE_DXGI_HRESULT(3)")
45cpp_quote("#define DXGI_ERROR_UNSUPPORTED MAKE_DXGI_HRESULT(4)")
46cpp_quote("#define DXGI_ERROR_DEVICE_REMOVED MAKE_DXGI_HRESULT(5)")
47cpp_quote("#define DXGI_ERROR_DEVICE_HUNG MAKE_DXGI_HRESULT(6)")
48cpp_quote("#define DXGI_ERROR_DEVICE_RESET MAKE_DXGI_HRESULT(7)")
49cpp_quote("#define DXGI_ERROR_WAS_STILL_DRAWING MAKE_DXGI_HRESULT(10)")
50cpp_quote("#define DXGI_ERROR_FRAME_STATISTICS_DISJOINT MAKE_DXGI_HRESULT(11)")
51cpp_quote("#define DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE MAKE_DXGI_HRESULT(12)")
52cpp_quote("#define DXGI_ERROR_DRIVER_INTERNAL_ERROR MAKE_DXGI_HRESULT(32)")
53cpp_quote("#define DXGI_ERROR_NONEXCLUSIVE MAKE_DXGI_HRESULT(33)")
54cpp_quote("#define DXGI_ERROR_NOT_CURRENTLY_AVAILABLE MAKE_DXGI_HRESULT(34)")
55
56cpp_quote("#if 0")
57typedef HANDLE HMONITOR;
58typedef struct _LUID {
59 DWORD LowPart;
60 LONG HighPart;
61} LUID, *PLUID;
62cpp_quote("#endif")
63
64typedef UINT DXGI_USAGE;
65const DXGI_USAGE DXGI_USAGE_SHADER_INPUT = 0x10L;
66const DXGI_USAGE DXGI_USAGE_RENDER_TARGET_OUTPUT = 0x20L;
67const DXGI_USAGE DXGI_USAGE_BACK_BUFFER = 0x40L;
68const DXGI_USAGE DXGI_USAGE_SHARED = 0x80L;
69const DXGI_USAGE DXGI_USAGE_READ_ONLY = 0x100L;
70
71typedef enum DXGI_SWAP_EFFECT {
72 DXGI_SWAP_EFFECT_DISCARD = 0,
73 DXGI_SWAP_EFFECT_SEQUENTIAL = 1,
74} DXGI_SWAP_EFFECT;
75
76typedef enum DXGI_RESIDENCY {
77 DXGI_RESIDENCY_FULLY_RESIDENT = 1,
78 DXGI_RESIDENCY_RESIDENT_IN_SHARED_MEMORY = 2,
79 DXGI_RESIDENCY_EVICTED_TO_DISK = 3,
80} DXGI_RESIDENCY;
81
82typedef struct DXGI_SURFACE_DESC {
83 UINT Width;
84 UINT Height;
85 DXGI_FORMAT Format;
86 DXGI_SAMPLE_DESC SampleDesc;
87} DXGI_SURFACE_DESC;
88
89typedef struct DXGI_MAPPED_RECT {
90 INT Pitch;
91 BYTE *pBits;
92} DXGI_MAPPED_RECT;
93
94typedef struct DXGI_OUTPUT_DESC {
95 WCHAR DeviceName[32];
96 RECT DesktopCoordinates;
97 BOOL AttachedToDesktop;
98 DXGI_MODE_ROTATION Rotation;
99 HMONITOR Monitor;
100} DXGI_OUTPUT_DESC;
101
102typedef struct DXGI_FRAME_STATISTICS {
103 UINT PresentCount;
104 UINT PresentRefreshCount;
105 UINT SyncRefreshCount;
106 LARGE_INTEGER SyncQPCTime;
107 LARGE_INTEGER SyncGPUTime;
108} DXGI_FRAME_STATISTICS;
109
110typedef struct DXGI_ADAPTER_DESC {
111 WCHAR Description[128];
112 UINT VendorId;
113 UINT DeviceId;
114 UINT SubSysId;
115 UINT Revision;
116 SIZE_T DedicatedVideoMemory;
117 SIZE_T DedicatedSystemMemory;
118 SIZE_T SharedSystemMemory;
119 LUID AdapterLuid;
120} DXGI_ADAPTER_DESC;
121
122typedef struct DXGI_SWAP_CHAIN_DESC {
123 DXGI_MODE_DESC BufferDesc;
124 DXGI_SAMPLE_DESC SampleDesc;
125 DXGI_USAGE BufferUsage;
126 UINT BufferCount;
127 HWND OutputWindow;
128 BOOL Windowed;
129 DXGI_SWAP_EFFECT SwapEffect;
130 UINT Flags;
131} DXGI_SWAP_CHAIN_DESC;
132
133typedef struct DXGI_SHARED_RESOURCE {
134 HANDLE Handle;
135} DXGI_SHARED_RESOURCE;
136
137[
138 object,
139 local,
140 uuid(aec22fb8-76f3-4639-9be0-28eb43a67a2e)
141]
142interface IDXGIObject : IUnknown
143{
144 HRESULT SetPrivateData(
145 [in] REFGUID guid,
146 [in] UINT data_size,
147 [in] const void *data
148 );
149 HRESULT SetPrivateDataInterface(
150 [in] REFGUID guid,
151 [in] const IUnknown *object
152 );
153 HRESULT GetPrivateData(
154 [in] REFGUID guid,
155 [in, out] UINT *data_size,
156 [out] void *data
157 );
158 HRESULT GetParent(
159 [in] REFIID riid,
160 [out] void **parent
161 );
162}
163
164[
165 object,
166 local,
167 uuid(3d3e0379-f9de-4d58-bb6c-18d62992f1a6)
168]
169interface IDXGIDeviceSubObject : IDXGIObject
170{
171 HRESULT GetDevice(
172 [in] REFIID riid,
173 [out] void **device
174 );
175}
176
177[
178 object,
179 local,
180 uuid(cafcb56c-6ac3-4889-bf47-9e23bbd260ec)
181]
182interface IDXGISurface : IDXGIDeviceSubObject
183{
184 HRESULT GetDesc(
185 [out] DXGI_SURFACE_DESC *desc
186 );
187 HRESULT Map(
188 [out] DXGI_MAPPED_RECT *mapped_rect,
189 [in] UINT flags
190 );
191 HRESULT Unmap(
192 );
193}
194
195[
196 object,
197 local,
198 uuid(ae02eedb-c735-4690-8d52-5a8dc20213aa)
199]
200interface IDXGIOutput : IDXGIObject
201{
202 HRESULT GetDesc(
203 [out] DXGI_OUTPUT_DESC *desc
204 );
205 HRESULT GetDisplayModeList(
206 [in] DXGI_FORMAT format,
207 [in] UINT flags,
208 [in, out] UINT *mode_count,
209 [out] DXGI_MODE_DESC *desc
210 );
211 HRESULT FindClosestMatchingMode(
212 [in] const DXGI_MODE_DESC *mode,
213 [out] DXGI_MODE_DESC *closest_match,
214 [in] IUnknown *device
215 );
216 HRESULT WaitForVBlank(
217 );
218 HRESULT TakeOwnership(
219 [in] IUnknown *device,
220 [in] BOOL exclusive
221 );
222 void ReleaseOwnership(
223 );
224 HRESULT GetGammaControlCapabilities(
225 [out] DXGI_GAMMA_CONTROL_CAPABILITIES *gamma_caps
226 );
227 HRESULT SetGammaControl(
228 [in] const DXGI_GAMMA_CONTROL *gamma_control
229 );
230 HRESULT GetGammaControl(
231 [out] DXGI_GAMMA_CONTROL *gamma_control
232 );
233 HRESULT SetDisplaySurface(
234 [in] IDXGISurface *surface
235 );
236 HRESULT GetDisplaySurfaceData(
237 [in] IDXGISurface *surface
238 );
239 HRESULT GetFrameStatistics(
240 [out] DXGI_FRAME_STATISTICS *stats
241 );
242}
243
244[
245 object,
246 local,
247 uuid(2411e7e1-12ac-4ccf-bd14-9798e8534dc0)
248]
249interface IDXGIAdapter : IDXGIObject
250{
251 HRESULT EnumOutputs(
252 [in] UINT output_idx,
253 [in, out] IDXGIOutput **output
254 );
255 HRESULT GetDesc(
256 [out] DXGI_ADAPTER_DESC *desc
257 );
258 HRESULT CheckInterfaceSupport(
259 [in] REFGUID guid,
260 [out] LARGE_INTEGER *umd_version
261 );
262}
263
264[
265 object,
266 local,
267 uuid(310d36a0-d2e7-4c0a-aa04-6a9d23b8886a)
268]
269interface IDXGISwapChain : IDXGIDeviceSubObject
270{
271 HRESULT Present(
272 [in] UINT sync_interval,
273 [in] UINT flags
274 );
275 HRESULT GetBuffer(
276 [in] UINT buffer_idx,
277 [in] REFIID riid,
278 [in, out] void **surface
279 );
280 HRESULT SetFullscreenState(
281 [in] BOOL fullscreen,
282 [in] IDXGIOutput *target
283 );
284 HRESULT GetFullscreenState(
285 [out] BOOL *fullscreen,
286 [out] IDXGIOutput **target
287 );
288 HRESULT GetDesc(
289 [out] DXGI_SWAP_CHAIN_DESC *desc
290 );
291 HRESULT ResizeBuffers(
292 [in] UINT buffer_count,
293 [in] UINT width,
294 [in] UINT height,
295 [in] DXGI_FORMAT format,
296 [in] UINT flags
297 );
298 HRESULT ResizeTarget(
299 [in] const DXGI_MODE_DESC *target_mode_desc
300 );
301 HRESULT GetContainingOutput(
302 [out] IDXGIOutput **output
303 );
304 HRESULT GetFrameStatistics(
305 [out] DXGI_FRAME_STATISTICS *stats
306 );
307 HRESULT GetLastPresentCount(
308 [out] UINT *last_present_count
309 );
310}
311
312[
313 object,
314 local,
315 uuid(7b7166ec-21c7-44ae-b21a-c9ae321ae369)
316]
317interface IDXGIFactory : IDXGIObject
318{
319 HRESULT EnumAdapters(
320 [in] UINT adapter_idx,
321 [out] IDXGIAdapter **adapter
322 );
323 HRESULT MakeWindowAssociation(
324 [in] HWND window,
325 [in] UINT flags
326 );
327 HRESULT GetWindowAssociation(
328 [in] HWND *window
329 );
330 HRESULT CreateSwapChain(
331 [in] IUnknown *device,
332 [in] DXGI_SWAP_CHAIN_DESC *desc,
333 [out] IDXGISwapChain **swapchain
334 );
335 HRESULT CreateSoftwareAdapter(
336 [in] HMODULE swrast,
337 [out] IDXGIAdapter **adapter
338 );
339}
340
341[local] HRESULT CreateDXGIFactory(REFIID riid, void **factory);
342
343[
344 object,
345 local,
346 uuid(54ec77fa-1377-44e6-8c32-88fd5f44c84c)
347]
348interface IDXGIDevice : IDXGIObject
349{
350 HRESULT GetAdapter(
351 [out] IDXGIAdapter **adapter
352 );
353 HRESULT CreateSurface(
354 [in] const DXGI_SURFACE_DESC *desc,
355 [in] UINT surface_count,
356 [in] DXGI_USAGE usage,
357 [in] const DXGI_SHARED_RESOURCE *shared_resource,
358 [out] IDXGISurface **surface
359 );
360 HRESULT QueryResourceResidency(
361 [in] IUnknown *const *resources,
362 [out] DXGI_RESIDENCY *residency,
363 [in] UINT resource_count
364 );
365 HRESULT SetGPUThreadPriority(
366 [in] INT priority
367 );
368 HRESULT GetGPUThreadPriority(
369 [out] INT *priority
370 );
371}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette