[SHELL32] Remove 2 redundant initializations
[reactos.git] / win32ss / include / ntgdihdl.h
index d7479ee..1938ff0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS Win32 Graphical Subsystem (WIN32K)
- * FILE:            include/win32k/ntgdihal.h
+ * FILE:            win32ss/include/ntgdihdl.h
  * PURPOSE:         Win32 Shared GDI Handle/Object Types
  * PROGRAMMER:      Alex Ionescu (alex@relsoft.net)
  */
 
 /* DEFINES *******************************************************************/
 
-/* Base address where the handle table is mapped to */
-#define GDI_HANDLE_TABLE_BASE_ADDRESS (0x400000)
-
 /* GDI handle table can hold 0x10000 handles */
 #define GDI_HANDLE_COUNT 0x10000
-#define GDI_GLOBAL_PROCESS (0x0)
 #define GDI_CFONT_MAX 16
 
 /* Handle Masks and shifts */
 #define GDI_HANDLE_INDEX_MASK (GDI_HANDLE_COUNT - 1)
 #define GDI_HANDLE_TYPE_MASK  0x007f0000
 #define GDI_HANDLE_BASETYPE_MASK 0x001f0000
+#define GDI_HANDLE_EXTYPE_MASK 0x00600000
 #define GDI_HANDLE_STOCK_MASK 0x00800000
 #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_BASETYPE_SHIFT 16
 
 #define GDI_ENTRY_STOCK_MASK 0x00000080
-#define GDI_ENTRY_REUSE_MASK 0x0000ff00
-#define GDI_ENTRY_REUSE_INC 0x00000100
 #define GDI_ENTRY_BASETYPE_MASK 0x001f0000
-#define GDI_ENTRY_FLAGS_MASK 0xff000000
-#define GDI_ENTRY_REUSECNT_SHIFT 8
 #define GDI_ENTRY_UPPER_SHIFT 16
 
 /* GDI Entry Flags */
 #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)
-
 #define GDI_OBJECT_GET_TYPE_INDEX(t) \
     ((t & GDI_HANDLE_BASETYPE_MASK) >> GDI_HANDLE_BASETYPE_SHIFT)
 
-/* Gdi Object Handle Managment Pid lock masking sets. */
+/* Gdi Object Handle Management Pid lock masking sets. */
 /* Ref: used with DxEngSetDCOwner */
 #define GDI_OBJ_HMGR_PUBLIC     0          /* Public owner, Open access? */
 #define GDI_OBJ_HMGR_POWNED     0x80000002 /* Set to current owner. */
 #define GDI_OBJ_HMGR_RESTRICTED 0x80000022 /* Restricted? */
 
 
-/* DC OBJ Types */
-#define DC_TYPE_DIRECT 0  /* normal device context */
-#define DC_TYPE_MEMORY 1  /* memory device context */
-#define DC_TYPE_INFO   2  /* information context */
-
-/* DC OBJ Flags */
-#define DC_FLAG_DISPLAY            0x0001
-#define DC_FLAG_DIRECT             0x0002
-#define DC_FLAG_CANCELLED          0x0004
-#define DC_FLAG_PERMANENT          0x0008
-#define DC_FLAG_DIRTY_RAO          0x0010
-#define DC_FLAG_ACCUM_WMGR         0x0020
-#define DC_FLAG_ACCUM_APP          0x0040
-#define DC_FLAG_RESET              0x0080
-#define DC_FLAG_SYNCHRONIZEACCESS  0x0100
-#define DC_FLAG_EPSPRINTINGESCAPE  0x0200
-#define DC_FLAG_TEMPINFODC         0x0400
-#define DC_FLAG_FULLSCREEN         0x0800
-#define DC_FLAG_IN_CLONEPDEV       0x1000
-#define DC_FLAG_REDIRECTION        0x2000
-#define DC_FLAG_SHAREACCESS        0x4000
-
 /* DC_ATTR Dirty Flags */
 #define DIRTY_FILL                          0x00000001
 #define DIRTY_LINE                          0x00000002
 #define LDC_INIT_DOCUMENT 0x00000040
 #define LDC_INIT_PAGE     0x00000080
 #define LDC_STARTPAGE     0x00000100
-#define LDC_PLAY_MFDC     0x00000800
+#define LDC_NEXTBAND      0x00000200
+#define LDC_FONTHASH      0x00001000
 #define LDC_CLOCKWISE     0x00002000
+#define LDC_NEWFONT       0x00008000
 #define LDC_KILL_DOCUMENT 0x00010000
 #define LDC_META_PRINT    0x00020000
+#define LDC_DIRECT        0x00040000
+#define LDC_RESET_BANDING 0x00080000
+#define LDC_DOWNLOADFONTS 0x00100000
+#define LDC_RESETDC       0x00200000
+#define LDC_UFIMAP        0x00400000
 #define LDC_INFODC        0x01000000 /* If CreateIC was passed. */
 #define LDC_DEVCAPS       0x02000000
+#define LDC_XPS_PASS      0x08000000 // Guessing, not sure.
 #define LDC_ATENDPAGE     0x10000000
+#define LDC_COLORPAGE     0x20000000
+
+#define UFIHASHTABLESIZE  64
 
 /* DC_ATTR Xform Flags */
 #define METAFILE_TO_WORLD_IDENTITY          0x00000001
 #define ATTR_RGN_VALID                      0x00000010
 #define ATTR_RGN_DIRTY                      0x00000020
 
+/* Set/Clear Bitmap/Brush Stock Attribute */
+#define SC_BB_STOCKOBJ 1
 
 /* TYPES *********************************************************************/
 
@@ -273,7 +254,7 @@ typedef struct __GDI_SHARED_HANDLE_TABLE /* Must match win32k/include/gdiobj.h *
 typedef struct _RGN_ATTR
 {
     ULONG AttrFlags;
-    ULONG Flags;     /* Clipping region's complexity. NULL, SIMPLE & COMPLEXREGION */
+    ULONG iComplexity;     /* Clipping region's complexity. NULL, SIMPLE & COMPLEXREGION */
     RECTL Rect;
 } RGN_ATTR,*PRGN_ATTR;
 
@@ -288,13 +269,25 @@ typedef struct _LDC
     ABORTPROC pAbortProc; /* AbortProc for Printing */
     DWORD CallBackTick;
     HANDLE hPrinter;      /* Local or Remote Printer driver */
-    PVOID pUMPDev;
-    PUMDHPDEV pUMdhpdev;
+    PDEVMODEW pdm;
+    PVOID pUMPDev;        /* Ptr to User Mode Printer Device structure */
+    PUMDHPDEV pUMdhpdev;  /* Ptr to Combined UMPD and DHPDEV structure */
+    PVOID UFIHashTable[3];
+    UNIVERSAL_FONT_ID ufi;
+    PVOID pvEMFSpoolData;
+    ULONG cjSize;
+    LIST_ENTRY leRecords;
     DEVCAPS DevCaps;
     HBRUSH BrushColor;
     HPEN PenColor;
+    // wine data
+    DWORD dwData[5];
 } LDC, *PLDC;
 
+/*
+ * DC_ATTR structure.
+ * See also: https://reactos.org/wiki/Techwiki:Win32k/DC_ATTR
+ */
 typedef struct _DC_ATTR
 {
     PVOID pvLDC;