ReactOS  0.4.14-dev-390-g34947ad
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  )

Definition at line 75 of file clipper_main.c.

76 {
78  if(!This)
79  return DDERR_INVALIDOBJECT;
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 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DDERR_INVALIDOBJECT
Definition: ddraw.h:78
smooth NULL
Definition: ftsmooth.c:416
struct _DDRAWI_DDRAWCLIPPER_INT * LPDDRAWI_DDRAWCLIPPER_INT
Definition: ddrawi.h:145

Referenced by Main_DDrawSurface_SetClipper().

◆ DirectDrawClipper_GetClipList()

HRESULT WINAPI DirectDrawClipper_GetClipList ( LPDIRECTDRAWCLIPPER  ,
LPRECT  ,
LPRGNDATA  ,
LPDWORD   
)

Definition at line 13 of file clipper_stubs.c.

17 {
19  DX_STUB;
20 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

◆ DirectDrawClipper_GetHWnd()

HRESULT WINAPI DirectDrawClipper_GetHWnd ( LPDIRECTDRAWCLIPPER  ,
HWND  
)

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:13
#define DD_OK
Definition: ddraw.h:186
#define DDERR_INVALIDOBJECT
Definition: ddraw.h:78
struct _DDRAWI_DDRAWCLIPPER_INT * LPDDRAWI_DDRAWCLIPPER_INT
Definition: ddrawi.h:145
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79

◆ DirectDrawClipper_Initialize()

HRESULT WINAPI DirectDrawClipper_Initialize ( LPDIRECTDRAWCLIPPER  ,
LPDIRECTDRAW  ,
DWORD   
)

Definition at line 23 of file clipper_main.c.

25 {
28 
30 
31  if(!This)
32  return DDERR_INVALIDOBJECT;
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 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
IDirectDrawClipperVtbl DirectDrawClipper_Vtable
Definition: clipper_main.c:131
#define DD_OK
Definition: ddraw.h:186
#define DDERR_INVALIDOBJECT
Definition: ddraw.h:78
#define DDERR_ALREADYINITIALIZED
Definition: ddraw.h:67
#define DxHeapMemAlloc(p, m)
Definition: rosdraw.h:113
#define LPVOID
Definition: nt_native.h:45
struct _DDRAWI_DDRAWCLIPPER_INT * LPDDRAWI_DDRAWCLIPPER_INT
Definition: ddrawi.h:145
struct _DDRAWI_DIRECTDRAW_INT * LPDDRAWI_DIRECTDRAW_INT
Definition: ddrawi.h:124
DWORD WINAPI GetCurrentProcessId(VOID)
Definition: proc.c:1158

◆ DirectDrawClipper_IsClipListChanged()

HRESULT WINAPI DirectDrawClipper_IsClipListChanged ( LPDIRECTDRAWCLIPPER  ,
BOOL lpbChanged 
)

Definition at line 32 of file clipper_stubs.c.

34 {
36  DX_STUB;
37 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

◆ DirectDrawClipper_QueryInterface()

HRESULT WINAPI DirectDrawClipper_QueryInterface ( LPDIRECTDRAWCLIPPER  ,
REFIID  ,
LPVOID  
)

Definition at line 13 of file clipper_main.c.

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

◆ DirectDrawClipper_Release()

ULONG WINAPI DirectDrawClipper_Release ( LPDIRECTDRAWCLIPPER  )

Definition at line 54 of file clipper_main.c.

55 {
57  if(!This)
58  return DDERR_INVALIDOBJECT;
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 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DDERR_INVALIDOBJECT
Definition: ddraw.h:78
smooth NULL
Definition: ftsmooth.c:416
struct _DDRAWI_DDRAWCLIPPER_INT * LPDDRAWI_DDRAWCLIPPER_INT
Definition: ddrawi.h:145

Referenced by Main_DDrawSurface_SetClipper().

◆ DirectDrawClipper_SetClipList()

HRESULT WINAPI DirectDrawClipper_SetClipList ( LPDIRECTDRAWCLIPPER  ,
LPRGNDATA  ,
DWORD   
)

Definition at line 23 of file clipper_stubs.c.

26 {
28  DX_STUB;
29 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

◆ DirectDrawClipper_SetHwnd()

HRESULT WINAPI DirectDrawClipper_SetHwnd ( LPDIRECTDRAWCLIPPER  ,
DWORD  ,
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 }
BOOL WINAPI IsWindow(_In_opt_ HWND)
HWND hWnd
Definition: settings.c:17
#define DD_OK
Definition: ddraw.h:186
#define DDERR_INVALIDOBJECT
Definition: ddraw.h:78
struct _DDRAWI_DDRAWCLIPPER_INT * LPDDRAWI_DDRAWCLIPPER_INT
Definition: ddrawi.h:145
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define ULONG_PTR
Definition: config.h:101
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79