Working on a redesign of whole directdraw interface
[reactos.git] / reactos / dll / directx / ddraw / clipper.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
15 DirectDrawClipper_Release(LPDIRECTDRAWCLIPPER iface)
16 {
17 DX_WINDBG_trace();
18
19 IDirectDrawClipperImpl* This = (IDirectDrawClipperImpl*)iface;
20 ULONG ref=0;
21
22 if (iface!=NULL)
23 {
24 ref = InterlockedDecrement( (PLONG) &This->ref);
25
26 if (ref == 0)
27 {
28 /* Add here if we need releae some memory pointer before
29 * exists
30 */
31
32 if (This!=NULL)
33 {
34 HeapFree(GetProcessHeap(), 0, This);
35 }
36 }
37 }
38 return ref;
39 }
40
41 ULONG WINAPI
42 DirectDrawClipper_AddRef (LPDIRECTDRAWCLIPPER iface)
43 {
44 DX_WINDBG_trace();
45
46 IDirectDrawClipperImpl * This = (IDirectDrawClipperImpl*)iface;
47
48 ULONG ref=0;
49
50 if (iface!=NULL)
51 {
52 ref = InterlockedIncrement( (PLONG) &This->ref);
53 }
54 return ref;
55 }
56
57 HRESULT WINAPI
58 DirectDrawClipper_Initialize( LPDIRECTDRAWCLIPPER iface,
59 LPDIRECTDRAW lpDD,
60 DWORD dwFlags)
61 {
62 /* FIXME not implment */
63 DX_WINDBG_trace();
64 DX_STUB_DD_OK;
65 }
66
67 HRESULT WINAPI
68 DirectDrawClipper_SetHwnd( LPDIRECTDRAWCLIPPER iface,
69 DWORD dwFlags,
70 HWND hWnd)
71 {
72 /* FIXME not implment */
73 DX_WINDBG_trace();
74 DX_STUB_DD_OK;
75 }
76
77 HRESULT WINAPI
78 DirectDrawClipper_GetClipList( LPDIRECTDRAWCLIPPER iface,
79 LPRECT lpRect,
80 LPRGNDATA lpClipList,
81 LPDWORD lpdwSize)
82 {
83 DX_WINDBG_trace();
84 DX_STUB;
85 }
86
87 HRESULT WINAPI
88 DirectDrawClipper_SetClipList( LPDIRECTDRAWCLIPPER iface,
89 LPRGNDATA lprgn,
90 DWORD dwFlag)
91 {
92 DX_WINDBG_trace();
93 DX_STUB;
94 }
95
96 HRESULT WINAPI
97 DirectDrawClipper_QueryInterface( LPDIRECTDRAWCLIPPER iface,
98 REFIID riid,
99 LPVOID* ppvObj)
100 {
101 DX_WINDBG_trace();
102 DX_STUB;
103 }
104
105 HRESULT WINAPI
106 DirectDrawClipper_GetHWnd( LPDIRECTDRAWCLIPPER iface,
107 HWND* hWndPtr)
108 {
109 DX_WINDBG_trace();
110 DX_STUB;
111 }
112
113 HRESULT WINAPI
114 DirectDrawClipper_IsClipListChanged( LPDIRECTDRAWCLIPPER iface,
115 BOOL* lpbChanged)
116 {
117 DX_WINDBG_trace();
118 DX_STUB;
119 }
120
121 IDirectDrawClipperVtbl DirectDrawClipper_Vtable =
122 {
123 DirectDrawClipper_QueryInterface,
124 DirectDrawClipper_AddRef,
125 DirectDrawClipper_Release,
126 DirectDrawClipper_GetClipList,
127 DirectDrawClipper_GetHWnd,
128 DirectDrawClipper_Initialize,
129 DirectDrawClipper_IsClipListChanged,
130 DirectDrawClipper_SetClipList,
131 DirectDrawClipper_SetHwnd
132 };