d8d45a8cfc3df772243f7918c51844dc83aa290a
[reactos.git] / reactos / lib / ddraw / main / clipper_main.c
1 /* $Id$
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS
5 * FILE: lib/ddraw/main/clipper.c
6 * PURPOSE: IDirectDrawClipper Implementation
7 * PROGRAMMER: Maarten Bosma
8 *
9 */
10
11 #include "rosdraw.h"
12
13
14 ULONG WINAPI Main_DirectDrawClipper_Release(LPDIRECTDRAWCLIPPER iface)
15 {
16 IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
17 ULONG ref = InterlockedDecrement(&This->ref);
18
19 if (ref == 0)
20 HeapFree(GetProcessHeap(), 0, This);
21
22 return ref;
23 }
24
25 ULONG WINAPI Main_DirectDrawClipper_AddRef (LPDIRECTDRAWCLIPPER iface)
26 {
27 IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
28 ULONG ref = InterlockedIncrement((PLONG)&This->DirectDrawGlobal.dwRefCnt);
29
30 return ref;
31 }
32
33 HRESULT WINAPI Main_DirectDrawClipper_Initialize(
34 LPDIRECTDRAWCLIPPER iface, LPDIRECTDRAW lpDD, DWORD dwFlags)
35 {
36 return DD_OK;
37 }
38
39 HRESULT WINAPI Main_DirectDrawClipper_SetHwnd(
40 LPDIRECTDRAWCLIPPER iface, DWORD dwFlags, HWND hWnd)
41 {
42 DX_STUB;
43 }
44
45 HRESULT WINAPI Main_DirectDrawClipper_GetClipList(
46 LPDIRECTDRAWCLIPPER iface, LPRECT lpRect, LPRGNDATA lpClipList,
47 LPDWORD lpdwSize)
48 {
49 DX_STUB;
50 }
51
52 HRESULT WINAPI Main_DirectDrawClipper_SetClipList(
53 LPDIRECTDRAWCLIPPER iface,LPRGNDATA lprgn,DWORD dwFlag)
54 {
55 DX_STUB;
56 }
57
58 HRESULT WINAPI Main_DirectDrawClipper_QueryInterface(
59 LPDIRECTDRAWCLIPPER iface, REFIID riid, LPVOID* ppvObj)
60 {
61 return E_NOINTERFACE;
62 }
63
64 HRESULT WINAPI Main_DirectDrawClipper_GetHWnd(
65 LPDIRECTDRAWCLIPPER iface, HWND* hWndPtr)
66 {
67 DX_STUB;
68 }
69
70 HRESULT WINAPI Main_DirectDrawClipper_IsClipListChanged(
71 LPDIRECTDRAWCLIPPER iface, BOOL* lpbChanged)
72 {
73 DX_STUB;
74 }
75
76 IDirectDrawClipperVtbl DirectDrawClipper_Vtable =
77 {
78 Main_DirectDrawClipper_QueryInterface,
79 Main_DirectDrawClipper_AddRef,
80 Main_DirectDrawClipper_Release,
81 Main_DirectDrawClipper_GetClipList,
82 Main_DirectDrawClipper_GetHWnd,
83 Main_DirectDrawClipper_Initialize,
84 Main_DirectDrawClipper_IsClipListChanged,
85 Main_DirectDrawClipper_SetClipList,
86 Main_DirectDrawClipper_SetHwnd
87 };