1 | /* $Id: clipper.h,v 1.2 2002-12-29 14:11:00 sandervl Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * DX clipper class definition
|
---|
5 | *
|
---|
6 | * Copyright 1998 Sander va Leeuwen
|
---|
7 | *
|
---|
8 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
9 | *
|
---|
10 | */
|
---|
11 | #ifndef __OS2CLIPPER_H__
|
---|
12 | #define __OS2CLIPPER_H__
|
---|
13 |
|
---|
14 | #include "divewrap.h"
|
---|
15 |
|
---|
16 | #define FAR
|
---|
17 | #undef THIS
|
---|
18 | #define THIS IDirectDrawClipper*
|
---|
19 | class OS2IDirectDrawClipper
|
---|
20 | {
|
---|
21 | public:
|
---|
22 | //this one has to go first!
|
---|
23 | IDirectDrawClipperVtbl *lpVtbl;
|
---|
24 | IDirectDrawClipperVtbl Vtbl;
|
---|
25 |
|
---|
26 | OS2IDirectDrawClipper(OS2IDirectDraw *lpDirectDraw);
|
---|
27 | OS2IDirectDrawClipper(void);
|
---|
28 | ~OS2IDirectDrawClipper();
|
---|
29 |
|
---|
30 | int Referenced;
|
---|
31 | inline HRESULT GetLastError() { return lastError; };
|
---|
32 |
|
---|
33 | BOOL IsClipListChangedInt()
|
---|
34 | {
|
---|
35 | BOOL ret = fClipListChangedInt;
|
---|
36 | fClipListChangedInt = FALSE;
|
---|
37 | return ret;
|
---|
38 | }
|
---|
39 | private:
|
---|
40 |
|
---|
41 | protected:
|
---|
42 | HRESULT lastError;
|
---|
43 | OS2IDirectDraw *lpDraw;
|
---|
44 | HDIVE hDive;
|
---|
45 | HWND clipWindow;
|
---|
46 |
|
---|
47 | LPRGNDATA lpRgnData;
|
---|
48 | BOOL fClipListChanged, fClipListChangedInt;
|
---|
49 | BOOL fDrawingAllowed;
|
---|
50 |
|
---|
51 | // Linked list management
|
---|
52 | OS2IDirectDrawClipper* next; // Next OS2IDirectDraw
|
---|
53 | static OS2IDirectDrawClipper* ddraw; // List of OS2IDirectDraw
|
---|
54 |
|
---|
55 | friend HRESULT WIN32API ClipQueryInterface(THIS, REFIID riid, LPVOID FAR * ppvObj);
|
---|
56 | friend ULONG WIN32API ClipAddRef(THIS);
|
---|
57 | friend ULONG WIN32API ClipRelease(THIS);
|
---|
58 | friend HRESULT WIN32API ClipGetClipList(THIS, LPRECT, LPRGNDATA, LPDWORD);
|
---|
59 | friend HRESULT WIN32API ClipGetHWnd(THIS, HWND FAR *);
|
---|
60 | friend HRESULT WIN32API ClipInitialize(THIS, LPDIRECTDRAW, DWORD);
|
---|
61 | friend HRESULT WIN32API ClipIsClipListChanged(THIS, BOOL FAR *);
|
---|
62 | friend HRESULT WIN32API ClipSetClipList(THIS, LPRGNDATA,DWORD);
|
---|
63 | friend HRESULT WIN32API ClipSetHWnd(THIS, DWORD, HWND );
|
---|
64 | friend BOOL WIN32API ClipVisRgnCallback(HWND hwnd, BOOL fDrawingAllowed, DWORD dwUserData);
|
---|
65 |
|
---|
66 | };
|
---|
67 |
|
---|
68 | HRESULT WIN32API ClipQueryInterface(THIS, REFIID riid, LPVOID FAR * ppvObj);
|
---|
69 | ULONG WIN32API ClipAddRef(THIS);
|
---|
70 | ULONG WIN32API ClipRelease(THIS);
|
---|
71 | HRESULT WIN32API ClipGetClipList(THIS, LPRECT, LPRGNDATA, LPDWORD);
|
---|
72 | HRESULT WIN32API ClipGetHWnd(THIS, HWND FAR *);
|
---|
73 | HRESULT WIN32API ClipInitialize(THIS, LPDIRECTDRAW, DWORD);
|
---|
74 | HRESULT WIN32API ClipIsClipListChanged(THIS, BOOL FAR *);
|
---|
75 | HRESULT WIN32API ClipSetClipList(THIS, LPRGNDATA,DWORD);
|
---|
76 | HRESULT WIN32API ClipSetHWnd(THIS, DWORD, HWND );
|
---|
77 |
|
---|
78 | #endif
|
---|