Author: tkreuzer
Date: Tue Feb 19 02:05:41 2008
New Revision: 32419
URL:
http://svn.reactos.org/svn/reactos?rev=32419&view=rev
Log:
some cleanup
- move NtGdiFlushUserBatch prototype to ntgdi.h
- move pool tags from ntgdihdl.h to win32k/tags.h
- move DC struct from ntgdihdl.h to win32k/dc.h
- replace GDIEMPTYHDR with BASEOBJECT
- use BASEOBJECT in DC and GDIDEVICE structures
- rename some NtGdiXxx functions that don't deserve that name and remove some that
were defined by a macro, but don't exist on windows (#if 0'ed atm)
- remove RetrieveDisplayHDC() prototype (doesn't exist)
Modified:
trunk/reactos/include/psdk/ntgdi.h
trunk/reactos/include/reactos/win32k/ntgdihdl.h
trunk/reactos/subsystems/win32/win32k/include/dc.h
trunk/reactos/subsystems/win32/win32k/include/gdiobj.h
trunk/reactos/subsystems/win32/win32k/include/tags.h
trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c
trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c
trunk/reactos/subsystems/win32/win32k/ntuser/painting.c
trunk/reactos/subsystems/win32/win32k/objects/arc.c
trunk/reactos/subsystems/win32/win32k/objects/dc.c
trunk/reactos/subsystems/win32/win32k/objects/dcutil.c
trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c
Modified: trunk/reactos/include/psdk/ntgdi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntgdi.h?rev=3…
==============================================================================
--- trunk/reactos/include/psdk/ntgdi.h (original)
+++ trunk/reactos/include/psdk/ntgdi.h Tue Feb 19 02:05:41 2008
@@ -1696,6 +1696,11 @@
);
W32KAPI
+NTSTATUS
+APIENTRY
+NtGdiFlushUserBatch(VOID);
+
+W32KAPI
HRGN
APIENTRY
NtGdiPathToRegion(
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 Tue Feb 19 02:05:41 2008
@@ -40,21 +40,6 @@
#define GDI_ENTRY_FLAGS_MASK 0xff000000
#define GDI_ENTRY_REUSECNT_SHIFT 8
#define GDI_ENTRY_UPPER_SHIFT 16
-
-#define GDI_OBJECT_TAG_DC TAG('G', 'l', 'a', '1')
-#define GDI_OBJECT_TAG_REGION TAG('G', 'l', 'a', '4')
-#define GDI_OBJECT_TAG_BITMAP TAG('G', 'l', 'a', '5')
-#define GDI_OBJECT_TAG_CLIOBJ TAG('G', 'h', '0', '6')
-#define GDI_OBJECT_TAG_PATH TAG('G', 'h', '0', '7')
-#define GDI_OBJECT_TAG_PALETTE TAG('G', 'l', 'a', '8')
-#define GDI_OBJECT_TAG_COLSPC TAG('G', 'h', '0', '9')
-#define GDI_OBJECT_TAG_FONT TAG('G', 'l', 'a', ':')
-#define GDI_OBJECT_TAG_PFE TAG('G', 'h', '0',
'<')
-#define GDI_OBJECT_TAG_BRUSH TAG('G', 'l', 'a', '@')
-#define GDI_OBJECT_TAG_ENUMFONT TAG('G', 'h', '0', 'F')
-
-#define GDI_OBJECT_TAG_DDRAW TAG('D', 'h', ' ', '1')
-#define GDI_OBJECT_TAG_DDSURF TAG('D', 'h', ' ', '2')
/*! \defgroup GDI object types
*
@@ -369,41 +354,4 @@
BOOL vport2WorldValid; /* Is xformVport2World valid? */
} WIN_DC_INFO;
-typedef struct _DC
-{
- HGDIOBJ hHmgr; // Handle for this DC object.
- ULONG Count;
- ULONG lucExcLock;
- PVOID Tid;
-
- DHPDEV PDev; // <- GDIDEVICE.hPDev DHPDEV for device.
- INT DC_Type;
- INT DC_Flags;
- PVOID pPDev; // PGDIDEVICE
- PVOID hSem; // PERESOURCE
- FLONG flGraphics;
- FLONG flGraphics2;
- PDC_ATTR pDc_Attr;
- WIN_DC_INFO w;
- DC_ATTR Dc_Attr;
- HDC hNext;
- HDC hPrev;
- RECTL erclClip;
- RECTL erclWindow;
- RECTL erclBounds;
- HRGN hprgnAPI;
- HRGN hprgnVis;
-
- CLIPOBJ *CombinedClip;
- XLATEOBJ *XlateBrush;
- XLATEOBJ *XlatePen;
-
- INT saveLevel; // DCLEVEL lSaveDepth
- HDC hSelf; // DCLEVEL hdcSave Used only for MemoryDC & SaveDC.
-
- HPALETTE PalIndexed;
-
- UNICODE_STRING DriverName;
-} DC, *PDC;
-
#endif
Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/dc.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/dc.h Tue Feb 19 02:05:41 2008
@@ -1,8 +1,9 @@
-
#ifndef __WIN32K_DC_H
#define __WIN32K_DC_H
#include "driver.h"
+
+/* Constants ******************************************************************/
// Get/SetBounds/Rect support.
#define DCB_WINDOWMGR 0x8000 // Queries the Windows bounding rectangle instead of the
application's
@@ -29,7 +30,43 @@
#define PDEV_DRIVER_PUNTED_CALL 0x00040000 // Driver calls back to GDI engine
#define PDEV_CLONE_DEVICE 0x00080000
-// Graphics Device structure.
+/* Type definitions ***********************************************************/
+
+/* The DC object structure */
+typedef struct _DC
+{
+ BASEOBJECT BaseObject;
+
+ DHPDEV PDev; // <- GDIDEVICE.hPDev DHPDEV for device.
+ INT DC_Type;
+ INT DC_Flags;
+ PVOID pPDev; // PGDIDEVICE
+ PVOID hSem; // PERESOURCE
+ FLONG flGraphics;
+ FLONG flGraphics2;
+ PDC_ATTR pDc_Attr;
+ WIN_DC_INFO w;
+ DC_ATTR Dc_Attr;
+ HDC hNext;
+ HDC hPrev;
+ RECTL erclClip;
+ RECTL erclWindow;
+ RECTL erclBounds;
+ HRGN hprgnAPI;
+ HRGN hprgnVis;
+
+ CLIPOBJ *CombinedClip;
+ XLATEOBJ *XlateBrush;
+ XLATEOBJ *XlatePen;
+
+ INT saveLevel; // DCLEVEL lSaveDepth
+ HDC hSelf; // DCLEVEL hdcSave Used only for MemoryDC & SaveDC.
+
+ HPALETTE PalIndexed;
+
+ UNICODE_STRING DriverName;
+} DC, *PDC;
+
typedef struct _GRAPHICS_DEVICE
{
CHAR szNtDeviceName[CCHDEVICENAME]; // Yes char AscII
@@ -59,10 +96,7 @@
typedef struct _GDIDEVICE
{
- HANDLE hHmgr;
- ULONG csCount;
- ULONG lucExcLock;
- PVOID Tid;
+ BASEOBJECT BaseObject;
struct _GDIDEVICE *ppdevNext;
INT cPdevRefs;
@@ -103,7 +137,15 @@
struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl;
} GDIDEVICE, *PGDIDEVICE;
-/* Internal functions */
+/* For Metafile and MetaEnhFile not in windows this struct taken from wine cvs
15/9-2006*/
+typedef struct
+{
+ LPENHMETAHEADER emh;
+ BOOL on_disk; /* true if metafile is on disk */
+} DD_ENHMETAFILEOBJ, *PDD_ENHMETAFILEOBJ;
+
+
+/* Internal functions *********************************************************/
#define DC_LockDc(hDC) \
((PDC) GDIOBJ_LockObj (GdiHandleTable, (HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC))
@@ -111,7 +153,6 @@
GDIOBJ_UnlockObjByPtr (GdiHandleTable, pDC)
NTSTATUS FASTCALL InitDcImpl(VOID);
-HDC FASTCALL RetrieveDisplayHDC(VOID);
PGDIDEVICE FASTCALL IntEnumHDev(VOID);
HDC FASTCALL DC_AllocDC(PUNICODE_STRING Driver);
VOID FASTCALL DC_InitDC(HDC DCToInit);
@@ -141,23 +182,14 @@
VOID FASTCALL IntGetWindowExtEx(PDC dc, LPSIZE pt);
VOID FASTCALL IntGetWindowOrgEx(PDC dc, LPPOINT pt);
-NTSTATUS STDCALL NtGdiFlushUserBatch(VOID);
+COLORREF FASTCALL IntGdiSetBkColor (HDC hDC, COLORREF Color);
+INT FASTCALL IntGdiSetBkMode(HDC hDC, INT backgroundMode);
+COLORREF STDCALL IntGdiGetBkColor(HDC hDC);
+INT STDCALL IntGdiGetBkMode(HDC hDC);
+COLORREF FASTCALL IntGdiSetTextColor(HDC hDC, COLORREF color);
+UINT FASTCALL IntGdiSetTextAlign(HDC hDC, UINT Mode);
+UINT STDCALL IntGdiGetTextAlign(HDC hDC);
+COLORREF STDCALL IntGdiGetTextColor(HDC hDC);
+INT STDCALL IntGdiSetStretchBltMode(HDC hDC, INT stretchBltMode);
-COLORREF FASTCALL NtGdiSetBkColor (HDC hDC, COLORREF Color);
-INT FASTCALL NtGdiSetBkMode(HDC hDC, INT backgroundMode);
-COLORREF STDCALL NtGdiGetBkColor(HDC hDC);
-INT STDCALL NtGdiGetBkMode(HDC hDC);
-COLORREF FASTCALL NtGdiSetTextColor(HDC hDC, COLORREF color);
-UINT FASTCALL NtGdiSetTextAlign(HDC hDC, UINT Mode);
-UINT STDCALL NtGdiGetTextAlign(HDC hDC);
-COLORREF STDCALL NtGdiGetTextColor(HDC hDC);
-INT STDCALL NtGdiSetStretchBltMode(HDC hDC, INT stretchBltMode);
-
-/* For Metafile and MetaEnhFile not in windows this struct taken from wine cvs
15/9-2006*/
-typedef struct
-{
- LPENHMETAHEADER emh;
- BOOL on_disk; /* true if metafile is on disk */
-} DD_ENHMETAFILEOBJ, *PDD_ENHMETAFILEOBJ;
-
-#endif /* __WIN32K_DC_H */
+#endif /* not __WIN32K_DC_H */
Modified: trunk/reactos/subsystems/win32/win32k/include/gdiobj.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/gdiobj.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/gdiobj.h Tue Feb 19 02:05:41 2008
@@ -36,7 +36,7 @@
typedef BOOL (INTERNAL_CALL *GDICLEANUPPROC)(PVOID ObjectBody);
/*!
- * GDI object header. This is a part of any GDI object
+ * GDI object header. This is a part of any GDI object. ROS specific header!
*/
typedef struct _GDIOBJHDR
{
@@ -55,13 +55,14 @@
// It's for thread locking.
// This header is standalone, used only in gdiobj.c.
//
-typedef struct _GDIOBJEMPTYHDR
+typedef struct _BASEOBJECT
{
HGDIOBJ hHmgr;
- ULONG Count;
- ULONG lucExcLock;
+ ULONG ulShareCount;
+ USHORT cExclusiveLock;
+ USHORT BaseFlags;
PW32THREAD Tid;
-} GDIOBJEMPTYHDR, *PGDIOBJEMPTYHDR;
+} BASEOBJECT, *POBJ;
BOOL INTERNAL_CALL GDIOBJ_OwnedByCurrentProcess(PGDI_HANDLE_TABLE HandleTable, HGDIOBJ
ObjectHandle);
void INTERNAL_CALL GDIOBJ_SetOwnership(PGDI_HANDLE_TABLE HandleTable, HGDIOBJ
ObjectHandle, PEPROCESS Owner);
Modified: trunk/reactos/subsystems/win32/win32k/include/tags.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/tags.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/tags.h Tue Feb 19 02:05:41 2008
@@ -1,72 +1,97 @@
#ifndef _WIN32K_TAGS_H
#define _WIN32K_TAGS_H
-#define TAG_STRING TAG('S', 'T', 'R', ' ') /* string */
+#define TAG_STRING TAG('S', 'T', 'R', ' ') /* string
*/
/* ntuser */
-#define TAG_MOUSE TAG('M', 'O', 'U', 'S') /* mouse */
-#define TAG_KEYBOARD TAG('K', 'B', 'D', ' ') /* keyboard
*/
-#define TAG_ACCEL TAG('A', 'C', 'C', 'L') /* accelerator
*/
-#define TAG_HOOK TAG('W', 'N', 'H', 'K') /* hook */
-#define TAG_HOTKEY TAG('H', 'O', 'T', 'K') /* hotkey */
-#define TAG_MENUITEM TAG('M', 'E', 'N', 'I') /* menu item
*/
-#define TAG_MSG TAG('M', 'E', 'S', 'G') /* message */
-#define TAG_MSGQ TAG('M', 'S', 'G', 'Q') /* message queue
*/
-#define TAG_USRMSG TAG('U', 'M', 'S', 'G') /* user
message */
-#define TAG_WNDPROP TAG('W', 'P', 'R', 'P') /* window
property */
-#define TAG_WNAM TAG('W', 'N', 'A', 'M') /* window name
*/
-#define TAG_WINLIST TAG('W', 'N', 'L', 'S') /* window
handle list */
-#define TAG_WININTLIST TAG('W', 'N', 'I', 'P') /* window
internal pos */
-#define TAG_WINPROCLST TAG('W', 'N', 'P', 'L') /* window
proc list */
-#define TAG_SBARINFO TAG('S', 'B', 'I', 'N') /* scrollbar
info */
-#define TAG_TIMER TAG('T', 'I', 'M', 'R') /* timer entry
*/
-#define TAG_TIMERTD TAG('T', 'I', 'M', 'T') /* timer
thread dereference list */
-#define TAG_TIMERBMP TAG('T', 'I', 'M', 'B') /* timers
bitmap */
-#define TAG_CALLBACK TAG('C', 'B', 'C', 'K') /* callback
memory */
-#define TAG_WINSTA TAG('W', 'S', 'T', 'A') /* window
station */
-#define TAG_PDCE TAG('U', 's', 'd', 'c') /* dce */
+#define TAG_MOUSE TAG('M', 'O', 'U', 'S') /* mouse
*/
+#define TAG_KEYBOARD TAG('K', 'B', 'D', ' ') /*
keyboard */
+#define TAG_ACCEL TAG('A', 'C', 'C', 'L') /*
accelerator */
+#define TAG_HOOK TAG('W', 'N', 'H', 'K') /* hook
*/
+#define TAG_HOTKEY TAG('H', 'O', 'T', 'K') /* hotkey
*/
+#define TAG_MENUITEM TAG('M', 'E', 'N', 'I') /* menu
item */
+#define TAG_MSG TAG('M', 'E', 'S', 'G') /*
message */
+#define TAG_MSGQ TAG('M', 'S', 'G', 'Q') /*
message queue */
+#define TAG_USRMSG TAG('U', 'M', 'S', 'G') /* user
message */
+#define TAG_WNDPROP TAG('W', 'P', 'R', 'P') /* window
property */
+#define TAG_WNAM TAG('W', 'N', 'A', 'M') /* window
name */
+#define TAG_WINLIST TAG('W', 'N', 'L', 'S') /* window
handle list */
+#define TAG_WININTLIST TAG('W', 'N', 'I', 'P') /* window
internal pos */
+#define TAG_WINPROCLST TAG('W', 'N', 'P', 'L') /* window
proc list */
+#define TAG_SBARINFO TAG('S', 'B', 'I', 'N') /*
scrollbar info */
+#define TAG_TIMER TAG('T', 'I', 'M', 'R') /* timer
entry */
+#define TAG_TIMERTD TAG('T', 'I', 'M', 'T') /* timer
thread dereference list */
+#define TAG_TIMERBMP TAG('T', 'I', 'M', 'B') /* timers
bitmap */
+#define TAG_CALLBACK TAG('C', 'B', 'C', 'K') /*
callback memory */
+#define TAG_WINSTA TAG('W', 'S', 'T', 'A') /* window
station */
+#define TAG_PDCE TAG('U', 's', 'd', 'c') /* dce
*/
-/* objects */
-#define TAG_BEZIER TAG('B', 'E', 'Z', 'R') /* bezier */
-#define TAG_BITMAP TAG('B', 'T', 'M', 'P') /* bitmap */
-#define TAG_PATBLT TAG('P', 'B', 'L', 'T') /* patblt */
-#define TAG_CLIP TAG('C', 'L', 'I', 'P') /* clipping */
-#define TAG_COORD TAG('C', 'O', 'R', 'D') /* coords */
-#define TAG_DC TAG('D', 'C', 'D', 'C') /* dc */
-#define TAG_GDIDEV TAG('G', 'd', 'e', 'v') /* gdi dev
support*/
-#define TAG_GDIPDEV TAG('G', 'D', 'e', 'v') /* gdi PDev
*/
-#define TAG_GDIOBJ TAG('G', 'D', 'I', 'O') /* gdi obj */
-#define TAG_GDIHNDTBLE TAG('G', 'D', 'I', 'H') /* gdi
handle table */
-#define TAG_GDIICM TAG('G', 'i', 'c', 'm') /* gdi Icm */
-#define TAG_DIB TAG('D', 'I', 'B', ' ') /* dib */
-#define TAG_COLORMAP TAG('C', 'O', 'L', 'M') /* color map
*/
-#define TAG_SHAPE TAG('S', 'H', 'A', 'P') /* shape */
-#define TAG_PALETTE TAG('P', 'A', 'L', 'E') /* palette
*/
-#define TAG_PALETTEMAP TAG('P', 'A', 'L', 'M') /* palette
mapping */
-#define TAG_PATH TAG('P', 'A', 'T', 'H') /* path */
-#define TAG_PRINT TAG('P', 'R', 'N', 'T') /* print */
-#define TAG_REGION TAG('R', 'G', 'N', 'O') /* region */
-#define TAG_GDITEXT TAG('T', 'X', 'T', 'O') /* text */
-#define TAG_EXTPEN TAG('X', 'P', 'E', 'N') /* extpen */
+/* gdi objects from the handle table */
+#define TAG_DC TAG('G', 'l', 'a', '1') /* dc */
+#define TAG_REGION TAG('G', 'l', 'a', '4') /* region
*/
+#define TAG_SURFACE TAG('G', 'l', 'a', '5') /* bitmap
*/
+#define TAG_CLIENTOBJ TAG('G', 'h', '0', '6')
+#define TAG_PATH TAG('G', 'h', '0', '7')
+#define TAG_PALETTE TAG('G', 'l', 'a', '8')
+#define TAG_ICMLCS TAG('G', 'h', '0', '9')
+#define TAG_LFONT TAG('G', 'l', 'a', ':')
+#define TAG_RFONT TAG('G', 'h', '0', ';') /*
correct? */
+#define TAG_PFE TAG('G', 'h', '0', '<')
+#define TAG_PFT TAG('G', 'h', '0', '=') /*
correct? */
+#define TAG_ICMCXF TAG('G', 'h', '0', '>') /*
correct? */
+#define TAG_SPRITE TAG('G', 'h', '0', '?') /*
correct? */
+#define TAG_BRUSH TAG('G', 'l', 'a', '@')
+#define TAG_UMPD TAG('G', 'h', '0', 'A') /*
correct? */
+#define TAG_SPACE TAG('G', 'h', '0', 'C') /*
correct? */
+#define TAG_META TAG('G', 'h', '0', 'E') /*
correct? */
+#define TAG_EFSTATE TAG('G', 'h', '0', 'F') /*
correct? */
+#define TAG_BMFD TAG('G', 'h', '0', 'G') /*
correct? */
+#define TAG_VTFD TAG('G', 'h', '0', 'H') /*
correct? */
+#define TAG_TTFD TAG('G', 'h', '0', 'I') /*
correct? */
+#define TAG_RC TAG('G', 'h', '0', 'J') /*
correct? */
+#define TAG_TEMP TAG('G', 'h', '0', 'K') /*
correct? */
+#define TAG_DRVOBJ TAG('G', 'h', '0', 'L') /*
correct? */
+#define TAG_DCIOBJ TAG('G', 'h', '0', 'M') /*
correct? */
+#define TAG_SPOOL TAG('G', 'h', '0', 'N') /*
correct? */
+
+/* other gdi objects */
+#define TAG_BEZIER TAG('B', 'E', 'Z', 'R') /* bezier
*/
+#define TAG_BITMAP TAG('B', 'T', 'M', 'P') /* bitmap
*/
+#define TAG_PATBLT TAG('P', 'B', 'L', 'T') /* patblt
*/
+#define TAG_CLIP TAG('C', 'L', 'I', 'P') /*
clipping */
+#define TAG_COORD TAG('C', 'O', 'R', 'D') /* coords
*/
+#define TAG_GDIDEV TAG('G', 'd', 'e', 'v') /* gdi
dev support*/
+#define TAG_GDIPDEV TAG('G', 'D', 'e', 'v') /* gdi
PDev */
+#define TAG_GDIOBJ TAG('G', 'D', 'I', 'O') /* gdi
obj */
+#define TAG_GDIHNDTBLE TAG('G', 'D', 'I', 'H') /* gdi
handle table */
+#define TAG_GDIICM TAG('G', 'i', 'c', 'm') /* gdi
Icm */
+#define TAG_DIB TAG('D', 'I', 'B', ' ') /* dib
*/
+#define TAG_COLORMAP TAG('C', 'O', 'L', 'M') /* color
map */
+#define TAG_SHAPE TAG('S', 'H', 'A', 'P') /* shape
*/
+#define TAG_PALETTEMAP TAG('P', 'A', 'L', 'M') /*
palette mapping */
+#define TAG_PRINT TAG('P', 'R', 'N', 'T') /* print
*/
+#define TAG_GDITEXT TAG('T', 'X', 'T', 'O') /* text
*/
+#define TAG_EXTPEN TAG('X', 'P', 'E', 'N') /* extpen
*/
/* Eng objects */
-#define TAG_CLIPOBJ TAG('C', 'L', 'P', 'O') /* clip
object */
-#define TAG_DRIVEROBJ TAG('D', 'R', 'V', 'O') /* driver
object */
-#define TAG_FONT TAG('F', 'N', 'T', 'E') /* font entry
*/
-#define TAG_FONTOBJ TAG('F', 'N', 'T', 'O') /* font
object */
-#define TAG_WNDOBJ TAG('W', 'N', 'D', 'O') /* window
object */
-#define TAG_XLATEOBJ TAG('X', 'L', 'A', 'O') /* xlate
object */
-#define TAG_BITMAPOBJ TAG('B', 'M', 'P', 'O') /* bitmap
object */
+#define TAG_CLIPOBJ TAG('C', 'L', 'P', 'O') /* clip
object */
+#define TAG_DRIVEROBJ TAG('D', 'R', 'V', 'O') /* driver
object */
+#define TAG_FONT TAG('F', 'N', 'T', 'E') /* font
entry */
+#define TAG_FONTOBJ TAG('F', 'N', 'T', 'O') /* font
object */
+#define TAG_WNDOBJ TAG('W', 'N', 'D', 'O') /* window
object */
+#define TAG_XLATEOBJ TAG('X', 'L', 'A', 'O') /* xlate
object */
+#define TAG_BITMAPOBJ TAG('B', 'M', 'P', 'O') /* bitmap
object */
/* misc */
-#define TAG_DRIVER TAG('G', 'D', 'R', 'V') /* video
drivers */
-#define TAG_FNTFILE TAG('F', 'N', 'T', 'F') /* font file
*/
+#define TAG_DRIVER TAG('G', 'D', 'R', 'V') /* video
drivers */
+#define TAG_FNTFILE TAG('F', 'N', 'T', 'F') /* font
file */
#define TAG_SSECTPOOL TAG('S', 'S', 'C', 'P') /* shared
section pool */
-
/* Dx internal tags rember I do not known if it right namees */
-#define TAG_DXPVMLIST TAG('D', 'X', 'P', 'L') /* pmvlist
for the driver */
-#define TAG_DXFOURCC TAG('D', 'X', 'F', 'O') /* pdwFourCC
for the driver */
+#define TAG_DXPVMLIST TAG('D', 'X', 'P', 'L') /*
pmvlist for the driver */
+#define TAG_DXFOURCC TAG('D', 'X', 'F', 'O') /*
pdwFourCC for the driver */
+#define TAG_DDRAW TAG('D', 'h', ' ', '1')
+#define TAG_DDSURF TAG('D', 'h', ' ', '2')
#endif /* _WIN32K_TAGS_H */
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c Tue Feb 19 02:05:41 2008
@@ -1622,10 +1622,10 @@
goto cleanup;
}
- nStretchMode = NtGdiSetStretchBltMode(hdcOff, STRETCH_DELETESCANS);
-
- oldFg = NtGdiSetTextColor(hdcOff, RGB(0, 0, 0));
- oldBg = NtGdiSetBkColor(hdcOff, RGB(255, 255, 255));
+ nStretchMode = IntGdiSetStretchBltMode(hdcOff, STRETCH_DELETESCANS);
+
+ oldFg = IntGdiSetTextColor(hdcOff, RGB(0, 0, 0));
+ oldBg = IntGdiSetBkColor(hdcOff, RGB(255, 255, 255));
if (diFlags & DI_MASK)
{
@@ -1737,9 +1737,9 @@
cyHeight, hdcOff, 0, 0, SRCCOPY, 0, 0);
}
- NtGdiSetTextColor(hdcOff, oldFg);
- NtGdiSetBkColor(hdcOff, oldBg);
- NtGdiSetStretchBltMode(hdcOff, nStretchMode);
+ IntGdiSetTextColor(hdcOff, oldFg);
+ IntGdiSetBkColor(hdcOff, oldBg);
+ IntGdiSetStretchBltMode(hdcOff, nStretchMode);
Ret = TRUE;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c Tue Feb 19 02:05:41 2008
@@ -1505,15 +1505,15 @@
rect.bottom = UserGetSystemMetrics(SM_CYSCREEN);
}
- color_old = NtGdiSetTextColor(hDC, RGB(255,255,255));
- align_old = NtGdiSetTextAlign(hDC, TA_RIGHT);
- mode_old = NtGdiSetBkMode(hDC, TRANSPARENT);
+ color_old = IntGdiSetTextColor(hDC, RGB(255,255,255));
+ align_old = IntGdiSetTextAlign(hDC, TA_RIGHT);
+ mode_old = IntGdiSetBkMode(hDC, TRANSPARENT);
NtGdiExtTextOutW(hDC, rect.right-16, rect.bottom-48, 0, NULL, s_wszVersion, len,
NULL, 0);
- NtGdiSetBkMode(hDC, mode_old);
- NtGdiSetTextAlign(hDC, align_old);
- NtGdiSetTextColor(hDC, color_old);
+ IntGdiSetBkMode(hDC, mode_old);
+ IntGdiSetTextAlign(hDC, align_old);
+ IntGdiSetTextColor(hDC, color_old);
}
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/painting.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/painting.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/painting.c Tue Feb 19 02:05:41 2008
@@ -1581,7 +1581,7 @@
return FALSE;
}
- NtGdiSetBkMode(hDc, TRANSPARENT);
+ IntGdiSetBkMode(hDc, TRANSPARENT);
if(uFlags & DC_SMALLCAP)
Status = TextIntCreateFontIndirect(&nclm.lfSmCaptionFont, &hFont);
@@ -1603,8 +1603,8 @@
}
if(uFlags & DC_INBUTTON)
- OldTextColor = NtGdiSetTextColor(hDc, IntGetSysColor(COLOR_BTNTEXT));
- else OldTextColor = NtGdiSetTextColor(hDc, IntGetSysColor(uFlags & DC_ACTIVE
+ OldTextColor = IntGdiSetTextColor(hDc, IntGetSysColor(COLOR_BTNTEXT));
+ else OldTextColor = IntGdiSetTextColor(hDc, IntGetSysColor(uFlags & DC_ACTIVE
? COLOR_CAPTIONTEXT : COLOR_INACTIVECAPTIONTEXT));
//FIXME: If string doesn't fit to rc, truncate it and add ellipsis.
@@ -1613,7 +1613,7 @@
lpRc->top, 0, NULL, Text->Buffer,
Text->Length/sizeof(WCHAR), NULL, 0);
- NtGdiSetTextColor(hDc, OldTextColor);
+ IntGdiSetTextColor(hDc, OldTextColor);
NtGdiSelectFont(hDc, hOldFont);
NtGdiDeleteObject(hFont);
Modified: trunk/reactos/subsystems/win32/win32k/objects/arc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/arc.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/arc.c Tue Feb 19 02:05:41 2008
@@ -43,7 +43,7 @@
HWND hWnd;
PWINDOW_OBJECT Window;
- hWnd = IntWindowFromDC((HDC) dc->hHmgr);
+ hWnd = IntWindowFromDC((HDC) dc->BaseObject.hHmgr);
Window = UserGetWindowObject(hWnd);
if(!Window) return FALSE;
Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Tue Feb 19 02:05:41 2008
@@ -838,10 +838,10 @@
/* Initialize the DC state */
DC_InitDC(hNewDC);
- NtGdiSetTextColor(hNewDC, RGB(0, 0, 0));
- NtGdiSetTextAlign(hNewDC, TA_TOP);
- NtGdiSetBkColor(hNewDC, RGB(255, 255, 255));
- NtGdiSetBkMode(hNewDC, OPAQUE);
+ IntGdiSetTextColor(hNewDC, RGB(0, 0, 0));
+ IntGdiSetTextAlign(hNewDC, TA_TOP);
+ IntGdiSetBkColor(hNewDC, RGB(255, 255, 255));
+ IntGdiSetBkMode(hNewDC, OPAQUE);
}
else
{
@@ -1356,8 +1356,8 @@
NtGdiSelectFont( hDC, sDc_Attr->hlfntNew );
NtGdiSelectPen( hDC, sDc_Attr->hpen );
- NtGdiSetBkColor( hDC, sDc_Attr->crBackgroundClr);
- NtGdiSetTextColor( hDC, sDc_Attr->crForegroundClr);
+ IntGdiSetBkColor( hDC, sDc_Attr->crBackgroundClr);
+ IntGdiSetTextColor( hDC, sDc_Attr->crForegroundClr);
NtUserSelectPalette( hDC, dcs->w.hPalette, FALSE );
@@ -2385,7 +2385,7 @@
Dc_Attr = NewDC->pDc_Attr;
if(!Dc_Attr) Dc_Attr = &NewDC->Dc_Attr;
- NewDC->hHmgr = (HGDIOBJ) hDC; // Save the handle for this DC object.
+ NewDC->BaseObject.hHmgr = (HGDIOBJ) hDC; // Save the handle for this DC object.
NewDC->w.xformWorld2Wnd.eM11 = 1.0f;
NewDC->w.xformWorld2Wnd.eM12 = 0.0f;
NewDC->w.xformWorld2Wnd.eM21 = 0.0f;
Modified: trunk/reactos/subsystems/win32/win32k/objects/dcutil.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dcutil.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dcutil.c Tue Feb 19 02:05:41 2008
@@ -41,7 +41,9 @@
if (!Dc_Attr) Dc_Attr = &dc->Dc_Attr; \
pt->ax = Dc_Attr->ret_x; \
pt->ay = Dc_Attr->ret_y; \
-} \
+}
+
+#if 0
BOOL STDCALL NtGdi##FuncName ( HDC hdc, LP##type pt ) \
{ \
NTSTATUS Status = STATUS_SUCCESS; \
@@ -78,6 +80,7 @@
} \
return TRUE; \
}
+#endif
#define DC_SET_MODE( func_name, dc_field, min_val, max_val ) \
INT STDCALL func_name( HDC hdc, INT mode ) \
@@ -123,7 +126,7 @@
PDC_ATTR Dc_Attr = dc->pDc_Attr;
if (Dc_Attr == ((PDC_ATTR)&dc->Dc_Attr)) return TRUE; // No need to copy self.
-
+
if (!Dc_Attr) return FALSE;
else
CopytoUserDcAttr( dc, Dc_Attr);
@@ -143,28 +146,28 @@
}
-DC_GET_VAL( INT, NtGdiGetMapMode, iMapMode )
-DC_GET_VAL( INT, NtGdiGetPolyFillMode, jFillMode )
-DC_GET_VAL( COLORREF, NtGdiGetBkColor, crBackgroundClr )
-DC_GET_VAL( INT, NtGdiGetBkMode, jBkMode )
-DC_GET_VAL( INT, NtGdiGetROP2, jROP2 )
-DC_GET_VAL( INT, NtGdiGetStretchBltMode, jStretchBltMode )
-DC_GET_VAL( UINT, NtGdiGetTextAlign, lTextAlign )
-DC_GET_VAL( COLORREF, NtGdiGetTextColor, crForegroundClr )
+DC_GET_VAL( INT, IntGdiGetMapMode, iMapMode )
+DC_GET_VAL( INT, IntGdiGetPolyFillMode, jFillMode )
+DC_GET_VAL( COLORREF, IntGdiGetBkColor, crBackgroundClr )
+DC_GET_VAL( INT, IntGdiGetBkMode, jBkMode )
+DC_GET_VAL( INT, IntGdiGetROP2, jROP2 )
+DC_GET_VAL( INT, IntGdiGetStretchBltMode, jStretchBltMode )
+DC_GET_VAL( UINT, IntGdiGetTextAlign, lTextAlign )
+DC_GET_VAL( COLORREF, IntGdiGetTextColor, crForegroundClr )
DC_GET_VAL_EX( GetViewportExtEx, szlViewportExt.cx, szlViewportExt.cy, SIZE, cx, cy )
DC_GET_VAL_EX( GetViewportOrgEx, ptlViewportOrg.x, ptlViewportOrg.y, POINT, x, y )
DC_GET_VAL_EX( GetWindowExtEx, szlWindowExt.cx, szlWindowExt.cy, SIZE, cx, cy )
DC_GET_VAL_EX( GetWindowOrgEx, ptlWindowOrg.x, ptlWindowOrg.y, POINT, x, y )
-DC_SET_MODE( NtGdiSetPolyFillMode, jFillMode, ALTERNATE, WINDING )
-DC_SET_MODE( NtGdiSetROP2, jROP2, R2_BLACK, R2_WHITE )
-DC_SET_MODE( NtGdiSetStretchBltMode, jStretchBltMode, BLACKONWHITE, HALFTONE )
+DC_SET_MODE( IntGdiSetPolyFillMode, jFillMode, ALTERNATE, WINDING )
+DC_SET_MODE( IntGdiSetROP2, jROP2, R2_BLACK, R2_WHITE )
+DC_SET_MODE( IntGdiSetStretchBltMode, jStretchBltMode, BLACKONWHITE, HALFTONE )
COLORREF FASTCALL
-NtGdiSetBkColor(HDC hDC, COLORREF color)
+IntGdiSetBkColor(HDC hDC, COLORREF color)
{
COLORREF oldColor;
PDC dc;
@@ -189,7 +192,7 @@
}
INT FASTCALL
-NtGdiSetBkMode(HDC hDC, INT Mode)
+IntGdiSetBkMode(HDC hDC, INT Mode)
{
COLORREF oldMode;
PDC dc;
@@ -211,7 +214,7 @@
UINT
FASTCALL
-NtGdiSetTextAlign(HDC hDC,
+IntGdiSetTextAlign(HDC hDC,
UINT Mode)
{
UINT prevAlign;
@@ -234,7 +237,7 @@
COLORREF
FASTCALL
-NtGdiSetTextColor(HDC hDC,
+IntGdiSetTextColor(HDC hDC,
COLORREF color)
{
COLORREF oldColor;
Modified: trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c Tue Feb 19 02:05:41 2008
@@ -68,37 +68,37 @@
static const
OBJ_TYPE_INFO ObjTypeInfo[] =
{
- {0, 0, 0, NULL}, /* 00 reserved
entry */
- {1, sizeof(DC), GDI_OBJECT_TAG_DC, DC_Cleanup}, /* 01 DC */
- {1, 0, 0, 0}, /* 02 DD_DDRAW,
should be moved away from gdi objects */
- {1, 0, 0, 0}, /* 03
DD_SURFACE, should be moved away from gdi objects */
- {1, sizeof(ROSRGNDATA), GDI_OBJECT_TAG_REGION, RGNDATA_Cleanup}, /* 04 REGION */
- {1, sizeof(BITMAPOBJ), GDI_OBJECT_TAG_BITMAP, BITMAP_Cleanup}, /* 05 BITMAP */
- {0, sizeof(DC), GDI_OBJECT_TAG_CLIOBJ, GDI_CleanupDummy}, /* 06 CLIOBJ:
METADC,... FIXME: don't use DC struct */
- {0, 0, GDI_OBJECT_TAG_PATH, NULL}, /* 07 PATH,
unused */
- {1, sizeof(PALGDI), GDI_OBJECT_TAG_PALETTE, PALETTE_Cleanup}, /* 08 PALETTE
*/
- {0, 0, GDI_OBJECT_TAG_COLSPC, NULL}, /* 09
COLORSPACE, unused */
- {1, sizeof(TEXTOBJ), GDI_OBJECT_TAG_FONT, GDI_CleanupDummy}, /* 0a FONT */
- {0, 0, 0, NULL}, /* 0b RFONT,
unused */
- {0, 0, 0, NULL}, /* 0c PFE,
unused */
- {0, 0, 0, NULL}, /* 0d PFT,
unused */
- {0, 0, 0, NULL}, /* 0e ICMCXF,
unused */
- {0, 0, 0, NULL}, /* 0f ICMDLL,
unused */
- {1, sizeof(GDIBRUSHOBJ), GDI_OBJECT_TAG_BRUSH, BRUSH_Cleanup}, /* 10 BRUSH,
PEN, EXTPEN */
- {0, 0, 0, NULL}, /* 11
D3D_HANDLE, unused */
- {0, 0, 0, NULL}, /* 12 DD_VPORT,
unused */
- {0, 0, 0, NULL}, /* 13 SPACE,
unused */
- {0, 0, 0, NULL}, /* 14 DD_MOTION,
unused */
- {0, 0, 0, NULL}, /* 15 META,
unused */
- {0, 0, 0, NULL}, /* 16 ENUMFONT,
unused */
- {0, 0, 0, NULL}, /* 17 BMFD,
unused */
- {0, 0, 0, NULL}, /* 18 VTFD,
unused */
- {0, 0, 0, NULL}, /* 19 TTFD,
unused */
- {0, 0, 0, NULL}, /* 1a RC, unused
*/
- {0, 0, 0, NULL}, /* 1b TEMP,
unused */
- {0, 0, 0, NULL}, /* 1c DRVOBJ,
unused */
- {0, 0, 0, NULL}, /* 1d DCIOBJ,
unused */
- {0, 0, 0, NULL}, /* 1e SPOOL,
unused */
+ {0, 0, 0, NULL}, /* 00 reserved entry
*/
+ {1, sizeof(DC), TAG_DC, DC_Cleanup}, /* 01 DC */
+ {1, 0, 0, NULL}, /* 02 UNUSED1 */
+ {1, 0, 0, NULL}, /* 03 UNUSED2 */
+ {1, sizeof(ROSRGNDATA), TAG_REGION, RGNDATA_Cleanup}, /* 04 RGN */
+ {1, sizeof(BITMAPOBJ), TAG_SURFACE, BITMAP_Cleanup}, /* 05 SURFACE */
+ {0, sizeof(DC), TAG_CLIENTOBJ, GDI_CleanupDummy}, /* 06 CLIENTOBJ:
METADC,... FIXME: don't use DC struct */
+ {0, 0, TAG_PATH, NULL}, /* 07 PATH, unused */
+ {1, sizeof(PALGDI), TAG_PALETTE, PALETTE_Cleanup}, /* 08 PAL */
+ {0, 0, TAG_ICMLCS, NULL}, /* 09 ICMLCS, unused
*/
+ {1, sizeof(TEXTOBJ), TAG_LFONT, GDI_CleanupDummy}, /* 0a LFONT */
+ {0, 0, TAG_RFONT, NULL}, /* 0b RFONT, unused */
+ {0, 0, TAG_PFE, NULL}, /* 0c PFE, unused */
+ {0, 0, TAG_PFT, NULL}, /* 0d PFT, unused */
+ {0, 0, TAG_ICMCXF, NULL}, /* 0e ICMCXF, unused
*/
+ {0, 0, TAG_SPRITE, NULL}, /* 0f SPRITE, unused
*/
+ {1, sizeof(GDIBRUSHOBJ), TAG_BRUSH, BRUSH_Cleanup}, /* 10 BRUSH, PEN,
EXTPEN */
+ {0, 0, TAG_UMPD, NULL}, /* 11 UMPD, unused */
+ {0, 0, 0, NULL}, /* 12 UNUSED4 */
+ {0, 0, TAG_SPACE, NULL}, /* 13 SPACE, unused */
+ {0, 0, 0, NULL}, /* 14 UNUSED5 */
+ {0, 0, TAG_META, NULL}, /* 15 META, unused */
+ {0, 0, TAG_EFSTATE, NULL}, /* 16 EFSTATE, unused
*/
+ {0, 0, TAG_BMFD, NULL}, /* 17 BMFD, unused */
+ {0, 0, TAG_TTFD, NULL}, /* 18 VTFD, unused */
+ {0, 0, TAG_TTFD, NULL}, /* 19 TTFD, unused */
+ {0, 0, TAG_RC, NULL}, /* 1a RC, unused */
+ {0, 0, TAG_TEMP, NULL}, /* 1b TEMP, unused */
+ {0, 0, TAG_DRVOBJ, NULL}, /* 1c DRVOBJ, unused
*/
+ {0, 0, TAG_DCIOBJ, NULL}, /* 1d DCIOBJ, unused
*/
+ {0, 0, TAG_SPOOL, NULL}, /* 1e SPOOL, unused */
};
#define BASE_OBJTYPE_COUNT (sizeof(ObjTypeInfo) / sizeof(ObjTypeInfo[0]))