vbscript: Added support for title and type arguments of MsgBox.
[wine.git] / dlls / dxgi / dxgi_private.h
blob75126cf1428e00df1b0d0e26e7006b8e25e4a6ea
1 /*
2 * Copyright 2008 Henri Verbeet 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 #ifndef __WINE_DXGI_PRIVATE_H
20 #define __WINE_DXGI_PRIVATE_H
22 #include "wine/debug.h"
24 #define COBJMACROS
25 #include "winbase.h"
26 #include "wingdi.h"
27 #include "winuser.h"
28 #include "objbase.h"
29 #include "winnls.h"
31 #include "dxgi.h"
32 #ifdef DXGI_INIT_GUID
33 #include "initguid.h"
34 #endif
35 #include "wine/wined3d.h"
36 #include "wine/winedxgi.h"
38 extern CRITICAL_SECTION dxgi_cs DECLSPEC_HIDDEN;
40 /* Layered device */
41 enum dxgi_device_layer_id
43 DXGI_DEVICE_LAYER_DEBUG1 = 0x8,
44 DXGI_DEVICE_LAYER_THREAD_SAFE = 0x10,
45 DXGI_DEVICE_LAYER_DEBUG2 = 0x20,
46 DXGI_DEVICE_LAYER_SWITCH_TO_REF = 0x30,
47 DXGI_DEVICE_LAYER_D3D10_DEVICE = 0xffffffff,
50 struct layer_get_size_args
52 DWORD unknown0;
53 DWORD unknown1;
54 DWORD *unknown2;
55 DWORD *unknown3;
56 IDXGIAdapter *adapter;
57 WORD interface_major;
58 WORD interface_minor;
59 WORD version_build;
60 WORD version_revision;
63 struct dxgi_device_layer
65 enum dxgi_device_layer_id id;
66 HRESULT (WINAPI *init)(enum dxgi_device_layer_id id, DWORD *count, DWORD *values);
67 UINT (WINAPI *get_size)(enum dxgi_device_layer_id id, struct layer_get_size_args *args, DWORD unknown0);
68 HRESULT (WINAPI *create)(enum dxgi_device_layer_id id, void **layer_base, DWORD unknown0,
69 void *device_object, REFIID riid, void **device_layer);
72 /* TRACE helper functions */
73 const char *debug_dxgi_format(DXGI_FORMAT format) DECLSPEC_HIDDEN;
75 DXGI_FORMAT dxgi_format_from_wined3dformat(enum wined3d_format_id format) DECLSPEC_HIDDEN;
76 enum wined3d_format_id wined3dformat_from_dxgi_format(DXGI_FORMAT format) DECLSPEC_HIDDEN;
78 /* IDXGIFactory */
79 struct dxgi_factory
81 IWineDXGIFactory IWineDXGIFactory_iface;
82 LONG refcount;
83 struct wined3d *wined3d;
84 UINT adapter_count;
85 IWineDXGIAdapter **adapters;
86 BOOL extended;
89 HRESULT dxgi_factory_create(REFIID riid, void **factory, BOOL extended) DECLSPEC_HIDDEN;
91 /* IDXGIDevice */
92 struct dxgi_device
94 IWineDXGIDevice IWineDXGIDevice_iface;
95 IUnknown *child_layer;
96 LONG refcount;
97 struct wined3d_device *wined3d_device;
98 IWineDXGIFactory *factory;
101 HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *layer,
102 IDXGIFactory *factory, IDXGIAdapter *adapter) DECLSPEC_HIDDEN;
104 /* IDXGIOutput */
105 struct dxgi_output
107 IDXGIOutput IDXGIOutput_iface;
108 LONG refcount;
109 struct dxgi_adapter *adapter;
112 void dxgi_output_init(struct dxgi_output *output, struct dxgi_adapter *adapter) DECLSPEC_HIDDEN;
114 /* IDXGIAdapter */
115 struct dxgi_adapter
117 IWineDXGIAdapter IWineDXGIAdapter_iface;
118 IWineDXGIFactory *parent;
119 LONG refcount;
120 UINT ordinal;
121 IDXGIOutput *output;
124 HRESULT dxgi_adapter_init(struct dxgi_adapter *adapter, IWineDXGIFactory *parent, UINT ordinal) DECLSPEC_HIDDEN;
126 /* IDXGISwapChain */
127 struct dxgi_swapchain
129 IDXGISwapChain IDXGISwapChain_iface;
130 LONG refcount;
131 struct wined3d_swapchain *wined3d_swapchain;
134 HRESULT dxgi_swapchain_init(struct dxgi_swapchain *swapchain, struct dxgi_device *device,
135 struct wined3d_swapchain_desc *desc) DECLSPEC_HIDDEN;
137 /* IDXGISurface */
138 struct dxgi_surface
140 IDXGISurface IDXGISurface_iface;
141 IUnknown IUnknown_iface;
142 IUnknown *outer_unknown;
143 LONG refcount;
144 IDXGIDevice *device;
146 DXGI_SURFACE_DESC desc;
149 HRESULT dxgi_surface_init(struct dxgi_surface *surface, IDXGIDevice *device,
150 IUnknown *outer, const DXGI_SURFACE_DESC *desc) DECLSPEC_HIDDEN;
152 #endif /* __WINE_DXGI_PRIVATE_H */