7d95cc918abc09511c20fd8e23ed00a099eb851b
[reactos.git] / reactos / lib / ddraw / main / gamma_main.c
1 /* $Id$
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS
5 * FILE: lib/ddraw/main/gamma.c
6 * PURPOSE: IDirectDrawGamma Implementation
7 * PROGRAMMER: Maarten Bosma
8 *
9 */
10
11 #include "rosdraw.h"
12
13 ULONG WINAPI
14 Main_DirectDrawGammaControl_AddRef(LPDIRECTDRAWGAMMACONTROL iface)
15 {
16 IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
17 ULONG ref = InterlockedIncrement((PLONG)&This->DirectDrawGlobal.dwRefCnt);
18
19 return ref;
20 }
21
22 ULONG WINAPI
23 Main_DirectDrawGammaControl_Release(LPDIRECTDRAWGAMMACONTROL iface)
24 {
25 IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
26 ULONG ref = InterlockedDecrement(&This->ref);
27
28 if (ref == 0)
29 HeapFree(GetProcessHeap(), 0, This);
30
31 return ref;
32 }
33
34 HRESULT WINAPI
35 Main_DirectDrawGammaControl_QueryInterface(LPDIRECTDRAWGAMMACONTROL iface, REFIID riid,
36 LPVOID *ppObj)
37 {
38 return E_NOINTERFACE;
39 }
40
41 HRESULT WINAPI
42 Main_DirectDrawGammaControl_GetGammaRamp(LPDIRECTDRAWGAMMACONTROL iface, DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp)
43 {
44 DX_STUB;
45 }
46
47 HRESULT WINAPI
48 Main_DirectDrawGammaControl_SetGammaRamp(LPDIRECTDRAWGAMMACONTROL iface, DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp)
49 {
50 DX_STUB;
51 }
52
53 IDirectDrawGammaControlVtbl DirectDrawGammaControl_Vtable =
54 {
55 Main_DirectDrawGammaControl_QueryInterface,
56 Main_DirectDrawGammaControl_AddRef,
57 Main_DirectDrawGammaControl_Release,
58 Main_DirectDrawGammaControl_GetGammaRamp,
59 Main_DirectDrawGammaControl_SetGammaRamp
60 };