Keep track of per-column information inside the listview.
[wine] / dlls / d3d8 / volumetexture.c
1 /*
2  * IDirect3DVolumeTexture8 implementation
3  *
4  * Copyright 2002 Jason Edmeades
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21
22 #include "windef.h"
23 #include "winbase.h"
24 #include "winuser.h"
25 #include "wingdi.h"
26 #include "wine/debug.h"
27
28 #include "d3d8_private.h"
29
30 WINE_DEFAULT_DEBUG_CHANNEL(d3d);
31
32 /* IDirect3DVolumeTexture8 IUnknown parts follow: */
33 HRESULT WINAPI IDirect3DVolumeTexture8Impl_QueryInterface(LPDIRECT3DVOLUMETEXTURE8 iface,REFIID riid,LPVOID *ppobj)
34 {
35     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
36
37     TRACE("(%p) : QueryInterface\n", This);
38     if (IsEqualGUID(riid, &IID_IUnknown)
39         || IsEqualGUID(riid, &IID_IClassFactory)) {
40         IDirect3DVolumeTexture8Impl_AddRef(iface);
41         *ppobj = This;
42         return D3D_OK;
43     }
44
45     WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
46     return E_NOINTERFACE;
47 }
48
49 ULONG WINAPI IDirect3DVolumeTexture8Impl_AddRef(LPDIRECT3DVOLUMETEXTURE8 iface) {
50     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
51     TRACE("(%p) : AddRef from %ld\n", This, This->ref);
52     return ++(This->ref);
53 }
54
55 ULONG WINAPI IDirect3DVolumeTexture8Impl_Release(LPDIRECT3DVOLUMETEXTURE8 iface) {
56     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
57     ULONG ref = --This->ref;
58     TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
59     if (ref == 0)
60         HeapFree(GetProcessHeap(), 0, This);
61     return ref;
62 }
63
64 /* IDirect3DVolumeTexture8 IDirect3DResource8 Interface follow: */
65 HRESULT  WINAPI        IDirect3DVolumeTexture8Impl_GetDevice(LPDIRECT3DVOLUMETEXTURE8 iface, IDirect3DDevice8** ppDevice) {
66     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
67     TRACE("(%p) : returning %p\n", This, This->Device);
68     *ppDevice = (LPDIRECT3DDEVICE8) This->Device;
69     return D3D_OK;
70 }
71 HRESULT  WINAPI        IDirect3DVolumeTexture8Impl_SetPrivateData(LPDIRECT3DVOLUMETEXTURE8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
72     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
73     FIXME("(%p) : stub\n", This);    return D3D_OK;
74 }
75 HRESULT  WINAPI        IDirect3DVolumeTexture8Impl_GetPrivateData(LPDIRECT3DVOLUMETEXTURE8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
76     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
77     FIXME("(%p) : stub\n", This);    return D3D_OK;
78 }
79 HRESULT  WINAPI        IDirect3DVolumeTexture8Impl_FreePrivateData(LPDIRECT3DVOLUMETEXTURE8 iface, REFGUID refguid) {
80     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
81     FIXME("(%p) : stub\n", This);    return D3D_OK;
82 }
83 DWORD    WINAPI        IDirect3DVolumeTexture8Impl_SetPriority(LPDIRECT3DVOLUMETEXTURE8 iface, DWORD PriorityNew) {
84     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
85     FIXME("(%p) : stub\n", This);    return D3D_OK;
86 }
87 DWORD    WINAPI        IDirect3DVolumeTexture8Impl_GetPriority(LPDIRECT3DVOLUMETEXTURE8 iface) {
88     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
89     FIXME("(%p) : stub\n", This);    return D3D_OK;
90 }
91 void     WINAPI        IDirect3DVolumeTexture8Impl_PreLoad(LPDIRECT3DVOLUMETEXTURE8 iface) {
92     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
93     FIXME("(%p) : stub\n", This);
94 }
95 D3DRESOURCETYPE WINAPI IDirect3DVolumeTexture8Impl_GetType(LPDIRECT3DVOLUMETEXTURE8 iface) {
96     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
97     TRACE("(%p) : returning %d\n", This, This->ResourceType);
98     return This->ResourceType;
99 }
100
101 /* IDirect3DVolumeTexture8 (Inherited from IDirect3DBaseTexture8) */
102 DWORD    WINAPI        IDirect3DVolumeTexture8Impl_SetLOD(LPDIRECT3DVOLUMETEXTURE8 iface, DWORD LODNew) {
103     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
104     FIXME("(%p) : stub\n", This);    return D3D_OK;
105 }
106 DWORD    WINAPI        IDirect3DVolumeTexture8Impl_GetLOD(LPDIRECT3DVOLUMETEXTURE8 iface) {
107     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
108     FIXME("(%p) : stub\n", This);    return D3D_OK;
109 }
110 DWORD    WINAPI        IDirect3DVolumeTexture8Impl_GetLevelCount(LPDIRECT3DVOLUMETEXTURE8 iface) {
111     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
112     FIXME("(%p) : stub\n", This);    return D3D_OK;
113 }
114
115 /* IDirect3DVolumeTexture8 */
116 HRESULT  WINAPI        IDirect3DVolumeTexture8Impl_GetLevelDesc(LPDIRECT3DVOLUMETEXTURE8 iface, UINT Level,D3DVOLUME_DESC *pDesc) {
117     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
118     FIXME("(%p) : stub\n", This);    return D3D_OK;
119 }
120 HRESULT  WINAPI        IDirect3DVolumeTexture8Impl_GetVolumeLevel(LPDIRECT3DVOLUMETEXTURE8 iface, UINT Level,IDirect3DVolume8** ppVolumeLevel) {
121     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
122     FIXME("(%p) : stub\n", This);    return D3D_OK;
123 }
124 HRESULT  WINAPI        IDirect3DVolumeTexture8Impl_LockBox(LPDIRECT3DVOLUMETEXTURE8 iface, UINT Level,D3DLOCKED_BOX* pLockedVolume,CONST D3DBOX* pBox,DWORD Flags) {
125     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
126     FIXME("(%p) : stub\n", This);    return D3D_OK;
127 }
128 HRESULT  WINAPI        IDirect3DVolumeTexture8Impl_UnlockBox(LPDIRECT3DVOLUMETEXTURE8 iface, UINT Level) {
129     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
130     FIXME("(%p) : stub\n", This);    return D3D_OK;
131 }
132 HRESULT  WINAPI        IDirect3DVolumeTexture8Impl_AddDirtyBox(LPDIRECT3DVOLUMETEXTURE8 iface, CONST D3DBOX* pDirtyBox) {
133     ICOM_THIS(IDirect3DVolumeTexture8Impl,iface);
134     FIXME("(%p) : stub\n", This);    return D3D_OK;
135 }
136
137
138 ICOM_VTABLE(IDirect3DVolumeTexture8) Direct3DVolumeTexture8_Vtbl =
139 {
140     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
141     IDirect3DVolumeTexture8Impl_QueryInterface,
142     IDirect3DVolumeTexture8Impl_AddRef,
143     IDirect3DVolumeTexture8Impl_Release,
144     IDirect3DVolumeTexture8Impl_GetDevice,
145     IDirect3DVolumeTexture8Impl_SetPrivateData,
146     IDirect3DVolumeTexture8Impl_GetPrivateData,
147     IDirect3DVolumeTexture8Impl_FreePrivateData,
148     IDirect3DVolumeTexture8Impl_SetPriority,
149     IDirect3DVolumeTexture8Impl_GetPriority,
150     IDirect3DVolumeTexture8Impl_PreLoad,
151     IDirect3DVolumeTexture8Impl_GetType,
152     IDirect3DVolumeTexture8Impl_SetLOD,
153     IDirect3DVolumeTexture8Impl_GetLOD,
154     IDirect3DVolumeTexture8Impl_GetLevelCount,
155     IDirect3DVolumeTexture8Impl_GetLevelDesc,
156     IDirect3DVolumeTexture8Impl_GetVolumeLevel,
157     IDirect3DVolumeTexture8Impl_LockBox,
158     IDirect3DVolumeTexture8Impl_UnlockBox,
159     IDirect3DVolumeTexture8Impl_AddDirtyBox
160 };