Author: jimtabor
Date: Mon Nov 12 22:08:44 2007
New Revision: 30402
URL:
http://svn.reactos.org/svn/reactos?rev=30402&view=rev
Log:
Move types out of handles headers. Add Locks for displays.
Modified:
trunk/reactos/include/reactos/win32k/ntgdihdl.h
trunk/reactos/include/reactos/win32k/ntgdityp.h
trunk/reactos/subsystems/win32/win32k/include/dc.h
trunk/reactos/subsystems/win32/win32k/objects/dc.c
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 Mon Nov 12 22:08:44 2007
@@ -354,140 +354,6 @@
BOOL vport2WorldValid; /* Is xformVport2World valid? */
} WIN_DC_INFO;
-
-typedef BOOL (NTAPI *PGD_ENABLEDRIVER)(ULONG, ULONG, PDRVENABLEDATA);
-typedef DHPDEV (NTAPI *PGD_ENABLEPDEV)(DEVMODEW *, LPWSTR, ULONG, HSURF *, ULONG, ULONG
*, ULONG, DEVINFO *, LPWSTR, LPWSTR, HANDLE);
-typedef VOID (NTAPI *PGD_COMPLETEPDEV)(DHPDEV, HDEV);
-typedef VOID (NTAPI *PGD_DISABLEPDEV)(DHPDEV);
-typedef HSURF (NTAPI *PGD_ENABLESURFACE)(DHPDEV);
-typedef VOID (NTAPI *PGD_DISABLESURFACE)(DHPDEV);
-typedef BOOL (NTAPI *PGD_ASSERTMODE)(DHPDEV, BOOL);
-typedef BOOL (NTAPI *PGD_OFFSET)(SURFOBJ*, LONG, LONG, FLONG);
-typedef BOOL (NTAPI *PGD_RESETPDEV)(DHPDEV, DHPDEV);
-typedef VOID (NTAPI *PGD_DISABLEDRIVER)(VOID);
-typedef HBITMAP (NTAPI *PGD_CREATEDEVICEBITMAP)(DHPDEV, SIZEL, ULONG);
-typedef VOID (NTAPI *PGD_DELETEDEVICEBITMAP)(DHSURF);
-typedef BOOL (NTAPI *PGD_ALPHABLEND)(SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*, RECTL*,
RECTL*, BLENDOBJ*);
-typedef BOOL (NTAPI *PGD_REALIZEBRUSH)(BRUSHOBJ*, SURFOBJ*, SURFOBJ*, SURFOBJ*,
XLATEOBJ*, ULONG);
-typedef ULONG (NTAPI *PGD_DITHERCOLOR)(DHPDEV, ULONG, ULONG, PULONG);
-typedef BOOL (NTAPI *PGD_STROKEPATH)(SURFOBJ*, PATHOBJ*, CLIPOBJ*, XFORMOBJ*, BRUSHOBJ*,
POINTL*, PLINEATTRS, MIX);
-typedef BOOL (NTAPI *PGD_FILLPATH)(SURFOBJ*, PATHOBJ*, CLIPOBJ*, BRUSHOBJ*, POINTL*, MIX,
ULONG);
-typedef BOOL (NTAPI *PGD_STROKEANDFILLPATH)(SURFOBJ*, PATHOBJ*, CLIPOBJ*, XFORMOBJ*,
BRUSHOBJ*, PLINEATTRS, BRUSHOBJ*, POINTL*, MIX, ULONG);
-typedef BOOL (NTAPI *PGD_PAINT)(SURFOBJ*, CLIPOBJ*, BRUSHOBJ*, POINTL*, MIX);
-typedef BOOL (NTAPI *PGD_BITBLT)(SURFOBJ*, SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*,
RECTL*, POINTL*, POINTL*, BRUSHOBJ*, POINTL*, ROP4);
-typedef BOOL (NTAPI *PGD_TRANSPARENTBLT)(SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*, RECTL*,
RECTL*, ULONG, ULONG);
-typedef BOOL (NTAPI *PGD_COPYBITS)(SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*, RECTL*,
POINTL*);
-typedef BOOL (NTAPI *PGD_STRETCHBLT)(SURFOBJ*, SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*,
COLORADJUSTMENT*, POINTL*, RECTL*, RECTL*, POINTL*, ULONG);
-typedef BOOL (NTAPI *PGD_STRETCHBLTROP)(SURFOBJ*, SURFOBJ*, SURFOBJ*, CLIPOBJ*,
XLATEOBJ*, COLORADJUSTMENT*, POINTL*, RECTL*, RECTL*, POINTL*, ULONG, BRUSHOBJ*, DWORD);
-typedef BOOL (NTAPI *PGD_SETPALETTE)(DHPDEV, PALOBJ*, ULONG, ULONG, ULONG);
-typedef BOOL (NTAPI *PGD_TEXTOUT)(SURFOBJ*, STROBJ*, FONTOBJ*, CLIPOBJ*, RECTL*, RECTL*,
BRUSHOBJ*, BRUSHOBJ*, POINTL*, MIX);
-typedef ULONG (NTAPI *PGD_ESCAPE)(SURFOBJ*, ULONG, ULONG, PVOID *, ULONG, PVOID *);
-typedef ULONG (NTAPI *PGD_DRAWESCAPE)(SURFOBJ*, ULONG, CLIPOBJ*, RECTL*, ULONG, PVOID *);
-typedef PIFIMETRICS (NTAPI *PGD_QUERYFONT)(DHPDEV, ULONG, ULONG, PULONG);
-typedef PVOID (NTAPI *PGD_QUERYFONTTREE)(DHPDEV, ULONG, ULONG, ULONG, PULONG);
-typedef LONG (NTAPI *PGD_QUERYFONTDATA)(DHPDEV, FONTOBJ*, ULONG, HGLYPH, GLYPHDATA*,
PVOID, ULONG);
-typedef ULONG (NTAPI *PGD_SETPOINTERSHAPE)(SURFOBJ*, SURFOBJ*, SURFOBJ*, XLATEOBJ*, LONG,
LONG, LONG, LONG, RECTL*, ULONG);
-typedef VOID (NTAPI *PGD_MOVEPOINTER)(SURFOBJ*, LONG, LONG, RECTL*);
-typedef BOOL (NTAPI *PGD_LINETO)(SURFOBJ*, CLIPOBJ*, BRUSHOBJ*, LONG, LONG, LONG, LONG,
RECTL*, MIX);
-typedef BOOL (NTAPI *PGD_SENDPAGE)(SURFOBJ*);
-typedef BOOL (NTAPI *PGD_STARTPAGE)(SURFOBJ*);
-typedef BOOL (NTAPI *PGD_ENDDOC)(SURFOBJ*, ULONG);
-typedef BOOL (NTAPI *PGD_STARTDOC)(SURFOBJ*, PWSTR, DWORD);
-typedef ULONG (NTAPI *PGD_GETGLYPHMODE)(DHPDEV, FONTOBJ*);
-typedef VOID (NTAPI *PGD_SYNCHRONIZE)(DHPDEV, RECTL*);
-typedef ULONG (NTAPI *PGD_SAVESCREENBITS)(SURFOBJ*, ULONG, ULONG, RECTL*);
-typedef ULONG (NTAPI *PGD_GETMODES)(HANDLE, ULONG, PDEVMODEW);
-typedef VOID (NTAPI *PGD_FREE)(PVOID, ULONG);
-typedef VOID (NTAPI *PGD_DESTROYFONT)(FONTOBJ*);
-typedef LONG (NTAPI *PGD_QUERYFONTCAPS)(ULONG, PULONG);
-typedef ULONG (NTAPI *PGD_LOADFONTFILE)(ULONG, PVOID, ULONG, ULONG);
-typedef BOOL (NTAPI *PGD_UNLOADFONTFILE)(ULONG);
-typedef ULONG (NTAPI *PGD_FONTMANAGEMENT)(SURFOBJ*, FONTOBJ*, ULONG, ULONG, PVOID, ULONG,
PVOID);
-typedef LONG (NTAPI *PGD_QUERYTRUETYPETABLE)(ULONG, ULONG, ULONG, PTRDIFF, ULONG,
PBYTE);
-typedef LONG (NTAPI *PGD_QUERYTRUETYPEOUTLINE)(DHPDEV, FONTOBJ*, HGLYPH, BOOL,
GLYPHDATA*, ULONG, TTPOLYGONHEADER*);
-typedef PVOID (NTAPI *PGD_GETTRUETYPEFILE)(ULONG, PULONG);
-typedef LONG (NTAPI *PGD_QUERYFONTFILE)(ULONG, ULONG, ULONG, PULONG);
-typedef BOOL (NTAPI *PGD_QUERYADVANCEWIDTHS)(DHPDEV, FONTOBJ*, ULONG, HGLYPH *, PVOID *,
ULONG);
-typedef BOOL (NTAPI *PGD_SETPIXELFORMAT)(SURFOBJ*, LONG, ULONG);
-typedef LONG (NTAPI *PGD_DESCRIBEPIXELFORMAT)(DHPDEV, LONG, ULONG,
PPIXELFORMATDESCRIPTOR);
-typedef BOOL (NTAPI *PGD_SWAPBUFFERS)(SURFOBJ*, PWNDOBJ);
-typedef BOOL (NTAPI *PGD_STARTBANDING)(SURFOBJ*, POINTL*);
-typedef BOOL (NTAPI *PGD_NEXTBAND)(SURFOBJ*, POINTL*);
-typedef BOOL (NTAPI *PGD_GETDIRECTDRAWINFO)(DHPDEV, PDD_HALINFO, PDWORD, VIDEOMEMORY*,
PDWORD, PDWORD);
-typedef BOOL (NTAPI *PGD_ENABLEDIRECTDRAW)(DHPDEV, PDD_CALLBACKS, PDD_SURFACECALLBACKS,
PDD_PALETTECALLBACKS);
-typedef VOID (NTAPI *PGD_DISABLEDIRECTDRAW)(DHPDEV);
-typedef LONG (NTAPI *PGD_QUERYSPOOLTYPE)(DHPDEV, LPWSTR);
-typedef BOOL (NTAPI *PGD_GRADIENTFILL)(SURFOBJ*, CLIPOBJ*, XLATEOBJ*, TRIVERTEX*, ULONG,
PVOID, ULONG, RECTL*, POINTL*, ULONG);
-typedef VOID (NTAPI *PGD_SYNCHRONIZESURFACE)(SURFOBJ*, RECTL *, FLONG);
-
-typedef struct _DRIVER_FUNCTIONS
-{
- PGD_ENABLEDRIVER EnableDriver;
- PGD_ENABLEPDEV EnablePDEV;
- PGD_COMPLETEPDEV CompletePDEV;
- PGD_DISABLEPDEV DisablePDEV;
- PGD_ENABLESURFACE EnableSurface;
- PGD_DISABLESURFACE DisableSurface;
- PGD_ASSERTMODE AssertMode;
- PGD_OFFSET Offset;
- PGD_RESETPDEV ResetPDEV;
- PGD_DISABLEDRIVER DisableDriver;
- PGD_CREATEDEVICEBITMAP CreateDeviceBitmap;
- PGD_DELETEDEVICEBITMAP DeleteDeviceBitmap;
- PGD_REALIZEBRUSH RealizeBrush;
- PGD_DITHERCOLOR DitherColor;
- PGD_STROKEPATH StrokePath;
- PGD_FILLPATH FillPath;
- PGD_STROKEANDFILLPATH StrokeAndFillPath;
- PGD_PAINT Paint;
- PGD_BITBLT BitBlt;
- PGD_TRANSPARENTBLT TransparentBlt;
- PGD_COPYBITS CopyBits;
- PGD_STRETCHBLT StretchBlt;
- PGD_STRETCHBLTROP StretchBltROP;
- PGD_SETPALETTE SetPalette;
- PGD_TEXTOUT TextOut;
- PGD_ESCAPE Escape;
- PGD_DRAWESCAPE DrawEscape;
- PGD_QUERYFONT QueryFont;
- PGD_QUERYFONTTREE QueryFontTree;
- PGD_QUERYFONTDATA QueryFontData;
- PGD_SETPOINTERSHAPE SetPointerShape;
- PGD_MOVEPOINTER MovePointer;
- PGD_LINETO LineTo;
- PGD_SENDPAGE SendPage;
- PGD_STARTPAGE StartPage;
- PGD_ENDDOC EndDoc;
- PGD_STARTDOC StartDoc;
- PGD_GETGLYPHMODE GetGlyphMode;
- PGD_SYNCHRONIZE Synchronize;
- PGD_SAVESCREENBITS SaveScreenBits;
- PGD_GETMODES GetModes;
- PGD_FREE Free;
- PGD_DESTROYFONT DestroyFont;
- PGD_QUERYFONTCAPS QueryFontCaps;
- PGD_LOADFONTFILE LoadFontFile;
- PGD_UNLOADFONTFILE UnloadFontFile;
- PGD_FONTMANAGEMENT FontManagement;
- PGD_QUERYTRUETYPETABLE QueryTrueTypeTable;
- PGD_QUERYTRUETYPEOUTLINE QueryTrueTypeOutline;
- PGD_GETTRUETYPEFILE GetTrueTypeFile;
- PGD_QUERYFONTFILE QueryFontFile;
- PGD_QUERYADVANCEWIDTHS QueryAdvanceWidths;
- PGD_SETPIXELFORMAT SetPixelFormat;
- PGD_DESCRIBEPIXELFORMAT DescribePixelFormat;
- PGD_SWAPBUFFERS SwapBuffers;
- PGD_STARTBANDING StartBanding;
- PGD_NEXTBAND NextBand;
- PGD_GETDIRECTDRAWINFO GetDirectDrawInfo;
- PGD_ENABLEDIRECTDRAW EnableDirectDraw;
- PGD_DISABLEDIRECTDRAW DisableDirectDraw;
- PGD_QUERYSPOOLTYPE QuerySpoolType;
- PGD_GRADIENTFILL GradientFill;
- PGD_SYNCHRONIZESURFACE SynchronizeSurface;
- PGD_ALPHABLEND AlphaBlend;
-} DRIVER_FUNCTIONS, *PDRIVER_FUNCTIONS;
-
typedef struct _DC
{
HGDIOBJ hHmgr; // Handle for this DC object.
@@ -495,10 +361,11 @@
ULONG lucExcLock;
ULONG Tid;
- DHPDEV PDev; // GDIDEVICE PDev
+ DHPDEV PDev; // GDIDEVICE.Handle
INT DC_Type;
INT DC_Flags;
PVOID pPDev; // PGDIDEVICE
+ PVOID hSem; // PERESOURCE
FLONG flGraphics;
FLONG flGraphics2;
PDC_ATTR pDc_Attr;
@@ -506,10 +373,7 @@
HDC hNext;
HDC hPrev;
- UNICODE_STRING DriverName;
-
CLIPOBJ *CombinedClip;
-
XLATEOBJ *XlateBrush;
XLATEOBJ *XlatePen;
@@ -519,6 +383,7 @@
HPALETTE PalIndexed;
+ UNICODE_STRING DriverName;
WIN_DC_INFO w;
HANDLE hFile;
Modified: trunk/reactos/include/reactos/win32k/ntgdityp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntgdityp.h (original)
+++ trunk/reactos/include/reactos/win32k/ntgdityp.h Mon Nov 12 22:08:44 2007
@@ -298,4 +298,140 @@
HGDIOBJ hgdiobj;
} GDIBSOBJECT, *PGDIBSOBJECT;
+//
+// Driver Functions
+//
+typedef BOOL (NTAPI *PGD_ENABLEDRIVER)(ULONG, ULONG, PDRVENABLEDATA);
+typedef DHPDEV (NTAPI *PGD_ENABLEPDEV)(DEVMODEW *, LPWSTR, ULONG, HSURF *, ULONG, ULONG
*, ULONG, DEVINFO *, LPWSTR, LPWSTR, HANDLE);
+typedef VOID (NTAPI *PGD_COMPLETEPDEV)(DHPDEV, HDEV);
+typedef VOID (NTAPI *PGD_DISABLEPDEV)(DHPDEV);
+typedef HSURF (NTAPI *PGD_ENABLESURFACE)(DHPDEV);
+typedef VOID (NTAPI *PGD_DISABLESURFACE)(DHPDEV);
+typedef BOOL (NTAPI *PGD_ASSERTMODE)(DHPDEV, BOOL);
+typedef BOOL (NTAPI *PGD_OFFSET)(SURFOBJ*, LONG, LONG, FLONG);
+typedef BOOL (NTAPI *PGD_RESETPDEV)(DHPDEV, DHPDEV);
+typedef VOID (NTAPI *PGD_DISABLEDRIVER)(VOID);
+typedef HBITMAP (NTAPI *PGD_CREATEDEVICEBITMAP)(DHPDEV, SIZEL, ULONG);
+typedef VOID (NTAPI *PGD_DELETEDEVICEBITMAP)(DHSURF);
+typedef BOOL (NTAPI *PGD_ALPHABLEND)(SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*, RECTL*,
RECTL*, BLENDOBJ*);
+typedef BOOL (NTAPI *PGD_REALIZEBRUSH)(BRUSHOBJ*, SURFOBJ*, SURFOBJ*, SURFOBJ*,
XLATEOBJ*, ULONG);
+typedef ULONG (NTAPI *PGD_DITHERCOLOR)(DHPDEV, ULONG, ULONG, PULONG);
+typedef BOOL (NTAPI *PGD_STROKEPATH)(SURFOBJ*, PATHOBJ*, CLIPOBJ*, XFORMOBJ*, BRUSHOBJ*,
POINTL*, PLINEATTRS, MIX);
+typedef BOOL (NTAPI *PGD_FILLPATH)(SURFOBJ*, PATHOBJ*, CLIPOBJ*, BRUSHOBJ*, POINTL*, MIX,
ULONG);
+typedef BOOL (NTAPI *PGD_STROKEANDFILLPATH)(SURFOBJ*, PATHOBJ*, CLIPOBJ*, XFORMOBJ*,
BRUSHOBJ*, PLINEATTRS, BRUSHOBJ*, POINTL*, MIX, ULONG);
+typedef BOOL (NTAPI *PGD_PAINT)(SURFOBJ*, CLIPOBJ*, BRUSHOBJ*, POINTL*, MIX);
+typedef BOOL (NTAPI *PGD_BITBLT)(SURFOBJ*, SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*,
RECTL*, POINTL*, POINTL*, BRUSHOBJ*, POINTL*, ROP4);
+typedef BOOL (NTAPI *PGD_TRANSPARENTBLT)(SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*, RECTL*,
RECTL*, ULONG, ULONG);
+typedef BOOL (NTAPI *PGD_COPYBITS)(SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*, RECTL*,
POINTL*);
+typedef BOOL (NTAPI *PGD_STRETCHBLT)(SURFOBJ*, SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*,
COLORADJUSTMENT*, POINTL*, RECTL*, RECTL*, POINTL*, ULONG);
+typedef BOOL (NTAPI *PGD_STRETCHBLTROP)(SURFOBJ*, SURFOBJ*, SURFOBJ*, CLIPOBJ*,
XLATEOBJ*, COLORADJUSTMENT*, POINTL*, RECTL*, RECTL*, POINTL*, ULONG, BRUSHOBJ*, DWORD);
+typedef BOOL (NTAPI *PGD_SETPALETTE)(DHPDEV, PALOBJ*, ULONG, ULONG, ULONG);
+typedef BOOL (NTAPI *PGD_TEXTOUT)(SURFOBJ*, STROBJ*, FONTOBJ*, CLIPOBJ*, RECTL*, RECTL*,
BRUSHOBJ*, BRUSHOBJ*, POINTL*, MIX);
+typedef ULONG (NTAPI *PGD_ESCAPE)(SURFOBJ*, ULONG, ULONG, PVOID *, ULONG, PVOID *);
+typedef ULONG (NTAPI *PGD_DRAWESCAPE)(SURFOBJ*, ULONG, CLIPOBJ*, RECTL*, ULONG, PVOID *);
+typedef PIFIMETRICS (NTAPI *PGD_QUERYFONT)(DHPDEV, ULONG, ULONG, PULONG);
+typedef PVOID (NTAPI *PGD_QUERYFONTTREE)(DHPDEV, ULONG, ULONG, ULONG, PULONG);
+typedef LONG (NTAPI *PGD_QUERYFONTDATA)(DHPDEV, FONTOBJ*, ULONG, HGLYPH, GLYPHDATA*,
PVOID, ULONG);
+typedef ULONG (NTAPI *PGD_SETPOINTERSHAPE)(SURFOBJ*, SURFOBJ*, SURFOBJ*, XLATEOBJ*, LONG,
LONG, LONG, LONG, RECTL*, ULONG);
+typedef VOID (NTAPI *PGD_MOVEPOINTER)(SURFOBJ*, LONG, LONG, RECTL*);
+typedef BOOL (NTAPI *PGD_LINETO)(SURFOBJ*, CLIPOBJ*, BRUSHOBJ*, LONG, LONG, LONG, LONG,
RECTL*, MIX);
+typedef BOOL (NTAPI *PGD_SENDPAGE)(SURFOBJ*);
+typedef BOOL (NTAPI *PGD_STARTPAGE)(SURFOBJ*);
+typedef BOOL (NTAPI *PGD_ENDDOC)(SURFOBJ*, ULONG);
+typedef BOOL (NTAPI *PGD_STARTDOC)(SURFOBJ*, PWSTR, DWORD);
+typedef ULONG (NTAPI *PGD_GETGLYPHMODE)(DHPDEV, FONTOBJ*);
+typedef VOID (NTAPI *PGD_SYNCHRONIZE)(DHPDEV, RECTL*);
+typedef ULONG (NTAPI *PGD_SAVESCREENBITS)(SURFOBJ*, ULONG, ULONG, RECTL*);
+typedef ULONG (NTAPI *PGD_GETMODES)(HANDLE, ULONG, PDEVMODEW);
+typedef VOID (NTAPI *PGD_FREE)(PVOID, ULONG);
+typedef VOID (NTAPI *PGD_DESTROYFONT)(FONTOBJ*);
+typedef LONG (NTAPI *PGD_QUERYFONTCAPS)(ULONG, PULONG);
+typedef ULONG (NTAPI *PGD_LOADFONTFILE)(ULONG, PVOID, ULONG, ULONG);
+typedef BOOL (NTAPI *PGD_UNLOADFONTFILE)(ULONG);
+typedef ULONG (NTAPI *PGD_FONTMANAGEMENT)(SURFOBJ*, FONTOBJ*, ULONG, ULONG, PVOID, ULONG,
PVOID);
+typedef LONG (NTAPI *PGD_QUERYTRUETYPETABLE)(ULONG, ULONG, ULONG, PTRDIFF, ULONG,
PBYTE);
+typedef LONG (NTAPI *PGD_QUERYTRUETYPEOUTLINE)(DHPDEV, FONTOBJ*, HGLYPH, BOOL,
GLYPHDATA*, ULONG, TTPOLYGONHEADER*);
+typedef PVOID (NTAPI *PGD_GETTRUETYPEFILE)(ULONG, PULONG);
+typedef LONG (NTAPI *PGD_QUERYFONTFILE)(ULONG, ULONG, ULONG, PULONG);
+typedef BOOL (NTAPI *PGD_QUERYADVANCEWIDTHS)(DHPDEV, FONTOBJ*, ULONG, HGLYPH *, PVOID *,
ULONG);
+typedef BOOL (NTAPI *PGD_SETPIXELFORMAT)(SURFOBJ*, LONG, ULONG);
+typedef LONG (NTAPI *PGD_DESCRIBEPIXELFORMAT)(DHPDEV, LONG, ULONG,
PPIXELFORMATDESCRIPTOR);
+typedef BOOL (NTAPI *PGD_SWAPBUFFERS)(SURFOBJ*, PWNDOBJ);
+typedef BOOL (NTAPI *PGD_STARTBANDING)(SURFOBJ*, POINTL*);
+typedef BOOL (NTAPI *PGD_NEXTBAND)(SURFOBJ*, POINTL*);
+typedef BOOL (NTAPI *PGD_GETDIRECTDRAWINFO)(DHPDEV, PDD_HALINFO, PDWORD, VIDEOMEMORY*,
PDWORD, PDWORD);
+typedef BOOL (NTAPI *PGD_ENABLEDIRECTDRAW)(DHPDEV, PDD_CALLBACKS, PDD_SURFACECALLBACKS,
PDD_PALETTECALLBACKS);
+typedef VOID (NTAPI *PGD_DISABLEDIRECTDRAW)(DHPDEV);
+typedef LONG (NTAPI *PGD_QUERYSPOOLTYPE)(DHPDEV, LPWSTR);
+typedef BOOL (NTAPI *PGD_GRADIENTFILL)(SURFOBJ*, CLIPOBJ*, XLATEOBJ*, TRIVERTEX*, ULONG,
PVOID, ULONG, RECTL*, POINTL*, ULONG);
+typedef VOID (NTAPI *PGD_SYNCHRONIZESURFACE)(SURFOBJ*, RECTL *, FLONG);
+
+typedef struct _DRIVER_FUNCTIONS
+{
+ PGD_ENABLEDRIVER EnableDriver;
+ PGD_ENABLEPDEV EnablePDEV;
+ PGD_COMPLETEPDEV CompletePDEV;
+ PGD_DISABLEPDEV DisablePDEV;
+ PGD_ENABLESURFACE EnableSurface;
+ PGD_DISABLESURFACE DisableSurface;
+ PGD_ASSERTMODE AssertMode;
+ PGD_OFFSET Offset;
+ PGD_RESETPDEV ResetPDEV;
+ PGD_DISABLEDRIVER DisableDriver;
+ PGD_CREATEDEVICEBITMAP CreateDeviceBitmap;
+ PGD_DELETEDEVICEBITMAP DeleteDeviceBitmap;
+ PGD_REALIZEBRUSH RealizeBrush;
+ PGD_DITHERCOLOR DitherColor;
+ PGD_STROKEPATH StrokePath;
+ PGD_FILLPATH FillPath;
+ PGD_STROKEANDFILLPATH StrokeAndFillPath;
+ PGD_PAINT Paint;
+ PGD_BITBLT BitBlt;
+ PGD_TRANSPARENTBLT TransparentBlt;
+ PGD_COPYBITS CopyBits;
+ PGD_STRETCHBLT StretchBlt;
+ PGD_STRETCHBLTROP StretchBltROP;
+ PGD_SETPALETTE SetPalette;
+ PGD_TEXTOUT TextOut;
+ PGD_ESCAPE Escape;
+ PGD_DRAWESCAPE DrawEscape;
+ PGD_QUERYFONT QueryFont;
+ PGD_QUERYFONTTREE QueryFontTree;
+ PGD_QUERYFONTDATA QueryFontData;
+ PGD_SETPOINTERSHAPE SetPointerShape;
+ PGD_MOVEPOINTER MovePointer;
+ PGD_LINETO LineTo;
+ PGD_SENDPAGE SendPage;
+ PGD_STARTPAGE StartPage;
+ PGD_ENDDOC EndDoc;
+ PGD_STARTDOC StartDoc;
+ PGD_GETGLYPHMODE GetGlyphMode;
+ PGD_SYNCHRONIZE Synchronize;
+ PGD_SAVESCREENBITS SaveScreenBits;
+ PGD_GETMODES GetModes;
+ PGD_FREE Free;
+ PGD_DESTROYFONT DestroyFont;
+ PGD_QUERYFONTCAPS QueryFontCaps;
+ PGD_LOADFONTFILE LoadFontFile;
+ PGD_UNLOADFONTFILE UnloadFontFile;
+ PGD_FONTMANAGEMENT FontManagement;
+ PGD_QUERYTRUETYPETABLE QueryTrueTypeTable;
+ PGD_QUERYTRUETYPEOUTLINE QueryTrueTypeOutline;
+ PGD_GETTRUETYPEFILE GetTrueTypeFile;
+ PGD_QUERYFONTFILE QueryFontFile;
+ PGD_QUERYADVANCEWIDTHS QueryAdvanceWidths;
+ PGD_SETPIXELFORMAT SetPixelFormat;
+ PGD_DESCRIBEPIXELFORMAT DescribePixelFormat;
+ PGD_SWAPBUFFERS SwapBuffers;
+ PGD_STARTBANDING StartBanding;
+ PGD_NEXTBAND NextBand;
+ PGD_GETDIRECTDRAWINFO GetDirectDrawInfo;
+ PGD_ENABLEDIRECTDRAW EnableDirectDraw;
+ PGD_DISABLEDIRECTDRAW DisableDirectDraw;
+ PGD_QUERYSPOOLTYPE QuerySpoolType;
+ PGD_GRADIENTFILL GradientFill;
+ PGD_SYNCHRONIZESURFACE SynchronizeSurface;
+ PGD_ALPHABLEND AlphaBlend;
+} DRIVER_FUNCTIONS, *PDRIVER_FUNCTIONS;
+
#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 Mon Nov 12 22:08:44 2007
@@ -40,7 +40,7 @@
ULONG lucExcLock;
ULONG Tid;
- PERESOURCE_XP hsemDevLock;
+ PERESOURCE hsemDevLock;
PVOID pfnSync;
@@ -86,6 +86,8 @@
HDC FASTCALL DC_GetNextDC (PDC pDC);
VOID FASTCALL DC_SetNextDC (PDC pDC, HDC hNextDC);
VOID FASTCALL DC_SetOwnership(HDC DC, PEPROCESS Owner);
+VOID FASTCALL DC_LockDisplay(PERESOURCE);
+VOID FASTCALL DC_UnlockDisplay(PERESOURCE);
VOID FASTCALL IntGdiCopyFromSaveState(PDC, PDC, HDC);
VOID FASTCALL IntGdiCopyToSaveState(PDC, PDC);
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 Mon Nov 12 22:08:44 2007
@@ -632,6 +632,8 @@
PrimarySurface.PreparedDriver = TRUE;
PrimarySurface.DisplayNumber = DisplayNumber;
+
+ PrimarySurface.hsemDevLock = (PERESOURCE)EngCreateSemaphore();
ret = TRUE;
goto cleanup;
@@ -2651,6 +2653,27 @@
}
}
+//
+// Support multi display/device locks.
+// Here, it is PrimarySurface.hsemDevLock
+// or ((PGDIDEVICE)PDC->pPDev)->hsemDevLock
+//
+VOID
+FASTCALL
+DC_LockDisplay(PERESOURCE Resource)
+{
+ KeEnterCriticalRegion();
+ ExAcquireResourceExclusiveLite( Resource , TRUE);
+}
+
+VOID
+FASTCALL
+DC_UnlockDisplay(PERESOURCE Resource)
+{
+ ExReleaseResourceLite( Resource );
+ KeLeaveCriticalRegion();
+}
+
BOOL FASTCALL
IntIsPrimarySurface(SURFOBJ *SurfObj)
{