1 /* DirectDraw - IDirectPalette base interface
3 * Copyright 1997-2000 Marcus Meissner
4 * Copyright 2000-2001 TransGaming Technologies Inc.
5 * Copyright 2006 Stefan Dösinger for CodeWeavers
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #include "wine/debug.h"
28 #include "wined3d_private.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(d3d);
32 HRESULT WINAPI IWineD3DPaletteImpl_QueryInterface(IWineD3DPalette *iface, REFIID refiid, void **obj) {
33 IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface;
34 TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(refiid),obj);
36 if (IsEqualGUID(refiid, &IID_IUnknown)
37 || IsEqualGUID(refiid, &IID_IWineD3DPalette)) {
39 IWineD3DPalette_AddRef(iface);
47 ULONG WINAPI IWineD3DPaletteImpl_AddRef(IWineD3DPalette *iface) {
48 IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface;
49 ULONG ref = InterlockedIncrement(&This->ref);
51 TRACE("(%p)->() incrementing from %lu.\n", This, ref - 1);
56 ULONG WINAPI IWineD3DPaletteImpl_Release(IWineD3DPalette *iface) {
57 IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface;
58 ULONG ref = InterlockedDecrement(&This->ref);
60 TRACE("(%p)->() decrementing from %lu.\n", This, ref + 1);
63 HeapFree(GetProcessHeap(), 0, This);
70 HRESULT WINAPI IWineD3DPaletteImpl_GetEntries(IWineD3DPalette *iface, DWORD Flags, DWORD Start, DWORD Count, PALETTEENTRY *PalEnt) {
71 FIXME("This is unimplemented for now(d3d7 merge)\n");
72 return DDERR_INVALIDPARAMS;
75 HRESULT WINAPI IWineD3DPaletteImpl_SetEntries(IWineD3DPalette *iface, DWORD Flags, DWORD Start, DWORD Count, PALETTEENTRY *PalEnt) {
76 FIXME("This is unimplemented for now(d3d7 merge)\n");
77 return DDERR_INVALIDPARAMS;
80 HRESULT WINAPI IWineD3DPaletteImpl_GetCaps(IWineD3DPalette *iface, DWORD *Caps) {
81 FIXME("This is unimplemented for now(d3d7 merge)\n");
82 return DDERR_INVALIDPARAMS;
85 HRESULT WINAPI IWineD3DPaletteImpl_GetParent(IWineD3DPalette *iface, IUnknown **Parent) {
86 FIXME("This is unimplemented for now(d3d7 merge)\n");
87 return DDERR_INVALIDPARAMS;
90 const IWineD3DPaletteVtbl IWineD3DPalette_Vtbl =
93 IWineD3DPaletteImpl_QueryInterface,
94 IWineD3DPaletteImpl_AddRef,
95 IWineD3DPaletteImpl_Release,
96 /*** IWineD3DPalette ***/
97 IWineD3DPaletteImpl_GetParent,
98 IWineD3DPaletteImpl_GetEntries,
99 IWineD3DPaletteImpl_GetCaps,
100 IWineD3DPaletteImpl_SetEntries