Fix two more corner cases in UNIXFS_get_unix_path and UNIXFS_path_to_pidl.
[wine/multimedia.git] / dlls / ddraw / surface_gamma.c
blob66c0ca68f8543600ec8d41cbbfef4a440f57af35
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 #define CONST_VTABLE
28 #include "wine/debug.h"
29 #include "ddraw_private.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(ddraw);
33 #define CONVERT(pddgc) COM_INTERFACE_CAST(IDirectDrawSurfaceImpl, \
34 IDirectDrawGammaControl, \
35 IDirectDrawSurface7, \
36 (pddgc))
38 static HRESULT WINAPI
39 DirectDrawGammaControl_QueryInterface(LPDIRECTDRAWGAMMACONTROL iface, REFIID riid,
40 LPVOID *ppObj)
42 TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(riid), ppObj);
43 return E_NOINTERFACE;
46 static ULONG WINAPI
47 DirectDrawGammaControl_AddRef(LPDIRECTDRAWGAMMACONTROL iface)
49 return IDirectDrawSurface7_AddRef(CONVERT(iface));
52 static ULONG WINAPI
53 DirectDrawGammaControl_Release(LPDIRECTDRAWGAMMACONTROL iface)
55 return IDirectDrawSurface7_Release(CONVERT(iface));
58 static HRESULT WINAPI
59 DirectDrawGammaControl_GetGammaRamp(LPDIRECTDRAWGAMMACONTROL iface, DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp)
61 ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawGammaControl, iface);
62 TRACE("(%p)->(%08lx,%p)\n", iface,dwFlags,lpGammaRamp);
63 return This->get_gamma_ramp(This, dwFlags, lpGammaRamp);
66 static HRESULT WINAPI
67 DirectDrawGammaControl_SetGammaRamp(LPDIRECTDRAWGAMMACONTROL iface, DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp)
69 ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawGammaControl, iface);
70 TRACE("(%p)->(%08lx,%p)\n", iface,dwFlags,lpGammaRamp);
71 return This->set_gamma_ramp(This, dwFlags, lpGammaRamp);
74 const IDirectDrawGammaControlVtbl DDRAW_IDDGC_VTable =
76 DirectDrawGammaControl_QueryInterface,
77 DirectDrawGammaControl_AddRef,
78 DirectDrawGammaControl_Release,
79 DirectDrawGammaControl_GetGammaRamp,
80 DirectDrawGammaControl_SetGammaRamp