gamma.c
来自「Wine-20031016」· C语言 代码 · 共 82 行
C
82 行
/* DirectDrawGammaControl implementation * * Copyright 2001 TransGaming Technologies Inc. * * 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 */#include "config.h"#include "winerror.h"#include <assert.h>#include <stdlib.h>#include "wine/debug.h"#include "ddraw_private.h"#include "dsurface/main.h"WINE_DEFAULT_DEBUG_CHANNEL(ddraw);#define CONVERT(pddgc) COM_INTERFACE_CAST(IDirectDrawSurfaceImpl, \ IDirectDrawGammaControl, \ IDirectDrawSurface7, \ (pddgc))static HRESULT WINAPIDirectDrawGammaControl_QueryInterface(LPDIRECTDRAWGAMMACONTROL iface, REFIID riid, LPVOID *ppObj){ TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(riid), ppObj); return E_NOINTERFACE;}static ULONG WINAPIDirectDrawGammaControl_AddRef(LPDIRECTDRAWGAMMACONTROL iface){ return IDirectDrawSurface7_AddRef(CONVERT(iface));}static ULONG WINAPIDirectDrawGammaControl_Release(LPDIRECTDRAWGAMMACONTROL iface){ return IDirectDrawSurface7_Release(CONVERT(iface));}static HRESULT WINAPIDirectDrawGammaControl_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 WINAPIDirectDrawGammaControl_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);}ICOM_VTABLE(IDirectDrawGammaControl) DDRAW_IDDGC_VTable ={ ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE DirectDrawGammaControl_QueryInterface, DirectDrawGammaControl_AddRef, DirectDrawGammaControl_Release, DirectDrawGammaControl_GetGammaRamp, DirectDrawGammaControl_SetGammaRamp};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?