ReactOS 0.4.15-dev-6694-g4ba8af9
clipper.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

HRESULT WINAPI DirectDrawClipper_QueryInterface (LPDIRECTDRAWCLIPPER, REFIID, LPVOID *)
 
ULONG WINAPI DirectDrawClipper_Release (LPDIRECTDRAWCLIPPER)
 
ULONG WINAPI DirectDrawClipper_AddRef (LPDIRECTDRAWCLIPPER)
 
HRESULT WINAPI DirectDrawClipper_Initialize (LPDIRECTDRAWCLIPPER, LPDIRECTDRAW, DWORD)
 
HRESULT WINAPI DirectDrawClipper_SetHwnd (LPDIRECTDRAWCLIPPER, DWORD, HWND)
 
HRESULT WINAPI DirectDrawClipper_GetClipList (LPDIRECTDRAWCLIPPER, LPRECT, LPRGNDATA, LPDWORD)
 
HRESULT WINAPI DirectDrawClipper_SetClipList (LPDIRECTDRAWCLIPPER, LPRGNDATA, DWORD)
 
HRESULT WINAPI DirectDrawClipper_GetHWnd (LPDIRECTDRAWCLIPPER, HWND *)
 
HRESULT WINAPI DirectDrawClipper_IsClipListChanged (LPDIRECTDRAWCLIPPER, BOOL *lpbChanged)
 

Function Documentation

◆ DirectDrawClipper_AddRef()

ULONG WINAPI DirectDrawClipper_AddRef ( LPDIRECTDRAWCLIPPER  iface)

Definition at line 75 of file clipper_main.c.

76{
78 if(!This)
80
82
83 if (iface!=NULL)
84 {
85 This->dwIntRefCnt++;
86 This->lpLcl->dwLocalRefCnt++;
87 if (This->lpLcl->lpGbl)
88 This->lpLcl->lpGbl->dwRefCnt++;
89 }
90 return This->dwIntRefCnt;
91}
struct _DDRAWI_DDRAWCLIPPER_INT * LPDDRAWI_DDRAWCLIPPER_INT
Definition: ddrawi.h:145
#define NULL
Definition: types.h:112
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DDERR_INVALIDOBJECT
Definition: ddraw.h:78

Referenced by Main_DDrawSurface_SetClipper().

◆ DirectDrawClipper_GetClipList()

HRESULT WINAPI DirectDrawClipper_GetClipList ( LPDIRECTDRAWCLIPPER  iface,
LPRECT  lpRect,
LPRGNDATA  lpClipList,
LPDWORD  lpdwSize 
)

Definition at line 13 of file clipper_stubs.c.

17{
19 DX_STUB;
20}
#define DX_STUB
Definition: rosdraw.h:224

◆ DirectDrawClipper_GetHWnd()

HRESULT WINAPI DirectDrawClipper_GetHWnd ( LPDIRECTDRAWCLIPPER  iface,
HWND hWndPtr 
)

Definition at line 115 of file clipper_main.c.

117{
119
120 if(!This)
121 return DDERR_INVALIDOBJECT;
122
123 if(!hWndPtr)
124 return DDERR_INVALIDPARAMS;
125
126 *hWndPtr = (HWND)This->lpLcl->lpGbl->hWnd;
127
128 return DD_OK;
129}
HANDLE HWND
Definition: compat.h:19
#define DD_OK
Definition: ddraw.h:186
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79

◆ DirectDrawClipper_Initialize()

HRESULT WINAPI DirectDrawClipper_Initialize ( LPDIRECTDRAWCLIPPER  iface,
LPDIRECTDRAW  lpDD,
DWORD  dwFlags 
)

Definition at line 23 of file clipper_main.c.

25{
28
30
31 if(!This)
33
34 if(This->dwIntRefCnt)
36
38 This->dwIntRefCnt = 1;
39
41 //This->lpLcl->lpClipMore
42 This->lpLcl->lpDD_int = DDraw;
43 This->lpLcl->lpGbl->dwRefCnt = 1;
44 This->lpLcl->pAddrefedThisOwner = (IUnknown*)DDraw;
45
46 // FIXME: Implement Linking and share global object
47 DxHeapMemAlloc(This->lpLcl->lpGbl, sizeof(DDRAWI_DDRAWCLIPPER_GBL));
48 This->lpLcl->lpGbl->dwProcessId = GetCurrentProcessId();
49
50 return DD_OK;
51}
IDirectDrawClipperVtbl DirectDrawClipper_Vtable
Definition: clipper_main.c:131
struct _DDRAWI_DIRECTDRAW_INT * LPDDRAWI_DIRECTDRAW_INT
Definition: ddrawi.h:124
#define LPVOID
Definition: nt_native.h:45
#define DxHeapMemAlloc(p, m)
Definition: rosdraw.h:113
#define DDERR_ALREADYINITIALIZED
Definition: ddraw.h:67
DWORD WINAPI GetCurrentProcessId(void)
Definition: proc.c:1158

◆ DirectDrawClipper_IsClipListChanged()

HRESULT WINAPI DirectDrawClipper_IsClipListChanged ( LPDIRECTDRAWCLIPPER  iface,
BOOL lpbChanged 
)

Definition at line 32 of file clipper_stubs.c.

34{
36 DX_STUB;
37}

◆ DirectDrawClipper_QueryInterface()

HRESULT WINAPI DirectDrawClipper_QueryInterface ( LPDIRECTDRAWCLIPPER  iface,
REFIID  id,
LPVOID obj 
)

Definition at line 13 of file clipper_main.c.

15{
16 if(!iface)
18
19 return E_NOINTERFACE;
20}
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ DirectDrawClipper_Release()

ULONG WINAPI DirectDrawClipper_Release ( LPDIRECTDRAWCLIPPER  iface)

Definition at line 54 of file clipper_main.c.

55{
57 if(!This)
59
61
62 if (iface!=NULL)
63 {
64 This->lpLcl->dwLocalRefCnt--;
65 This->dwIntRefCnt--;
66
67 if (This->lpLcl->lpGbl)
68 This->lpLcl->lpGbl->dwRefCnt--;
69 }
70
71 return This->dwIntRefCnt;
72}

Referenced by Main_DDrawSurface_SetClipper().

◆ DirectDrawClipper_SetClipList()

HRESULT WINAPI DirectDrawClipper_SetClipList ( LPDIRECTDRAWCLIPPER  iface,
LPRGNDATA  lprgn,
DWORD  dwFlag 
)

Definition at line 23 of file clipper_stubs.c.

26{
28 DX_STUB;
29}

◆ DirectDrawClipper_SetHwnd()

HRESULT WINAPI DirectDrawClipper_SetHwnd ( LPDIRECTDRAWCLIPPER  iface,
DWORD  dwFlags,
HWND  hWnd 
)

Definition at line 94 of file clipper_main.c.

97{
99
100 if(!This)
101 return DDERR_INVALIDOBJECT;
102
103 if(!IsWindow(hWnd))
104 return DDERR_INVALIDPARAMS;
105
106 // TODO: check flags
107
108 This->lpLcl->lpGbl->hWnd = (ULONG_PTR)hWnd;
109 This->lpLcl->lpGbl->dwFlags = dwFlags;
110
111 return DD_OK;
112}
HWND hWnd
Definition: settings.c:17
#define ULONG_PTR
Definition: config.h:101
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
BOOL WINAPI IsWindow(_In_opt_ HWND)