Author: tkreuzer
Date: Sun Jul 29 11:20:05 2012
New Revision: 56979
URL:
http://svn.reactos.org/svn/reactos?rev=56979&view=rev
Log:
[WIN32K]
- Change some #defines to enums
- Cleanup some obsolete stuff
Added:
trunk/reactos/win32ss/gdi/eng/xlateobj.c
- copied unchanged from r56966, trunk/reactos/win32ss/gdi/eng/xlate.c
Removed:
trunk/reactos/win32ss/gdi/eng/xlate.c
Modified:
trunk/reactos/win32ss/CMakeLists.txt
trunk/reactos/win32ss/gdi/eng/engevent.h
trunk/reactos/win32ss/gdi/eng/inteng.h
trunk/reactos/win32ss/gdi/eng/ldevobj.h
trunk/reactos/win32ss/gdi/eng/pdevobj.h
trunk/reactos/win32ss/gdi/eng/surface.h
trunk/reactos/win32ss/gdi/ntgdi/coord.h
trunk/reactos/win32ss/gdi/ntgdi/dc.h
trunk/reactos/win32ss/gdi/ntgdi/device.c
trunk/reactos/win32ss/gdi/ntgdi/gdiobj.h
trunk/reactos/win32ss/gdi/ntgdi/palette.h
trunk/reactos/win32ss/gdi/ntgdi/path.h
trunk/reactos/win32ss/user/ntuser/metric.c
Modified: trunk/reactos/win32ss/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/CMakeLists.txt?rev…
==============================================================================
--- trunk/reactos/win32ss/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/win32ss/CMakeLists.txt [iso-8859-1] Sun Jul 29 11:20:05 2012
@@ -79,7 +79,7 @@
gdi/eng/surface.c
gdi/eng/transblt.c
gdi/eng/engwindow.c
- gdi/eng/xlate.c
+ gdi/eng/xlateobj.c
user/ntuser/main.c
user/ntuser/misc/file.c
user/ntuser/misc/math.c
Modified: trunk/reactos/win32ss/gdi/eng/engevent.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/engevent.h…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/engevent.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/engevent.h [iso-8859-1] Sun Jul 29 11:20:05 2012
@@ -3,6 +3,9 @@
//
// Flags for the fFlags field of ENG_EVENT
//
-#define ENG_EVENT_USERMAPPED 0x01
+enum _EVENTFLAGS
+{
+ ENG_EVENT_USERMAPPED = 0x01
+};
/* EOF */
Modified: trunk/reactos/win32ss/gdi/eng/inteng.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/inteng.h?r…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/inteng.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/inteng.h [iso-8859-1] Sun Jul 29 11:20:05 2012
@@ -2,7 +2,7 @@
typedef ULONG HCLIP;
-#define ENUM_RECT_LIMIT 50
+#define ENUM_RECT_LIMIT 50
typedef struct _RECT_ENUM
{
@@ -17,23 +17,25 @@
ULONG Width;
} SPAN, *PSPAN;
-#define R3_OPINDEX_NOOP 0xAA
-
-#define R3_OPINDEX_BLACKNESS 0x00
-#define R3_OPINDEX_NOTSRCERASE 0x11
-#define R3_OPINDEX_NOTSRCCOPY 0x33
-#define R3_OPINDEX_SRCERASE 0x44
-#define R3_OPINDEX_DSTINVERT 0x55
-#define R3_OPINDEX_PATINVERT 0x5A
-#define R3_OPINDEX_SRCINVERT 0x66
-#define R3_OPINDEX_SRCAND 0x88
-#define R3_OPINDEX_MERGEPAINT 0xBB
-#define R3_OPINDEX_MERGECOPY 0xC0
-#define R3_OPINDEX_SRCCOPY 0xCC
-#define R3_OPINDEX_SRCPAINT 0xEE
-#define R3_OPINDEX_PATCOPY 0xF0
-#define R3_OPINDEX_PATPAINT 0xFB
-#define R3_OPINDEX_WHITENESS 0xFF
+enum _R3_ROPCODES
+{
+ R3_OPINDEX_NOOP = 0xAA,
+ R3_OPINDEX_BLACKNESS = 0x00,
+ R3_OPINDEX_NOTSRCERASE = 0x11,
+ R3_OPINDEX_NOTSRCCOPY = 0x33,
+ R3_OPINDEX_SRCERASE = 0x44,
+ R3_OPINDEX_DSTINVERT = 0x55,
+ R3_OPINDEX_PATINVERT = 0x5A,
+ R3_OPINDEX_SRCINVERT = 0x66,
+ R3_OPINDEX_SRCAND = 0x88,
+ R3_OPINDEX_MERGEPAINT = 0xBB,
+ R3_OPINDEX_MERGECOPY = 0xC0,
+ R3_OPINDEX_SRCCOPY = 0xCC,
+ R3_OPINDEX_SRCPAINT = 0xEE,
+ R3_OPINDEX_PATCOPY = 0xF0,
+ R3_OPINDEX_PATPAINT = 0xFB,
+ R3_OPINDEX_WHITENESS = 0xFF
+};
#define ROP2_TO_MIX(Rop2) (((Rop2) << 8) | (Rop2))
Modified: trunk/reactos/win32ss/gdi/eng/ldevobj.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/ldevobj.h?…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/ldevobj.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/ldevobj.h [iso-8859-1] Sun Jul 29 11:20:05 2012
@@ -1,11 +1,7 @@
-#ifdef __GNUC__
-/* HACK, for bug in ld. Will be removed soon. */
-#define __ImageBase _image_base__
-#endif
extern IMAGE_DOS_HEADER __ImageBase;
-#define GDI_ENGINE_VERSION DDI_DRIVER_VERSION_NT5_01
+static const unsigned GDI_ENGINE_VERSION = DDI_DRIVER_VERSION_NT5_01;
typedef enum
{
Modified: trunk/reactos/win32ss/gdi/eng/pdevobj.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/pdevobj.h?…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/pdevobj.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/pdevobj.h [iso-8859-1] Sun Jul 29 11:20:05 2012
@@ -2,22 +2,25 @@
#define __WIN32K_PDEVOBJ_H
/* PDEVOBJ flags */
-#define PDEV_DISPLAY 0x00000001 /* Display device */
-#define PDEV_HARDWARE_POINTER 0x00000002 /* Supports hardware cursor */
-#define PDEV_SOFTWARE_POINTER 0x00000004
-#define PDEV_GOTFONTS 0x00000040 /* Has font driver */
-#define PDEV_PRINTER 0x00000080
-#define PDEV_ALLOCATEDBRUSHES 0x00000100
-#define PDEV_HTPAL_IS_DEVPAL 0x00000200
-#define PDEV_DISABLED 0x00000400
-#define PDEV_SYNCHRONIZE_ENABLED 0x00000800
-#define PDEV_FONTDRIVER 0x00002000 /* Font device */
-#define PDEV_GAMMARAMP_TABLE 0x00004000
-#define PDEV_UMPD 0x00008000
-#define PDEV_SHARED_DEVLOCK 0x00010000
-#define PDEV_META_DEVICE 0x00020000
-#define PDEV_DRIVER_PUNTED_CALL 0x00040000 /* Driver calls back to GDI engine */
-#define PDEV_CLONE_DEVICE 0x00080000
+enum _PDEVFLAGS
+{
+ PDEV_DISPLAY = 0x00000001, /* Display device */
+ PDEV_HARDWARE_POINTER = 0x00000002, /* Supports hardware cursor */
+ PDEV_SOFTWARE_POINTER = 0x00000004,
+ PDEV_GOTFONTS = 0x00000040, /* Has font driver */
+ PDEV_PRINTER = 0x00000080,
+ PDEV_ALLOCATEDBRUSHES = 0x00000100,
+ PDEV_HTPAL_IS_DEVPAL = 0x00000200,
+ PDEV_DISABLED = 0x00000400,
+ PDEV_SYNCHRONIZE_ENABLED = 0x00000800,
+ PDEV_FONTDRIVER = 0x00002000, /* Font device */
+ PDEV_GAMMARAMP_TABLE = 0x00004000,
+ PDEV_UMPD = 0x00008000,
+ PDEV_SHARED_DEVLOCK = 0x00010000,
+ PDEV_META_DEVICE = 0x00020000,
+ PDEV_DRIVER_PUNTED_CALL = 0x00040000, /* Driver calls back to GDI engine */
+ PDEV_CLONE_DEVICE = 0x00080000
+};
/* Type definitions ***********************************************************/
@@ -150,7 +153,6 @@
/* Globals ********************************************************************/
extern PPDEVOBJ gppdevPrimary;
-#define pPrimarySurface gppdevPrimary
/* Function prototypes ********************************************************/
Modified: trunk/reactos/win32ss/gdi/eng/surface.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/surface.h?…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/surface.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/surface.h [iso-8859-1] Sun Jul 29 11:20:05 2012
@@ -1,6 +1,4 @@
#pragma once
-
-#define PDEV_SURFACE 0x80000000
/* GDI surface object */
typedef struct _SURFACE
@@ -39,7 +37,9 @@
DWORD biClrImportant;
} SURFACE, *PSURFACE;
-// flags field:
+/* flags field */
+enum _SURFACEFLAGS
+{
//#define HOOK_BITBLT 0x00000001
//#define HOOK_STRETCHBLT 0x00000002
//#define HOOK_PLGBLT 0x00000004
@@ -65,22 +65,24 @@
//#else
// #define HOOK_FLAGS 0x0003B5EF
//#endif
-#define UMPD_SURFACE 0x00040000
-#define MIRROR_SURFACE 0x00080000
-#define DIRECTDRAW_SURFACE 0x00100000
-#define DRIVER_CREATED_SURFACE 0x00200000
-#define ENG_CREATE_DEVICE_SURFACE 0x00400000
-#define DDB_SURFACE 0x00800000
-#define LAZY_DELETE_SURFACE 0x01000000
-#define BANDING_SURFACE 0x02000000
-#define API_BITMAP 0x04000000
-#define PALETTE_SELECT_SET 0x08000000
-#define UNREADABLE_SURFACE 0x10000000
-#define DYNAMIC_MODE_PALETTE 0x20000000
-#define ABORT_SURFACE 0x40000000
-#define PDEV_SURFACE 0x80000000
+ UMPD_SURFACE = 0x00040000,
+ MIRROR_SURFACE = 0x00080000,
+ DIRECTDRAW_SURFACE = 0x00100000,
+ DRIVER_CREATED_SURFACE = 0x00200000,
+ ENG_CREATE_DEVICE_SURFACE = 0x00400000,
+ DDB_SURFACE = 0x00800000,
+ LAZY_DELETE_SURFACE = 0x01000000,
+ BANDING_SURFACE = 0x02000000,
+ API_BITMAP = 0x04000000,
+ PALETTE_SELECT_SET = 0x08000000,
+ UNREADABLE_SURFACE = 0x10000000,
+ DYNAMIC_MODE_PALETTE = 0x20000000,
+ ABORT_SURFACE = 0x40000000,
+ PDEV_SURFACE = 0x80000000
+};
#define BMF_POOLALLOC 0x100
+#define PDEV_SURFACE 0x80000000
/* Internal interface */
Removed: trunk/reactos/win32ss/gdi/eng/xlate.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/xlate.c?re…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/xlate.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/xlate.c (removed)
@@ -1,720 +1,0 @@
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS Win32k subsystem
- * PURPOSE: GDI Color Translation Functions
- * FILE: subsystems/win32/win32k/eng/xlate.c
- * PROGRAMER: Timo Kreuzer (timo.kreuzer(a)reactos.org)
- */
-
-#include <win32k.h>
-
-#define NDEBUG
-#include <debug.h>
-
-
-/** Globals *******************************************************************/
-
-EXLATEOBJ gexloTrivial = {{0, XO_TRIVIAL, 0, 0, 0, 0}, EXLATEOBJ_iXlateTrivial};
-
-static ULONG giUniqueXlate = 0;
-
-static const BYTE gajXlate5to8[32] =
-{ 0, 8, 16, 25, 33, 41, 49, 58, 66, 74, 82, 90, 99,107,115,123,
- 132,140,148,156,165,173,181,189,197,206,214,222,231,239,247,255};
-
-static const BYTE gajXlate6to8[64] =
-{ 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 45, 49, 52, 57, 61,
- 65, 69, 73, 77, 81, 85, 89, 93, 97,101,105,109,113,117,121,125,
-130,134,138,142,146,150,154,158,162,166,170,174,178,182,186,190,
-194,198,202,207,210,215,219,223,227,231,235,239,243,247,251,255};
-
-
-/** iXlate functions **********************************************************/
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlateTrivial(PEXLATEOBJ pexlo, ULONG iColor)
-{
- return iColor;
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlateToMono(PEXLATEOBJ pexlo, ULONG iColor)
-{
- return (iColor == pexlo->xlo.pulXlate[0]);
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlateTable(PEXLATEOBJ pexlo, ULONG iColor)
-{
- if (iColor >= pexlo->xlo.cEntries) return 0;
- return pexlo->xlo.pulXlate[iColor];
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlateRGBtoBGR(PEXLATEOBJ pxlo, ULONG iColor)
-{
- ULONG iNewColor;
-
- /* Copy green */
- iNewColor = iColor & 0xff00ff00;
-
- /* Mask red and blue */
- iColor &= 0x00ff00ff;
-
- /* Shift and copy red and blue */
- iNewColor |= iColor >> 16;
- iNewColor |= iColor << 16;
-
- return iNewColor;
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlateRGBto555(PEXLATEOBJ pxlo, ULONG iColor)
-{
- ULONG iNewColor;
-
- /* Copy red */
- iColor <<= 7;
- iNewColor = iColor & 0x7C00;
-
- /* Copy green */
- iColor >>= 13;
- iNewColor |= iColor & 0x3E0;
-
- /* Copy blue */
- iColor >>= 13;
- iNewColor |= iColor & 0x1F;
-
- return iNewColor;
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlateBGRto555(PEXLATEOBJ pxlo, ULONG iColor)
-{
- ULONG iNewColor;
-
- /* Copy blue */
- iColor >>= 3;
- iNewColor = iColor & 0x1f;
-
- /* Copy green */
- iColor >>= 3;
- iNewColor |= (iColor & 0x3E0);
-
- /* Copy red */
- iColor >>= 3;
- iNewColor |= (iColor & 0x7C00);
-
- return iNewColor;
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlateRGBto565(PEXLATEOBJ pxlo, ULONG iColor)
-{
- ULONG iNewColor;
-
- /* Copy red */
- iColor <<= 8;
- iNewColor = iColor & 0xF800;
-
- /* Copy green */
- iColor >>= 13;
- iNewColor |= iColor & 0x7E0;
-
- /* Copy green */
- iColor >>= 14;
- iNewColor |= iColor & 0x1F;
-
- return iNewColor;
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlateBGRto565(PEXLATEOBJ pxlo, ULONG iColor)
-{
- ULONG iNewColor;
-
- /* Copy blue */
- iColor >>= 3;
- iNewColor = iColor & 0x1f;
-
- /* Copy green */
- iColor >>= 2;
- iNewColor |= (iColor & 0x7E0);
-
- /* Copy red */
- iColor >>= 3;
- iNewColor |= (iColor & 0xF800);
-
- return iNewColor;
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlateRGBtoPal(PEXLATEOBJ pexlo, ULONG iColor)
-{
- return PALETTE_ulGetNearestPaletteIndex(pexlo->ppalDst, iColor);
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlate555toRGB(PEXLATEOBJ pxlo, ULONG iColor)
-{
- ULONG iNewColor;
-
- /* Copy blue */
- iNewColor = gajXlate5to8[iColor & 0x1F] << 16;
-
- /* Copy green */
- iColor >>= 5;
- iNewColor |= gajXlate5to8[iColor & 0x1F] << 8;
-
- /* Copy red */
- iColor >>= 5;
- iNewColor |= gajXlate5to8[iColor & 0x1F];
-
- return iNewColor;
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlate555toBGR(PEXLATEOBJ pxlo, ULONG iColor)
-{
- ULONG iNewColor;
-
- /* Copy blue */
- iNewColor = gajXlate5to8[iColor & 0x1F];
-
- /* Copy green */
- iColor >>= 5;
- iNewColor |= gajXlate5to8[iColor & 0x1F] << 8;
-
- /* Copy red */
- iColor >>= 5;
- iNewColor |= gajXlate5to8[iColor & 0x1F] << 16;
-
- return iNewColor;
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlate555to565(PEXLATEOBJ pxlo, ULONG iColor)
-{
- ULONG iNewColor;
-
- /* Copy blue */
- iNewColor = iColor & 0x1f;
-
- /* Copy red and green */
- iColor <<= 1;
- iNewColor |= iColor & 0xFFC0;
-
- /* Duplicate highest green bit */
- iColor >>= 5;
- iNewColor |= (iColor & 0x20);
-
- return iNewColor;
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlate555toPal(PEXLATEOBJ pexlo, ULONG iColor)
-{
- iColor = EXLATEOBJ_iXlate555toRGB(pexlo, iColor);
-
- return PALETTE_ulGetNearestPaletteIndex(pexlo->ppalDst, iColor);
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlate565to555(PEXLATEOBJ pxlo, ULONG iColor)
-{
- ULONG iNewColor;
-
- /* Copy blue */
- iNewColor = iColor & 0x1f;
-
- /* Copy red and green */
- iColor >>= 1;
- iNewColor |= iColor & 0x7FE0;
-
- return iNewColor;
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlate565toRGB(PEXLATEOBJ pexlo, ULONG iColor)
-{
- ULONG iNewColor;
-
- /* Copy blue */
- iNewColor = gajXlate5to8[iColor & 0x1F] << 16;
-
- /* Copy green */
- iColor >>= 5;
- iNewColor |= gajXlate6to8[iColor & 0x3F] << 8;
-
- /* Copy red */
- iColor >>= 6;
- iNewColor |= gajXlate5to8[iColor & 0x1F];
-
- return iNewColor;
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlate565toBGR(PEXLATEOBJ pexlo, ULONG iColor)
-{
- ULONG iNewColor;
-
- /* Copy blue */
- iNewColor = gajXlate5to8[iColor & 0x1F];
-
- /* Copy green */
- iColor >>= 5;
- iNewColor |= gajXlate6to8[iColor & 0x3F] << 8;
-
- /* Copy blue */
- iColor >>= 6;
- iNewColor |= gajXlate5to8[iColor & 0x1F] << 16;
-
- return iNewColor;
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlate565toPal(EXLATEOBJ *pexlo, ULONG iColor)
-{
- iColor = EXLATEOBJ_iXlate565toRGB(pexlo, iColor);
-
- return PALETTE_ulGetNearestPaletteIndex(pexlo->ppalDst, iColor);
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlateShiftAndMask(PEXLATEOBJ pexlo, ULONG iColor)
-{
- ULONG iNewColor;
-
- iNewColor = _rotl(iColor, pexlo->ulRedShift) & pexlo->ulRedMask;
- iNewColor |= _rotl(iColor, pexlo->ulGreenShift) & pexlo->ulGreenMask;
- iNewColor |= _rotl(iColor, pexlo->ulBlueShift) & pexlo->ulBlueMask;
-
- return iNewColor;
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlateBitfieldsToPal(PEXLATEOBJ pexlo, ULONG iColor)
-{
- /* Convert bitfields to RGB */
- iColor = EXLATEOBJ_iXlateShiftAndMask(pexlo, iColor);
-
- /* Return nearest index */
- return PALETTE_ulGetNearestPaletteIndex(pexlo->ppalDst, iColor);
-}
-
-
-/** Private Functions *********************************************************/
-
-VOID
-NTAPI
-EXLATEOBJ_vInitialize(
- PEXLATEOBJ pexlo,
- PALETTE *ppalSrc,
- PALETTE *ppalDst,
- COLORREF crSrcBackColor,
- COLORREF crDstBackColor,
- COLORREF crDstForeColor)
-{
- ULONG cEntries;
- ULONG i, ulColor;
-
- if (!ppalSrc) ppalSrc = &gpalRGB;
- if (!ppalDst) ppalDst = &gpalRGB;
-
- pexlo->xlo.iUniq = InterlockedIncrement((LONG*)&giUniqueXlate);
- pexlo->xlo.cEntries = 0;
- pexlo->xlo.flXlate = 0;
- pexlo->xlo.pulXlate = pexlo->aulXlate;
- pexlo->pfnXlate = EXLATEOBJ_iXlateTrivial;
- pexlo->hColorTransform = NULL;
- pexlo->ppalSrc = ppalSrc;
- pexlo->ppalDst = ppalDst;
- pexlo->xlo.iSrcType = (USHORT)ppalSrc->flFlags;
- pexlo->xlo.iDstType = (USHORT)ppalDst->flFlags;
- pexlo->ppalDstDc = &gpalRGB;
-
- if (ppalDst == ppalSrc)
- {
- pexlo->xlo.flXlate |= XO_TRIVIAL;
- return;
- }
-
- /* Check if both of the pallettes are indexed */
- if (!(ppalSrc->flFlags & PAL_INDEXED) || !(ppalDst->flFlags &
PAL_INDEXED))
- {
- /* At least one palette is not indexed, calculate shifts/masks */
- ULONG aulMasksSrc[3], aulMasksDst[3];
-
- PALETTE_vGetBitMasks(ppalSrc, aulMasksSrc);
- PALETTE_vGetBitMasks(ppalDst, aulMasksDst);
-
- pexlo->ulRedMask = aulMasksDst[0];
- pexlo->ulGreenMask = aulMasksDst[1];
- pexlo->ulBlueMask = aulMasksDst[2];
-
- pexlo->ulRedShift = CalculateShift(aulMasksSrc[0], aulMasksDst[0]);
- pexlo->ulGreenShift = CalculateShift(aulMasksSrc[1], aulMasksDst[1]);
- pexlo->ulBlueShift = CalculateShift(aulMasksSrc[2], aulMasksDst[2]);
- }
-
- if (ppalSrc->flFlags & PAL_MONOCHROME)
- {
- /* This is a monochrome palette */
- if (!(ppalDst->flFlags & PAL_MONOCHROME))
- {
- /* Mono to color, use the dest DC's fore and back color */
- pexlo->pfnXlate = EXLATEOBJ_iXlateTable;
- pexlo->xlo.flXlate |= XO_TABLE;
- pexlo->xlo.cEntries = 2;
- pexlo->xlo.pulXlate[0] =
- PALETTE_ulGetNearestIndex(ppalDst, crDstForeColor);
- pexlo->xlo.pulXlate[1] =
- PALETTE_ulGetNearestIndex(ppalDst, crDstBackColor);
- }
- }
- else if (ppalDst->flFlags & PAL_MONOCHROME)
- {
- pexlo->pfnXlate = EXLATEOBJ_iXlateToMono;
- pexlo->xlo.flXlate |= XO_TO_MONO;
- pexlo->xlo.cEntries = 1;
-
- if (ppalSrc->flFlags & PAL_INDEXED)
- {
- pexlo->aulXlate[0] =
- PALETTE_ulGetNearestPaletteIndex(ppalSrc, crSrcBackColor);
- }
- else if (ppalSrc->flFlags & PAL_RGB)
- {
- pexlo->aulXlate[0] = crSrcBackColor;
- }
- else if (ppalSrc->flFlags & PAL_BGR)
- {
- pexlo->aulXlate[0] = RGB(GetBValue(crSrcBackColor),
- GetGValue(crSrcBackColor),
- GetRValue(crSrcBackColor));
- }
- else if (ppalSrc->flFlags & PAL_BITFIELDS)
- {
- PALETTE_vGetBitMasks(ppalSrc, &pexlo->ulRedMask);
- pexlo->ulRedShift = CalculateShift(RGB(0xFF,0,0), pexlo->ulRedMask);
- pexlo->ulGreenShift = CalculateShift(RGB(0,0xFF,0),
pexlo->ulGreenMask);
- pexlo->ulBlueShift = CalculateShift(RGB(0,0,0xFF), pexlo->ulBlueMask);
-
- pexlo->aulXlate[0] = EXLATEOBJ_iXlateShiftAndMask(pexlo, crSrcBackColor);
- }
- }
- else if (ppalSrc->flFlags & PAL_INDEXED)
- {
- cEntries = ppalSrc->NumColors;
-
- /* Allocate buffer if needed */
- if (cEntries > 6)
- {
- pexlo->xlo.pulXlate = EngAllocMem(0,
- cEntries * sizeof(ULONG),
- GDITAG_PXLATE);
- if (!pexlo->xlo.pulXlate)
- {
- DPRINT1("Could not allocate pulXlate buffer.\n");
- pexlo->pfnXlate = EXLATEOBJ_iXlateTrivial;
- pexlo->xlo.flXlate = XO_TRIVIAL;
- return;
- }
- }
-
- pexlo->pfnXlate = EXLATEOBJ_iXlateTable;
- pexlo->xlo.cEntries = cEntries;
- pexlo->xlo.flXlate |= XO_TABLE;
-
- if (ppalDst->flFlags & PAL_INDEXED)
- {
- ULONG cDiff = 0;
-
- for (i = 0; i < cEntries; i++)
- {
- ulColor = RGB(ppalSrc->IndexedColors[i].peRed,
- ppalSrc->IndexedColors[i].peGreen,
- ppalSrc->IndexedColors[i].peBlue);
-
- pexlo->xlo.pulXlate[i] =
- PALETTE_ulGetNearestPaletteIndex(ppalDst, ulColor);
-
- if (pexlo->xlo.pulXlate[i] != i) cDiff++;
- }
-
- /* Check if we have only trivial mappings */
- if (cDiff == 0)
- {
- if (pexlo->xlo.pulXlate != pexlo->aulXlate)
- {
- EngFreeMem(pexlo->xlo.pulXlate);
- pexlo->xlo.pulXlate = pexlo->aulXlate;
- }
- pexlo->pfnXlate = EXLATEOBJ_iXlateTrivial;
- pexlo->xlo.flXlate = XO_TRIVIAL;
- pexlo->xlo.cEntries = 0;
- return;
- }
- }
- else
- {
- for (i = 0; i < pexlo->xlo.cEntries; i++)
- {
- ulColor = RGB(ppalSrc->IndexedColors[i].peRed,
- ppalSrc->IndexedColors[i].peGreen,
- ppalSrc->IndexedColors[i].peBlue);
- pexlo->xlo.pulXlate[i] = PALETTE_ulGetNearestBitFieldsIndex(ppalDst,
ulColor);
- }
- }
- }
- else if (ppalSrc->flFlags & PAL_RGB)
- {
- if (ppalDst->flFlags & PAL_INDEXED)
- pexlo->pfnXlate = EXLATEOBJ_iXlateRGBtoPal;
-
- else if (ppalDst->flFlags & PAL_BGR)
- pexlo->pfnXlate = EXLATEOBJ_iXlateRGBtoBGR;
-
- else if (ppalDst->flFlags & PAL_RGB16_555)
- pexlo->pfnXlate = EXLATEOBJ_iXlateRGBto555;
-
- else if (ppalDst->flFlags & PAL_RGB16_565)
- pexlo->pfnXlate = EXLATEOBJ_iXlateRGBto565;
-
- else if (ppalDst->flFlags & PAL_BITFIELDS)
- pexlo->pfnXlate = EXLATEOBJ_iXlateShiftAndMask;
- }
- else if (ppalSrc->flFlags & PAL_BGR)
- {
- if (ppalDst->flFlags & PAL_INDEXED)
- pexlo->pfnXlate = EXLATEOBJ_iXlateBitfieldsToPal;
-
- else if (ppalDst->flFlags & PAL_RGB)
- /* The inverse function works the same */
- pexlo->pfnXlate = EXLATEOBJ_iXlateRGBtoBGR;
-
- else if (ppalDst->flFlags & PAL_RGB16_555)
- pexlo->pfnXlate = EXLATEOBJ_iXlateBGRto555;
-
- else if (ppalDst->flFlags & PAL_RGB16_565)
- pexlo->pfnXlate = EXLATEOBJ_iXlateBGRto565;
-
- else if (ppalDst->flFlags & PAL_BITFIELDS)
- pexlo->pfnXlate = EXLATEOBJ_iXlateShiftAndMask;
- }
- else if (ppalSrc->flFlags & PAL_RGB16_555)
- {
- if (ppalDst->flFlags & PAL_INDEXED)
- pexlo->pfnXlate = EXLATEOBJ_iXlate555toPal;
-
- else if (ppalDst->flFlags & PAL_RGB)
- pexlo->pfnXlate = EXLATEOBJ_iXlate555toRGB;
-
- else if (ppalDst->flFlags & PAL_BGR)
- pexlo->pfnXlate = EXLATEOBJ_iXlate555toBGR;
-
- else if (ppalDst->flFlags & PAL_RGB16_565)
- pexlo->pfnXlate = EXLATEOBJ_iXlate555to565;
-
- else if (ppalDst->flFlags & PAL_BITFIELDS)
- pexlo->pfnXlate = EXLATEOBJ_iXlateShiftAndMask;
- }
- else if (ppalSrc->flFlags & PAL_RGB16_565)
- {
- if (ppalDst->flFlags & PAL_INDEXED)
- pexlo->pfnXlate = EXLATEOBJ_iXlate565toPal;
-
- else if (ppalDst->flFlags & PAL_RGB)
- pexlo->pfnXlate = EXLATEOBJ_iXlate565toRGB;
-
- else if (ppalDst->flFlags & PAL_BGR)
- pexlo->pfnXlate = EXLATEOBJ_iXlate565toBGR;
-
- else if (ppalDst->flFlags & PAL_RGB16_555)
- pexlo->pfnXlate = EXLATEOBJ_iXlate565to555;
-
- else if (ppalDst->flFlags & PAL_BITFIELDS)
- pexlo->pfnXlate = EXLATEOBJ_iXlateShiftAndMask;
- }
- else if (ppalSrc->flFlags & PAL_BITFIELDS)
- {
- if (ppalDst->flFlags & PAL_INDEXED)
- pexlo->pfnXlate = EXLATEOBJ_iXlateBitfieldsToPal;
- else
- pexlo->pfnXlate = EXLATEOBJ_iXlateShiftAndMask;
- }
-
- /* Check for a trivial shift and mask operation */
- if (pexlo->pfnXlate == EXLATEOBJ_iXlateShiftAndMask &&
- !pexlo->ulRedShift && !pexlo->ulGreenShift &&
!pexlo->ulBlueShift)
- {
- pexlo->pfnXlate = EXLATEOBJ_iXlateTrivial;
- }
-
- /* Check for trivial xlate */
- if (pexlo->pfnXlate == EXLATEOBJ_iXlateTrivial)
- pexlo->xlo.flXlate = XO_TRIVIAL;
- else
- pexlo->xlo.flXlate &= ~XO_TRIVIAL;
-}
-
-VOID
-NTAPI
-EXLATEOBJ_vInitXlateFromDCs(
- EXLATEOBJ* pexlo,
- PDC pdcSrc,
- PDC pdcDst)
-{
- PSURFACE psurfDst, psurfSrc;
-
- psurfDst = pdcDst->dclevel.pSurface;
- psurfSrc = pdcSrc->dclevel.pSurface;
-
- /* Normal initialisation. No surface means DEFAULT_BITMAP */
- EXLATEOBJ_vInitialize(pexlo,
- psurfSrc ? psurfSrc->ppal : gppalMono,
- psurfDst ? psurfDst->ppal : gppalMono,
- pdcSrc->pdcattr->crBackgroundClr,
- pdcDst->pdcattr->crBackgroundClr,
- pdcDst->pdcattr->crForegroundClr);
-
- pexlo->ppalDstDc = pdcDst->dclevel.ppal;
-}
-
-VOID
-NTAPI
-EXLATEOBJ_vCleanup(PEXLATEOBJ pexlo)
-{
- if (pexlo->xlo.pulXlate != pexlo->aulXlate)
- {
- EngFreeMem(pexlo->xlo.pulXlate);
- }
- pexlo->xlo.pulXlate = pexlo->aulXlate;
-}
-
-/** Public DDI Functions ******************************************************/
-
-#undef XLATEOBJ_iXlate
-ULONG
-NTAPI
-XLATEOBJ_iXlate(XLATEOBJ *pxlo, ULONG iColor)
-{
- PEXLATEOBJ pexlo = (PEXLATEOBJ)pxlo;
-
- if (!pxlo)
- return iColor;
-
- /* Call the iXlate function */
- return pexlo->pfnXlate(pexlo, iColor);
-}
-
-ULONG
-NTAPI
-XLATEOBJ_cGetPalette(XLATEOBJ *pxlo, ULONG iPal, ULONG cPal, ULONG *pPalOut)
-{
- PEXLATEOBJ pexlo = (PEXLATEOBJ)pxlo;
- PPALETTE ppal;
- ULONG i;
-
- if (!pxlo)
- {
- return 0;
- }
-
- if (iPal > 5)
- {
- DPRINT1("XLATEOBJ_cGetPalette called with wrong iPal: %d\n", iPal);
- return 0;
- }
-
- /* Get the requested palette */
- if (iPal == XO_DESTDCPALETTE)
- {
- ppal = pexlo->ppalDstDc;
- }
- else if (iPal == XO_SRCPALETTE || iPal == XO_SRCBITFIELDS)
- {
- ppal = pexlo->ppalSrc;
- }
- else
- {
- ppal = pexlo->ppalDst;
- }
-
- /* Verify palette type match */
- if (!ppal ||
- ((iPal == XO_SRCPALETTE || iPal == XO_DESTPALETTE)
- && !(ppal->flFlags & PAL_INDEXED)) ||
- ((iPal == XO_SRCBITFIELDS || iPal == XO_DESTBITFIELDS)
- && !(ppal->flFlags & PAL_BITFIELDS)))
- {
- return 0;
- }
-
- if(!pPalOut)
- {
- return ppal->NumColors;
- }
-
- /* Copy the values into the buffer */
- if (ppal->flFlags & PAL_INDEXED)
- {
- cPal = min(cPal, ppal->NumColors);
- for (i = 0; i < cPal; i++)
- {
- pPalOut[i] = RGB(ppal->IndexedColors[i].peRed,
- ppal->IndexedColors[i].peGreen,
- ppal->IndexedColors[i].peBlue);
- }
- }
- else
- {
- // FIXME: should use the above code
- pPalOut[0] = ppal->RedMask;
- pPalOut[1] = ppal->GreenMask;
- pPalOut[2] = ppal->BlueMask;
- }
-
- return cPal;
-}
-
-HANDLE
-NTAPI
-XLATEOBJ_hGetColorTransform(XLATEOBJ *pxlo)
-{
- PEXLATEOBJ pexlo = (PEXLATEOBJ)pxlo;
- return pexlo->hColorTransform;
-}
-
-PULONG
-NTAPI
-XLATEOBJ_piVector(XLATEOBJ *pxlo)
-{
- if (pxlo->iSrcType == PAL_INDEXED)
- {
- return pxlo->pulXlate;
- }
-
- return NULL;
-}
-
-/* EOF */
Modified: trunk/reactos/win32ss/gdi/ntgdi/coord.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/coord.h?…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/coord.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/coord.h [iso-8859-1] Sun Jul 29 11:20:05 2012
@@ -141,14 +141,6 @@
XFORMOBJ_bApplyXform(&xo, XF_LTOL, cNumPoints, pptlDest, pptlSource);
}
-int APIENTRY IntGdiSetMapMode(PDC, int);
-
-BOOL NTAPI
-IntGdiCombineTransform(
- XFORML *pxformDest,
- XFORML *pxform1,
- XFORML *pxform2);
-
BOOL
NTAPI
GreModifyWorldTransform(
@@ -157,6 +149,5 @@
DWORD dwMode);
VOID FASTCALL IntMirrorWindowOrg(PDC);
-void FASTCALL IntFixIsotropicMapping(PDC);
-LONG FASTCALL IntCalcFillOrigin(PDC);
+int APIENTRY IntGdiSetMapMode(PDC, int);
Modified: trunk/reactos/win32ss/gdi/ntgdi/dc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dc.h?rev…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/dc.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/dc.h [iso-8859-1] Sun Jul 29 11:20:05 2012
@@ -7,34 +7,40 @@
#define DCB_WINDOWMGR 0x8000 /* Queries the Windows bounding rectangle instead of the
application's */
/* flFontState */
-#define DC_DIRTYFONT_XFORM 1
-#define DC_DIRTYFONT_LFONT 2
-#define DC_UFI_MAPPING 4
+enum _FONT_STATE
+{
+ DC_DIRTYFONT_XFORM = 1,
+ DC_DIRTYFONT_LFONT = 2,
+ DC_UFI_MAPPING = 4
+};
/* fl */
#define DC_FL_PAL_BACK 1
-#define DC_DISPLAY 1
-#define DC_DIRECT 2
-#define DC_CANCELED 4
-#define DC_PERMANANT 0x08
-#define DC_DIRTY_RAO 0x10
-#define DC_ACCUM_WMGR 0x20
-#define DC_ACCUM_APP 0x40
-#define DC_RESET 0x80
-#define DC_SYNCHRONIZEACCESS 0x100
-#define DC_EPSPRINTINGESCAPE 0x200
-#define DC_TEMPINFODC 0x400
-#define DC_FULLSCREEN 0x800
-#define DC_IN_CLONEPDEV 0x1000
-#define DC_REDIRECTION 0x2000
-#define DC_SHAREACCESS 0x4000
-
-typedef enum
-{
- DCTYPE_DIRECT = 0,
- DCTYPE_MEMORY = 1,
- DCTYPE_INFO = 2,
+enum _DCFLAGS
+{
+ DC_DISPLAY = 0x0001,
+ DC_DIRECT = 0x0002,
+ DC_CANCELED = 0x0004,
+ DC_PERMANANT = 0x0008,
+ DC_DIRTY_RAO = 0x0010,
+ DC_ACCUM_WMGR = 0x0020,
+ DC_ACCUM_APP = 0x0040,
+ DC_RESET = 0x0080,
+ DC_SYNCHRONIZEACCESS = 0x0100,
+ DC_EPSPRINTINGESCAPE = 0x0200,
+ DC_TEMPINFODC = 0x0400,
+ DC_FULLSCREEN = 0x0800,
+ DC_IN_CLONEPDEV = 0x1000,
+ DC_REDIRECTION = 0x2000,
+ DC_SHAREACCESS = 0x4000
+};
+
+typedef enum _DCTYPE
+{
+ DCTYPE_DIRECT = 0,
+ DCTYPE_MEMORY = 1,
+ DCTYPE_INFO = 2,
} DCTYPE;
Modified: trunk/reactos/win32ss/gdi/ntgdi/device.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/device.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/device.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/device.c [iso-8859-1] Sun Jul 29 11:20:05 2012
@@ -34,11 +34,11 @@
/* Attach monitor */
UserAttachMonitor((HDEV)gppdevPrimary);
- DPRINT("IntCreatePrimarySurface, pPrimarySurface=%p,
pPrimarySurface->pSurface = %p\n",
- pPrimarySurface, pPrimarySurface->pSurface);
+ DPRINT("IntCreatePrimarySurface, gppdevPrimary=%p, gppdevPrimary->pSurface =
%p\n",
+ gppdevPrimary, gppdevPrimary->pSurface);
/* Create surface */
- pso = &PDEVOBJ_pSurface(pPrimarySurface)->SurfObj;
+ pso = &PDEVOBJ_pSurface(gppdevPrimary)->SurfObj;
SurfSize = pso->sizlBitmap;
/* Put the pointer in the center of the screen */
@@ -48,7 +48,7 @@
co_IntShowDesktop(IntGetActiveDesktop(), SurfSize.cx, SurfSize.cy);
// Init Primary Displays Device Capabilities.
- PDEVOBJ_vGetDeviceCaps(pPrimarySurface, &GdiHandleTable->DevCaps);
+ PDEVOBJ_vGetDeviceCaps(gppdevPrimary, &GdiHandleTable->DevCaps);
return TRUE;
}
@@ -64,7 +64,7 @@
{
// I guess we will soon have more than one primary surface.
// This will do for now.
- return pPrimarySurface;
+ return gppdevPrimary;
}
Modified: trunk/reactos/win32ss/gdi/ntgdi/gdiobj.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/gdiobj.h…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/gdiobj.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/gdiobj.h [iso-8859-1] Sun Jul 29 11:20:05 2012
@@ -6,7 +6,7 @@
#pragma once
/* The first 10 entries are never used in windows, they are empty */
-#define RESERVE_ENTRIES_COUNT 10
+static const unsigned RESERVE_ENTRIES_COUNT = 10;
typedef struct _GDI_HANDLE_TABLE
{
@@ -57,12 +57,15 @@
typedef struct _CLIENTOBJ
{
- BASEOBJECT BaseObject;
+ BASEOBJECT BaseObject;
} CLIENTOBJ, *PCLIENTOBJ;
-#define GDIOBJFLAG_DEFAULT (0x0)
-#define GDIOBJFLAG_IGNOREPID (0x1)
-#define GDIOBJFLAG_IGNORELOCK (0x2)
+enum _GDIOBJLAGS
+{
+ GDIOBJFLAG_DEFAULT = 0x00,
+ GDIOBJFLAG_IGNOREPID = 0x01,
+ GDIOBJFLAG_IGNORELOCK = 0x02
+};
INIT_FUNCTION
NTSTATUS
Modified: trunk/reactos/win32ss/gdi/ntgdi/palette.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/palette.…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/palette.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/palette.h [iso-8859-1] Sun Jul 29 11:20:05 2012
@@ -1,26 +1,29 @@
#pragma once
// Palette mode flags
-#ifndef __WINDDI_H // Defined in ddk/winddi.h
-#define PAL_INDEXED 0x00000001 // Indexed palette
-#define PAL_BITFIELDS 0x00000002 // Bit fields used for DIB, DIB section
-#define PAL_RGB 0x00000004 // Red, green, blue
-#define PAL_BGR 0x00000008 // Blue, green, red
-#define PAL_CMYK 0x00000010 // Cyan, magenta, yellow, black
+enum _PALFLAGS
+{
+#ifndef _WINDDI_ // Defined in ddk/winddi.h
+ PAL_INDEXED = 0x00000001, // Indexed palette
+ PAL_BITFIELDS = 0x00000002, // Bit fields used for DIB, DIB section
+ PAL_RGB = 0x00000004, // Red, green, blue
+ PAL_BGR = 0x00000008, // Blue, green, red
+ PAL_CMYK = 0x00000010, // Cyan, magenta, yellow, black
#endif
-#define PAL_DC 0x00000100
-#define PAL_FIXED 0x00000200 // Can't be changed
-#define PAL_FREE 0x00000400
-#define PAL_MANAGED 0x00000800
-#define PAL_NOSTATIC 0x00001000
-#define PAL_MONOCHROME 0x00002000 // Two colors only
-#define PAL_BRUSHHACK 0x00004000
-#define PAL_DIBSECTION 0x00008000 // Used for a DIB section
-#define PAL_NOSTATIC256 0x00010000
-#define PAL_HT 0x00100000 // Halftone palette
-#define PAL_RGB16_555 0x00200000 // 16-bit RGB in 555 format
-#define PAL_RGB16_565 0x00400000 // 16-bit RGB in 565 format
-#define PAL_GAMMACORRECTION 0x00800000 // Correct colors
+ PAL_DC = 0x00000100,
+ PAL_FIXED = 0x00000200, // Can't be changed
+ PAL_FREE = 0x00000400,
+ PAL_MANAGED = 0x00000800,
+ PAL_NOSTATIC = 0x00001000,
+ PAL_MONOCHROME = 0x00002000, // Two colors only
+ PAL_BRUSHHACK = 0x00004000,
+ PAL_DIBSECTION = 0x00008000, // Used for a DIB section
+ PAL_NOSTATIC256 = 0x00010000,
+ PAL_HT = 0x00100000, // Halftone palette
+ PAL_RGB16_555 = 0x00200000, // 16-bit RGB in 555 format
+ PAL_RGB16_565 = 0x00400000, // 16-bit RGB in 565 format
+ PAL_GAMMACORRECTION = 0x00800000, // Correct colors
+};
typedef struct _PALETTE
{
Modified: trunk/reactos/win32ss/gdi/ntgdi/path.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/path.h?r…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/path.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/path.h [iso-8859-1] Sun Jul 29 11:20:05 2012
@@ -1,11 +1,15 @@
#pragma once
- /* DCPATH flPath */
-#define DCPATH_ACTIVE 0x0001
-#define DCPATH_SAVE 0x0002
-#define DCPATH_CLOCKWISE 0x0004
-// ReactOS only
-#define DCPATH_SAVESTATE 0x80000000
+/* DCPATH flPath */
+enum _DCPATHFLAGS
+{
+ DCPATH_ACTIVE = 0x0001,
+ DCPATH_SAVE = 0x0002,
+ DCPATH_CLOCKWISE = 0x0004,
+
+ /* ReactOS only */
+ DCPATH_SAVESTATE = 0x80000000
+};
typedef HGDIOBJ HPATH, *PHPATH;
Modified: trunk/reactos/win32ss/user/ntuser/metric.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/metric…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/metric.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/metric.c [iso-8859-1] Sun Jul 29 11:20:05 2012
@@ -34,15 +34,15 @@
}
/* FIXME: HACK, due to missing PDEV on first init */
- if (!pPrimarySurface)
+ if (!gppdevPrimary)
{
Width = 640;
Height = 480;
}
else
{
- Width = pPrimarySurface->gdiinfo.ulHorzRes;
- Height = pPrimarySurface->gdiinfo.ulVertRes;
+ Width = gppdevPrimary->gdiinfo.ulHorzRes;
+ Height = gppdevPrimary->gdiinfo.ulVertRes;
}
/* Screen sizes */