gdi32: Store a separate flag to mark a GDI object for delayed destruction.
[wine] / dlls / d3d10core / d3d10core_private.h
1 /*
2  * Copyright 2008 Henri Verbeet for CodeWeavers
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 #ifndef __WINE_D3D10CORE_PRIVATE_H
20 #define __WINE_D3D10CORE_PRIVATE_H
21
22 #include "wine/debug.h"
23
24 #define COBJMACROS
25 #include "winbase.h"
26 #include "wingdi.h"
27 #include "winuser.h"
28 #include "objbase.h"
29
30 #include "d3d10.h"
31 #ifdef D3D10CORE_INIT_GUID
32 #include "initguid.h"
33 #endif
34 #include "wine/wined3d.h"
35 #include "wine/winedxgi.h"
36
37 /* TRACE helper functions */
38 const char *debug_d3d10_primitive_topology(D3D10_PRIMITIVE_TOPOLOGY topology);
39 const char *debug_dxgi_format(DXGI_FORMAT format);
40
41 /* IDirect3D10Device */
42 extern const struct ID3D10DeviceVtbl d3d10_device_vtbl;
43 extern const struct IUnknownVtbl d3d10_device_inner_unknown_vtbl;
44 extern const struct IWineD3DDeviceParentVtbl d3d10_wined3d_device_parent_vtbl;
45 struct d3d10_device
46 {
47     const struct ID3D10DeviceVtbl *vtbl;
48     const struct IUnknownVtbl *inner_unknown_vtbl;
49     const struct IWineD3DDeviceParentVtbl *device_parent_vtbl;
50     IUnknown *outer_unknown;
51     LONG refcount;
52 };
53
54 /* ID3D10Texture2D */
55 extern const struct ID3D10Texture2DVtbl d3d10_texture2d_vtbl;
56 struct d3d10_texture2d
57 {
58     const struct ID3D10Texture2DVtbl *vtbl;
59     LONG refcount;
60
61     IUnknown *dxgi_surface;
62     IWineD3DSurface *wined3d_surface;
63     D3D10_TEXTURE2D_DESC desc;
64 };
65
66 /* ID3D10Buffer */
67 extern const struct ID3D10BufferVtbl d3d10_buffer_vtbl;
68 struct d3d10_buffer
69 {
70     const struct ID3D10BufferVtbl *vtbl;
71     LONG refcount;
72 };
73
74 /* ID3D10RenderTargetView */
75 extern const struct ID3D10RenderTargetViewVtbl d3d10_rendertarget_view_vtbl;
76 struct d3d10_rendertarget_view
77 {
78     const struct ID3D10RenderTargetViewVtbl *vtbl;
79     LONG refcount;
80
81     ID3D10Resource *resource;
82     D3D10_RENDER_TARGET_VIEW_DESC desc;
83 };
84
85 /* Layered device */
86 enum dxgi_device_layer_id
87 {
88     DXGI_DEVICE_LAYER_DEBUG1        = 0x8,
89     DXGI_DEVICE_LAYER_THREAD_SAFE   = 0x10,
90     DXGI_DEVICE_LAYER_DEBUG2        = 0x20,
91     DXGI_DEVICE_LAYER_SWITCH_TO_REF = 0x30,
92     DXGI_DEVICE_LAYER_D3D10_DEVICE  = 0xffffffff,
93 };
94
95 struct layer_get_size_args
96 {
97     DWORD unknown0;
98     DWORD unknown1;
99     DWORD *unknown2;
100     DWORD *unknown3;
101     IDXGIAdapter *adapter;
102     WORD interface_major;
103     WORD interface_minor;
104     WORD version_build;
105     WORD version_revision;
106 };
107
108 struct dxgi_device_layer
109 {
110     enum dxgi_device_layer_id id;
111     HRESULT (WINAPI *init)(enum dxgi_device_layer_id id, DWORD *count, DWORD *values);
112     UINT (WINAPI *get_size)(enum dxgi_device_layer_id id, struct layer_get_size_args *args, DWORD unknown0);
113     HRESULT (WINAPI *create)(enum dxgi_device_layer_id id, void **layer_base, DWORD unknown0,
114             void *device_object, REFIID riid, void **device_layer);
115 };
116
117 HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, IDXGIAdapter *adapter,
118         UINT flags, DWORD unknown0, void **device);
119 HRESULT WINAPI DXGID3D10RegisterLayers(const struct dxgi_device_layer *layers, UINT layer_count);
120
121 #endif /* __WINE_D3D10CORE_PRIVATE_H */