advpack: Add tests for the TranslateInfStringEx trio of functions and
[wine/gsoc_dplay.git] / dlls / ddraw / surface_gamma.c
blobb8bf2a2006de6897a062b63ecd893276aa9ecc99
1 /* DirectDrawGammaControl implementation
3 * Copyright 2001 TransGaming Technologies Inc.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #include "config.h"
21 #include "winerror.h"
23 #include <assert.h>
24 #include <stdlib.h>
26 #include "wine/debug.h"
27 #include "ddraw_private.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(ddraw);
31 #define CONVERT(pddgc) COM_INTERFACE_CAST(IDirectDrawSurfaceImpl, \
32 IDirectDrawGammaControl, \
33 IDirectDrawSurface7, \
34 (pddgc))
36 static HRESULT WINAPI
37 DirectDrawGammaControl_QueryInterface(LPDIRECTDRAWGAMMACONTROL iface, REFIID riid,
38 LPVOID *ppObj)
40 TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(riid), ppObj);
41 return E_NOINTERFACE;
44 static ULONG WINAPI
45 DirectDrawGammaControl_AddRef(LPDIRECTDRAWGAMMACONTROL iface)
47 return IDirectDrawSurface7_AddRef(CONVERT(iface));
50 static ULONG WINAPI
51 DirectDrawGammaControl_Release(LPDIRECTDRAWGAMMACONTROL iface)
53 return IDirectDrawSurface7_Release(CONVERT(iface));
56 static HRESULT WINAPI
57 DirectDrawGammaControl_GetGammaRamp(LPDIRECTDRAWGAMMACONTROL iface, DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp)
59 ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawGammaControl, iface);
60 TRACE("(%p)->(%08lx,%p)\n", iface,dwFlags,lpGammaRamp);
61 return This->get_gamma_ramp(This, dwFlags, lpGammaRamp);
64 static HRESULT WINAPI
65 DirectDrawGammaControl_SetGammaRamp(LPDIRECTDRAWGAMMACONTROL iface, DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp)
67 ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawGammaControl, iface);
68 TRACE("(%p)->(%08lx,%p)\n", iface,dwFlags,lpGammaRamp);
69 return This->set_gamma_ramp(This, dwFlags, lpGammaRamp);
72 const IDirectDrawGammaControlVtbl DDRAW_IDDGC_VTable =
74 DirectDrawGammaControl_QueryInterface,
75 DirectDrawGammaControl_AddRef,
76 DirectDrawGammaControl_Release,
77 DirectDrawGammaControl_GetGammaRamp,
78 DirectDrawGammaControl_SetGammaRamp