Keep track of per-column information inside the listview.
[wine] / dlls / d3d8 / basetexture.c
1 /*
2  * IDirect3DBaseTexture8 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 #include "windef.h"
22 #include "winbase.h"
23 #include "winuser.h"
24 #include "wingdi.h"
25 #include "wine/debug.h"
26
27 #include "d3d8_private.h"
28
29 WINE_DEFAULT_DEBUG_CHANNEL(d3d);
30
31 /* IDirect3DBaseTexture8 IUnknown parts follow: */
32 HRESULT WINAPI IDirect3DBaseTexture8Impl_QueryInterface(LPDIRECT3DBASETEXTURE8 iface,REFIID riid,LPVOID *ppobj)
33 {
34     ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
35     TRACE("(%p) : QueryInterface\n", This);
36     if (IsEqualGUID(riid, &IID_IUnknown)
37         || IsEqualGUID(riid, &IID_IClassFactory)) {
38         IDirect3DBaseTexture8Impl_AddRef(iface);
39         *ppobj = This;
40         return D3D_OK;
41     }
42
43     WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
44     return E_NOINTERFACE;
45 }
46
47 ULONG WINAPI IDirect3DBaseTexture8Impl_AddRef(LPDIRECT3DBASETEXTURE8 iface) {
48     ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
49     TRACE("(%p) : AddRef from %ld\n", This, This->ref);
50     return ++(This->ref);
51 }
52
53 ULONG WINAPI IDirect3DBaseTexture8Impl_Release(LPDIRECT3DBASETEXTURE8 iface) {
54     ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
55     ULONG ref = --This->ref;
56     TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
57     if (ref == 0)
58         HeapFree(GetProcessHeap(), 0, This);
59     return ref;
60 }
61
62 /* IDirect3DBaseTexture8 IDirect3DResource8 Interface follow: */
63 HRESULT  WINAPI        IDirect3DBaseTexture8Impl_GetDevice(LPDIRECT3DBASETEXTURE8 iface, IDirect3DDevice8** ppDevice) {
64     ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
65     TRACE("(%p) : returning %p\n", This, This->Device);
66     *ppDevice = (LPDIRECT3DDEVICE8) This->Device;
67     return D3D_OK;
68 }
69 HRESULT  WINAPI        IDirect3DBaseTexture8Impl_SetPrivateData(LPDIRECT3DBASETEXTURE8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
70     ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
71     FIXME("(%p) : stub\n", This);    return D3D_OK;
72 }
73 HRESULT  WINAPI        IDirect3DBaseTexture8Impl_GetPrivateData(LPDIRECT3DBASETEXTURE8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
74     ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
75     FIXME("(%p) : stub\n", This);    return D3D_OK;
76 }
77 HRESULT  WINAPI        IDirect3DBaseTexture8Impl_FreePrivateData(LPDIRECT3DBASETEXTURE8 iface, REFGUID refguid) {
78     ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
79     FIXME("(%p) : stub\n", This);    return D3D_OK;
80 }
81 DWORD    WINAPI        IDirect3DBaseTexture8Impl_SetPriority(LPDIRECT3DBASETEXTURE8 iface, DWORD PriorityNew) {
82     ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
83     FIXME("(%p) : stub\n", This);    return D3D_OK;
84 }
85 DWORD    WINAPI        IDirect3DBaseTexture8Impl_GetPriority(LPDIRECT3DBASETEXTURE8 iface) {
86     ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
87     FIXME("(%p) : stub\n", This);    return D3D_OK;
88 }
89 void     WINAPI        IDirect3DBaseTexture8Impl_PreLoad(LPDIRECT3DBASETEXTURE8 iface) {
90     ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
91     FIXME("(%p) : stub\n", This);
92 }
93 D3DRESOURCETYPE WINAPI IDirect3DBaseTexture8Impl_GetType(LPDIRECT3DBASETEXTURE8 iface) {
94     ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
95     TRACE("(%p) : returning %d\n", This, This->ResourceType);
96     return This->ResourceType;
97 }
98
99 /* IDirect3DBaseTexture8 */
100 DWORD    WINAPI        IDirect3DBaseTexture8Impl_SetLOD(LPDIRECT3DBASETEXTURE8 iface, DWORD LODNew) {
101     ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
102     FIXME("(%p) : stub\n", This);    return D3D_OK;
103 }
104 DWORD    WINAPI        IDirect3DBaseTexture8Impl_GetLOD(LPDIRECT3DBASETEXTURE8 iface) {
105     ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
106     FIXME("(%p) : stub\n", This);    return D3D_OK;
107 }
108 DWORD    WINAPI        IDirect3DBaseTexture8Impl_GetLevelCount(LPDIRECT3DBASETEXTURE8 iface) {
109     ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
110     FIXME("(%p) : stub\n", This);    return D3D_OK;
111 }
112
113 ICOM_VTABLE(IDirect3DBaseTexture8) Direct3DBaseTexture8_Vtbl =
114 {
115     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
116     IDirect3DBaseTexture8Impl_QueryInterface,
117     IDirect3DBaseTexture8Impl_AddRef,
118     IDirect3DBaseTexture8Impl_Release,
119     IDirect3DBaseTexture8Impl_GetDevice,
120     IDirect3DBaseTexture8Impl_SetPrivateData,
121     IDirect3DBaseTexture8Impl_GetPrivateData,
122     IDirect3DBaseTexture8Impl_FreePrivateData,
123     IDirect3DBaseTexture8Impl_SetPriority,
124     IDirect3DBaseTexture8Impl_GetPriority,
125     IDirect3DBaseTexture8Impl_PreLoad,
126     IDirect3DBaseTexture8Impl_GetType,
127     IDirect3DBaseTexture8Impl_SetLOD,
128     IDirect3DBaseTexture8Impl_GetLOD,
129     IDirect3DBaseTexture8Impl_GetLevelCount,
130 };