- add BASEOBJECT to brush, palette, font and region structures- fix debug output

svn path=/trunk/; revision=32485
This commit is contained in:
Timo Kreuzer 2008-02-26 01:00:34 +00:00
parent 8779081ea2
commit d8582b6bd2
6 changed files with 33 additions and 23 deletions

View file

@ -23,10 +23,9 @@ typedef struct
typedef struct typedef struct
{ {
// HGDIOBJ hHmgr; /* Header for all gdi objects in the handle table.
// PVOID pvEntry; Do not (re)move this. */
// ULONG lucExcLock; BASEOBJECT BaseObject;
// ULONG Tid;
ULONG ulStyle; ULONG ulStyle;
HBITMAP hbmPattern; HBITMAP hbmPattern;

View file

@ -35,6 +35,8 @@
/* The DC object structure */ /* The DC object structure */
typedef struct _DC typedef struct _DC
{ {
/* Header for all gdi objects in the handle table.
Do not (re)move this. */
BASEOBJECT BaseObject; BASEOBJECT BaseObject;
DHPDEV PDev; // <- GDIDEVICE.hPDev DHPDEV for device. DHPDEV PDev; // <- GDIDEVICE.hPDev DHPDEV for device.

View file

@ -31,17 +31,18 @@
#define PAL_RGB16_565 0x00400000 // 16-bit RGB in 565 format #define PAL_RGB16_565 0x00400000 // 16-bit RGB in 565 format
#define PAL_GAMMACORRECTION 0x00800000 // Correct colors #define PAL_GAMMACORRECTION 0x00800000 // Correct colors
typedef struct { typedef struct
{
int shift; int shift;
int scale; int scale;
int max; int max;
} ColorShifts; } ColorShifts;
typedef struct _PALGDI { typedef struct _PALGDI
// HGDIOBJ hHmgr; {
// PVOID pvEntry; /* Header for all gdi objects in the handle table.
// ULONG lucExcLock; Do not (re)move this. */
// ULONG Tid; BASEOBJECT BaseObject;
PALOBJ PalObj; PALOBJ PalObj;
XLATEOBJ *logicalToSystem; XLATEOBJ *logicalToSystem;
@ -79,4 +80,4 @@ INT FASTCALL PALETTE_GetObject(PPALGDI pGdiObject, INT cbCount, LPLOGBRUSH lpBuf
PPALETTEENTRY FASTCALL ReturnSystemPalette (VOID); PPALETTEENTRY FASTCALL ReturnSystemPalette (VOID);
#endif /* _WIN32K_PALETTE_H */ #endif /* not _WIN32K_PALETTE_H */

View file

@ -4,26 +4,30 @@
#include "gdiobj.h" #include "gdiobj.h"
/* Internal region data. Can't use RGNDATA structure because buffer is allocated statically */ /* Type definitions ***********************************************************/
typedef struct _ROSRGNDATA {
// HGDIOBJ hHmgr; /* Internal region data.
// PVOID pvEntry; Can't use RGNDATA structure because buffer is allocated statically */
// ULONG lucExcLock; typedef struct _ROSRGNDATA
// ULONG Tid; {
/* Header for all gdi objects in the handle table.
Do not (re)move this. */
BASEOBJECT BaseObject;
RGNDATAHEADER rdh; RGNDATAHEADER rdh;
PRECT Buffer; PRECT Buffer;
} ROSRGNDATA, *PROSRGNDATA, *LPROSRGNDATA; } ROSRGNDATA, *PROSRGNDATA, *LPROSRGNDATA;
/* Functions ******************************************************************/
#define RGNDATA_FreeRgn(hRgn) GDIOBJ_FreeObj(GdiHandleTable, (HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION) #define RGNDATA_FreeRgn(hRgn) GDIOBJ_FreeObj(GdiHandleTable, (HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION)
#define RGNDATA_LockRgn(hRgn) ((PROSRGNDATA)GDIOBJ_LockObj(GdiHandleTable, (HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION)) #define RGNDATA_LockRgn(hRgn) ((PROSRGNDATA)GDIOBJ_LockObj(GdiHandleTable, (HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION))
#define RGNDATA_UnlockRgn(pRgn) GDIOBJ_UnlockObjByPtr(GdiHandleTable, pRgn) #define RGNDATA_UnlockRgn(pRgn) GDIOBJ_UnlockObjByPtr(GdiHandleTable, pRgn)
HRGN FASTCALL RGNDATA_AllocRgn(INT n); HRGN FASTCALL RGNDATA_AllocRgn(INT n);
BOOL INTERNAL_CALL RGNDATA_Cleanup(PVOID ObjectBody); BOOL INTERNAL_CALL RGNDATA_Cleanup(PVOID ObjectBody);
BOOL FASTCALL IntGdiPaintRgn(PDC, HRGN ); BOOL FASTCALL IntGdiPaintRgn(PDC, HRGN );
HRGN FASTCALL GdiCreatePolyPolygonRgn(CONST PPOINT, CONST PINT, INT, INT ); HRGN FASTCALL GdiCreatePolyPolygonRgn(CONST PPOINT, CONST PINT, INT, INT );
#endif #endif /* not __WIN32K_REGION_H */

View file

@ -57,6 +57,10 @@ typedef struct _STRGDI
/* GDI logical font object */ /* GDI logical font object */
typedef struct typedef struct
{ {
/* Header for all gdi objects in the handle table.
Do not (re)move this. */
BASEOBJECT BaseObject;
ENUMLOGFONTEXDVW logfont; //LOGFONTW logfont; ENUMLOGFONTEXDVW logfont; //LOGFONTW logfont;
FONTOBJ *Font; FONTOBJ *Font;
BOOLEAN Initialized; /* Don't reinitialize for each DC */ BOOLEAN Initialized; /* Don't reinitialize for each DC */

View file

@ -311,7 +311,7 @@ CaptureStackBackTace(PVOID* pFrames, ULONG nFramesToCapture)
static void FASTCALL static void FASTCALL
LockErrorDebugOutput(HGDIOBJ hObj, PGDI_TABLE_ENTRY Entry, LPSTR Function) LockErrorDebugOutput(HGDIOBJ hObj, PGDI_TABLE_ENTRY Entry, LPSTR Function)
{ {
if (Entry->KernelData == NULL) if ((Entry->Type & GDI_ENTRY_BASETYPE_MASK) == 0)
{ {
DPRINT1("%s: Attempted to lock object 0x%x that is deleted!\n", Function, hObj); DPRINT1("%s: Attempted to lock object 0x%x that is deleted!\n", Function, hObj);
} }