dxgi: Implement dxgi_device_SetPrivateData().
[wine/multimedia.git] / dlls / dxgi / dxgi_private.h
bloba22916dfbfff726a7846165c83bbd363689f223d
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 #include <assert.h>
26 #define COBJMACROS
27 #include "winbase.h"
28 #include "wingdi.h"
29 #include "winuser.h"
30 #include "objbase.h"
31 #include "winnls.h"
33 #include "dxgi.h"
34 #ifdef DXGI_INIT_GUID
35 #include "initguid.h"
36 #endif
37 #include "wine/wined3d.h"
38 #include "wine/winedxgi.h"
40 extern CRITICAL_SECTION dxgi_cs DECLSPEC_HIDDEN;
42 /* Layered device */
43 enum dxgi_device_layer_id
45 DXGI_DEVICE_LAYER_DEBUG1 = 0x8,
46 DXGI_DEVICE_LAYER_THREAD_SAFE = 0x10,
47 DXGI_DEVICE_LAYER_DEBUG2 = 0x20,
48 DXGI_DEVICE_LAYER_SWITCH_TO_REF = 0x30,
49 DXGI_DEVICE_LAYER_D3D10_DEVICE = 0xffffffff,
52 struct layer_get_size_args
54 DWORD unknown0;
55 DWORD unknown1;
56 DWORD *unknown2;
57 DWORD *unknown3;
58 IDXGIAdapter *adapter;
59 WORD interface_major;
60 WORD interface_minor;
61 WORD version_build;
62 WORD version_revision;
65 struct dxgi_device_layer
67 enum dxgi_device_layer_id id;
68 HRESULT (WINAPI *init)(enum dxgi_device_layer_id id, DWORD *count, DWORD *values);
69 UINT (WINAPI *get_size)(enum dxgi_device_layer_id id, struct layer_get_size_args *args, DWORD unknown0);
70 HRESULT (WINAPI *create)(enum dxgi_device_layer_id id, void **layer_base, DWORD unknown0,
71 void *device_object, REFIID riid, void **device_layer);
74 /* TRACE helper functions */
75 const char *debug_dxgi_format(DXGI_FORMAT format) DECLSPEC_HIDDEN;
77 DXGI_FORMAT dxgi_format_from_wined3dformat(enum wined3d_format_id format) DECLSPEC_HIDDEN;
78 enum wined3d_format_id wined3dformat_from_dxgi_format(DXGI_FORMAT format) DECLSPEC_HIDDEN;
79 HRESULT dxgi_set_private_data(struct wined3d_private_store *store,
80 REFGUID guid, UINT data_size, const void *data) DECLSPEC_HIDDEN;
82 /* IDXGIFactory */
83 struct dxgi_factory
85 IDXGIFactory1 IDXGIFactory1_iface;
86 LONG refcount;
87 struct wined3d *wined3d;
88 UINT adapter_count;
89 IDXGIAdapter1 **adapters;
90 BOOL extended;
91 HWND device_window;
94 HRESULT dxgi_factory_create(REFIID riid, void **factory, BOOL extended) DECLSPEC_HIDDEN;
95 HWND dxgi_factory_get_device_window(struct dxgi_factory *factory) DECLSPEC_HIDDEN;
96 struct dxgi_factory *unsafe_impl_from_IDXGIFactory1(IDXGIFactory1 *iface) DECLSPEC_HIDDEN;
98 /* IDXGIDevice */
99 struct dxgi_device
101 IWineDXGIDevice IWineDXGIDevice_iface;
102 IUnknown *child_layer;
103 LONG refcount;
104 struct wined3d_private_store private_store;
105 struct wined3d_device *wined3d_device;
106 IDXGIFactory1 *factory;
109 HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *layer,
110 IDXGIFactory *factory, IDXGIAdapter *adapter) DECLSPEC_HIDDEN;
112 /* IDXGIOutput */
113 struct dxgi_output
115 IDXGIOutput IDXGIOutput_iface;
116 LONG refcount;
117 struct dxgi_adapter *adapter;
120 void dxgi_output_init(struct dxgi_output *output, struct dxgi_adapter *adapter) DECLSPEC_HIDDEN;
122 /* IDXGIAdapter */
123 struct dxgi_adapter
125 IDXGIAdapter1 IDXGIAdapter1_iface;
126 struct dxgi_factory *parent;
127 LONG refcount;
128 UINT ordinal;
129 IDXGIOutput *output;
132 HRESULT dxgi_adapter_init(struct dxgi_adapter *adapter, struct dxgi_factory *parent, UINT ordinal) DECLSPEC_HIDDEN;
133 struct dxgi_adapter *unsafe_impl_from_IDXGIAdapter1(IDXGIAdapter1 *iface) DECLSPEC_HIDDEN;
135 /* IDXGISwapChain */
136 struct dxgi_swapchain
138 IDXGISwapChain IDXGISwapChain_iface;
139 LONG refcount;
140 struct wined3d_swapchain *wined3d_swapchain;
143 HRESULT dxgi_swapchain_init(struct dxgi_swapchain *swapchain, struct dxgi_device *device,
144 struct wined3d_swapchain_desc *desc) DECLSPEC_HIDDEN;
146 /* IDXGISurface */
147 struct dxgi_surface
149 IDXGISurface IDXGISurface_iface;
150 IUnknown IUnknown_iface;
151 IUnknown *outer_unknown;
152 LONG refcount;
153 IDXGIDevice *device;
155 DXGI_SURFACE_DESC desc;
158 HRESULT dxgi_surface_init(struct dxgi_surface *surface, IDXGIDevice *device,
159 IUnknown *outer, const DXGI_SURFACE_DESC *desc) DECLSPEC_HIDDEN;
161 #endif /* __WINE_DXGI_PRIVATE_H */