[Win32k]
[reactos.git] / reactos / subsystems / win32 / win32k / include / dce.h
1 #ifndef _WIN32K_DCE_H
2 #define _WIN32K_DCE_H
3
4 /* Ported from WINE by Jason Filby */
5
6 typedef struct tagDCE *PDCE;
7
8 #include <include/window.h>
9
10 typedef HANDLE HDCE;
11
12 /* DC hook codes */
13 #define DCHC_INVALIDVISRGN 0x0001
14 #define DCHC_DELETEDC 0x0002
15
16 #define DCHF_INVALIDATEVISRGN 0x0001
17 #define DCHF_VALIDATEVISRGN 0x0002
18
19 typedef enum
20 {
21 DCE_CACHE_DC, /* This is a cached DC (allocated by USER) */
22 DCE_CLASS_DC, /* This is a class DC (style CS_CLASSDC) */
23 DCE_WINDOW_DC /* This is a window DC (style CS_OWNDC) */
24 } DCE_TYPE, *PDCE_TYPE;
25
26 typedef struct tagDCE
27 {
28 LIST_ENTRY List;
29 HDC hDC;
30 HWND hwndCurrent;
31 PWND pwndOrg;
32 PWND pwndClip;
33 PWND pwndRedirect;
34 HRGN hrgnClip;
35 HRGN hrgnClipPublic;
36 HRGN hrgnSavedVis;
37 DWORD DCXFlags;
38 PTHREADINFO ptiOwner;
39 PPROCESSINFO ppiOwner;
40 struct _MONITOR* pMonitor;
41 } DCE; /* PDCE already declared at top of file */
42
43 /* internal DCX flags, see psdk/winuser.h for the rest */
44 #define DCX_DCEEMPTY 0x00000800
45 #define DCX_DCEBUSY 0x00001000
46 #define DCX_DCEDIRTY 0x00002000
47 #define DCX_LAYEREDWIN 0x00004000
48 #define DCX_DCPOWNED 0x00008000
49 #define DCX_NOCLIPCHILDREN 0x00080000
50 #define DCX_NORECOMPUTE 0x00100000
51 #define DCX_INDESTROY 0x00400000
52
53 BOOL FASTCALL DCE_Cleanup(PDCE pDce);
54 PDCE FASTCALL DceAllocDCE(PWINDOW_OBJECT Window, DCE_TYPE Type);
55 PDCE FASTCALL DCE_FreeDCE(PDCE dce);
56 VOID FASTCALL DCE_FreeWindowDCE(HWND);
57 INT FASTCALL DCE_ExcludeRgn(HDC, HWND, HRGN);
58 BOOL FASTCALL DCE_InvalidateDCE(HWND, const PRECTL);
59 HWND FASTCALL IntWindowFromDC(HDC hDc);
60 PDCE FASTCALL DceFreeDCE(PDCE dce, BOOLEAN Force);
61 void FASTCALL DceEmptyCache(void);
62 VOID FASTCALL DceResetActiveDCEs(PWINDOW_OBJECT Window);
63 void FASTCALL DceFreeClassDCE(HDC);
64 HWND FASTCALL UserGethWnd(HDC,PWNDOBJ*);
65 void FASTCALL DceFreeWindowDCE(PWINDOW_OBJECT);
66 void FASTCALL DceFreeThreadDCE(PTHREADINFO);
67
68 #endif /* _WIN32K_DCE_H */