1 #pragma once 2 3 /* DC hook codes */ 4 #define DCHC_INVALIDVISRGN 0x0001 5 #define DCHC_DELETEDC 0x0002 6 7 #define DCHF_INVALIDATEVISRGN 0x0001 8 #define DCHF_VALIDATEVISRGN 0x0002 9 10 typedef enum 11 { 12 DCE_CACHE_DC, /* This is a cached DC (allocated by USER) */ 13 DCE_CLASS_DC, /* This is a class DC (style CS_CLASSDC) */ 14 DCE_WINDOW_DC /* This is a window DC (style CS_OWNDC) */ 15 } DCE_TYPE, *PDCE_TYPE; 16 17 typedef struct tagDCE 18 { 19 LIST_ENTRY List; 20 HDC hDC; 21 HWND hwndCurrent; 22 PWND pwndOrg; 23 PWND pwndClip; 24 PWND pwndRedirect; 25 HRGN hrgnClip; 26 HRGN hrgnClipPublic; 27 HRGN hrgnSavedVis; 28 DWORD DCXFlags; 29 PTHREADINFO ptiOwner; 30 PPROCESSINFO ppiOwner; 31 struct _MONITOR* pMonitor; 32 } DCE, *PDCE; 33 34 /* internal DCX flags, see psdk/winuser.h for the rest */ 35 #define DCX_DCEEMPTY 0x00000800 36 #define DCX_DCEBUSY 0x00001000 37 #define DCX_DCEDIRTY 0x00002000 38 #define DCX_LAYEREDWIN 0x00004000 39 #define DCX_DCPOWNED 0x00008000 40 #define DCX_NOCLIPCHILDREN 0x00080000 41 #define DCX_NORECOMPUTE 0x00100000 42 #define DCX_INDESTROY 0x00400000 43 44 CODE_SEG("INIT") NTSTATUS NTAPI InitDCEImpl(VOID); 45 PDCE FASTCALL DceAllocDCE(PWND Window, DCE_TYPE Type); 46 HWND FASTCALL IntWindowFromDC(HDC hDc); 47 void FASTCALL DceFreeDCE(PDCE dce, BOOLEAN Force); 48 void FASTCALL DceEmptyCache(void); 49 VOID FASTCALL DceResetActiveDCEs(PWND Window); 50 void FASTCALL DceFreeClassDCE(PDCE); 51 HWND FASTCALL UserGethWnd(HDC,PWNDOBJ*); 52 void FASTCALL DceFreeWindowDCE(PWND); 53 void FASTCALL DceFreeThreadDCE(PTHREADINFO); 54 VOID FASTCALL DceUpdateVisRgn(DCE *Dce, PWND Window, ULONG Flags); 55 DCE* FASTCALL DceGetDceFromDC(HDC hdc); 56