2001-04-16 21:35:18 +02:00
|
|
|
/* DirectDrawGammaControl implementation
|
|
|
|
*
|
|
|
|
* Copyright 2001 TransGaming Technologies Inc.
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2001-04-16 21:35:18 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
#include "winerror.h"
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
2001-04-16 21:35:18 +02:00
|
|
|
#include "ddraw_private.h"
|
|
|
|
#include "dsurface/main.h"
|
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(ddraw);
|
2001-04-16 21:35:18 +02:00
|
|
|
|
|
|
|
#define CONVERT(pddgc) COM_INTERFACE_CAST(IDirectDrawSurfaceImpl, \
|
|
|
|
IDirectDrawGammaControl, \
|
|
|
|
IDirectDrawSurface7, \
|
|
|
|
(pddgc))
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
DirectDrawGammaControl_QueryInterface(LPDIRECTDRAWGAMMACONTROL iface, REFIID riid,
|
2002-06-01 01:06:46 +02:00
|
|
|
LPVOID *ppObj)
|
2001-04-16 21:35:18 +02:00
|
|
|
{
|
|
|
|
TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(riid), ppObj);
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI
|
|
|
|
DirectDrawGammaControl_AddRef(LPDIRECTDRAWGAMMACONTROL iface)
|
|
|
|
{
|
|
|
|
return IDirectDrawSurface7_AddRef(CONVERT(iface));
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2001-04-16 21:35:18 +02:00
|
|
|
static ULONG WINAPI
|
|
|
|
DirectDrawGammaControl_Release(LPDIRECTDRAWGAMMACONTROL iface)
|
|
|
|
{
|
|
|
|
return IDirectDrawSurface7_Release(CONVERT(iface));
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2001-04-16 21:35:18 +02:00
|
|
|
static HRESULT WINAPI
|
|
|
|
DirectDrawGammaControl_GetGammaRamp(LPDIRECTDRAWGAMMACONTROL iface, DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp)
|
|
|
|
{
|
|
|
|
ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawGammaControl, iface);
|
|
|
|
TRACE("(%p)->(%08lx,%p)\n", iface,dwFlags,lpGammaRamp);
|
|
|
|
return This->get_gamma_ramp(This, dwFlags, lpGammaRamp);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
DirectDrawGammaControl_SetGammaRamp(LPDIRECTDRAWGAMMACONTROL iface, DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp)
|
|
|
|
{
|
|
|
|
ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawGammaControl, iface);
|
|
|
|
TRACE("(%p)->(%08lx,%p)\n", iface,dwFlags,lpGammaRamp);
|
|
|
|
return This->set_gamma_ramp(This, dwFlags, lpGammaRamp);
|
|
|
|
}
|
|
|
|
|
2004-08-13 01:00:51 +02:00
|
|
|
IDirectDrawGammaControlVtbl DDRAW_IDDGC_VTable =
|
2001-04-16 21:35:18 +02:00
|
|
|
{
|
|
|
|
DirectDrawGammaControl_QueryInterface,
|
|
|
|
DirectDrawGammaControl_AddRef,
|
|
|
|
DirectDrawGammaControl_Release,
|
|
|
|
DirectDrawGammaControl_GetGammaRamp,
|
|
|
|
DirectDrawGammaControl_SetGammaRamp
|
|
|
|
};
|