Author: tkreuzer
Date: Thu Jul 26 02:22:38 2007
New Revision: 27817
URL:
http://svn.reactos.org/svn/reactos?rev=27817&view=rev
Log:
Add some type definitions and macros for gdi object entries. Needed for upcoming gdiobj
patch.
Modified:
trunk/reactos/include/reactos/win32k/ntgdihdl.h
Modified: trunk/reactos/include/reactos/win32k/ntgdihdl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntgdihdl.h (original)
+++ trunk/reactos/include/reactos/win32k/ntgdihdl.h Thu Jul 26 02:22:38 2007
@@ -27,6 +27,12 @@
#define GDI_HANDLE_REUSE_MASK 0xff000000
#define GDI_HANDLE_UPPER_MASK
(GDI_HANDLE_TYPE_MASK|GDI_HANDLE_STOCK_MASK|GDI_HANDLE_REUSE_MASK)
#define GDI_HANDLE_REUSECNT_SHIFT 24
+
+#define GDI_ENTRY_STOCK_MASK 0x00000080
+#define GDI_ENTRY_REUSE_MASK 0x0000ff00
+#define GDI_ENTRY_REUSE_INC 0x00000100
+#define GDI_ENTRY_REUSECNT_SHIFT 8
+#define GDI_ENTRY_UPPER_SHIFT 16
/*! \defgroup GDI object types
*
@@ -73,6 +79,16 @@
#define GDI_HANDLE_SET_STOCKOBJ(h) \
((h) = (HANDLE)(((ULONG_PTR)(h)) | GDI_HANDLE_STOCK_MASK))
+
+#define GDI_HANDLE_GET_UPPER(h) \
+ (((ULONG_PTR)(h)) & GDI_HANDLE_UPPER_MASK)
+
+#define GDI_HANDLE_GET_REUSECNT(h) \
+ (((ULONG_PTR)(h)) >> GDI_HANDLE_REUSECNT_SHIFT)
+
+#define GDI_ENTRY_GET_REUSECNT(e) \
+ ((((ULONG_PTR)(e)) & GDI_ENTRY_REUSE_MASK) >> GDI_ENTRY_REUSECNT_SHIFT)
+
/* DC_ATTR Dirty Flags */
#define DIRTY_FILL 0x00000001