From 6ec42c0c3b752355587e60964a5803e4be06b366 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 15 Jan 2004 00:35:38 +0000 Subject: [PATCH] Moved a bunch of definitions from gdi.h into a new gdi_private.h to make sure we don't use them outside of gdi32. --- dlls/gdi/driver.c | 1 + dlls/gdi/enhmfdrv/init.c | 1 + dlls/gdi/enhmfdrv/objects.c | 1 + dlls/gdi/freetype.c | 6 +- dlls/gdi/gdi16.c | 1 + dlls/gdi/gdi_main.c | 2 +- include/gdi.h => dlls/gdi/gdi_private.h | 375 ++------------- dlls/gdi/mfdrv/init.c | 1 + dlls/gdi/mfdrv/mapping.c | 1 + dlls/gdi/mfdrv/objects.c | 1 + dlls/gdi/printdrv.c | 1 + dlls/gdi/wing.c | 1 - dlls/x11drv/bitblt.c | 1 - dlls/x11drv/bitmap.c | 2 +- dlls/x11drv/graphics.c | 2 - dlls/x11drv/init.c | 3 +- dlls/x11drv/text.c | 1 - dlls/x11drv/xrender.c | 1 - graphics/bitblt.c | 1 + graphics/escape.c | 1 + graphics/mapping.c | 1 + graphics/painting.c | 1 + graphics/path.c | 1 + include/gdi.h | 786 +++++++++----------------------- include/wine/wingdi16.h | 7 + objects/bitmap.c | 3 +- objects/brush.c | 1 + objects/clipping.c | 4 +- objects/dc.c | 1 + objects/dcvalues.c | 1 + objects/dib.c | 1 + objects/enhmetafile.c | 1 + objects/font.c | 30 ++ objects/gdiobj.c | 3 + objects/metafile.c | 1 + objects/palette.c | 1 + objects/pen.c | 1 + objects/region.c | 1 + objects/text.c | 3 +- windows/dce.c | 1 - windows/nonclient.c | 1 - windows/painting.c | 1 - 42 files changed, 335 insertions(+), 920 deletions(-) copy include/gdi.h => dlls/gdi/gdi_private.h (59%) rewrite include/gdi.h (69%) diff --git a/dlls/gdi/driver.c b/dlls/gdi/driver.c index a013c7c5e80..fd565c46203 100644 --- a/dlls/gdi/driver.c +++ b/dlls/gdi/driver.c @@ -28,6 +28,7 @@ #include "winreg.h" #include "gdi.h" +#include "gdi_private.h" #include "wine/unicode.h" #include "wine/debug.h" diff --git a/dlls/gdi/enhmfdrv/init.c b/dlls/gdi/enhmfdrv/init.c index e22df0ff61d..30b017f034a 100644 --- a/dlls/gdi/enhmfdrv/init.c +++ b/dlls/gdi/enhmfdrv/init.c @@ -25,6 +25,7 @@ #include "winbase.h" #include "wingdi.h" #include "gdi.h" +#include "gdi_private.h" #include "enhmfdrv/enhmetafiledrv.h" #include "wine/debug.h" diff --git a/dlls/gdi/enhmfdrv/objects.c b/dlls/gdi/enhmfdrv/objects.c index b5b388b76c4..6bae1eaee83 100644 --- a/dlls/gdi/enhmfdrv/objects.c +++ b/dlls/gdi/enhmfdrv/objects.c @@ -24,6 +24,7 @@ #include "bitmap.h" #include "enhmfdrv/enhmetafiledrv.h" +#include "gdi_private.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(enhmetafile); diff --git a/dlls/gdi/freetype.c b/dlls/gdi/freetype.c index 67775f97684..e03e4ba0920 100644 --- a/dlls/gdi/freetype.c +++ b/dlls/gdi/freetype.c @@ -20,8 +20,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - #include "config.h" +#include "wine/port.h" #include #include @@ -36,10 +36,10 @@ #include "winerror.h" #include "winreg.h" #include "wingdi.h" +#include "gdi.h" +#include "gdi_private.h" #include "wine/unicode.h" -#include "wine/port.h" #include "wine/debug.h" -#include "gdi.h" WINE_DEFAULT_DEBUG_CHANNEL(font); diff --git a/dlls/gdi/gdi16.c b/dlls/gdi/gdi16.c index aa3084ff812..ed9472da1ef 100644 --- a/dlls/gdi/gdi16.c +++ b/dlls/gdi/gdi16.c @@ -26,6 +26,7 @@ #include "wownt32.h" #include "wine/wingdi16.h" #include "gdi.h" +#include "gdi_private.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(gdi); diff --git a/dlls/gdi/gdi_main.c b/dlls/gdi/gdi_main.c index eff53e88492..36987e42a00 100644 --- a/dlls/gdi/gdi_main.c +++ b/dlls/gdi/gdi_main.c @@ -24,8 +24,8 @@ #include "winbase.h" #include "wingdi.h" #include "wine/winbase16.h" - #include "gdi.h" +#include "gdi_private.h" /*********************************************************************** * GDI initialisation routine diff --git a/include/gdi.h b/dlls/gdi/gdi_private.h similarity index 59% copy from include/gdi.h copy to dlls/gdi/gdi_private.h index 2a8f9a7e36f..72a3d99d5aa 100644 --- a/include/gdi.h +++ b/dlls/gdi/gdi_private.h @@ -18,41 +18,15 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef __WINE_GDI_H -#define __WINE_GDI_H +#ifndef __WINE_GDI_PRIVATE_H +#define __WINE_GDI_PRIVATE_H -#include -#include -#include -#include -#include -#include - - /* GDI objects magic numbers */ -#define FIRST_MAGIC 0x4f47 -#define PEN_MAGIC 0x4f47 -#define BRUSH_MAGIC 0x4f48 -#define FONT_MAGIC 0x4f49 -#define PALETTE_MAGIC 0x4f4a -#define BITMAP_MAGIC 0x4f4b -#define REGION_MAGIC 0x4f4c -#define DC_MAGIC 0x4f4d -#define DISABLED_DC_MAGIC 0x4f4e -#define META_DC_MAGIC 0x4f4f -#define METAFILE_MAGIC 0x4f50 -#define METAFILE_DC_MAGIC 0x4f51 -#define ENHMETAFILE_MAGIC 0x4f52 -#define ENHMETAFILE_DC_MAGIC 0x4f53 -#define MEMORY_DC_MAGIC 0x4f54 -#define LAST_MAGIC 0x4f54 - -#define MAGIC_DONTCARE 0xffff - -/* GDI constants for making objects private/system (naming undoc. !) */ -#define OBJECT_PRIVATE 0x2000 -#define OBJECT_NOSYSTEM 0x8000 - -#define GDIMAGIC(magic) ((magic) & ~(OBJECT_PRIVATE|OBJECT_NOSYSTEM)) +/* Metafile defines */ +#define META_EOF 0x0000 +/* values of mtType in METAHEADER. Note however that the disk image of a disk + based metafile has mtType == 1 */ +#define METAFILE_MEMORY 1 +#define METAFILE_DISK 2 struct gdi_obj_funcs { @@ -70,115 +44,8 @@ struct hdc_list struct hdc_list *next; }; -typedef struct tagGDIOBJHDR -{ - HANDLE16 hNext; - WORD wMagic; - DWORD dwCount; - const struct gdi_obj_funcs *funcs; - struct hdc_list *hdcs; -} GDIOBJHDR; - - -/* It should not be necessary to access the contents of the GdiPath - * structure directly; if you find that the exported functions don't - * allow you to do what you want, then please place a new exported - * function that does this job in path.c. - */ -typedef enum tagGdiPathState -{ - PATH_Null, - PATH_Open, - PATH_Closed -} GdiPathState; - -typedef struct tagGdiPath -{ - GdiPathState state; - POINT *pPoints; - BYTE *pFlags; - int numEntriesUsed, numEntriesAllocated; - BOOL newStroke; -} GdiPath; - -typedef struct tagGdiFont *GdiFont; - -typedef struct { int opaque; } *PHYSDEV; /* PHYSDEV is an opaque pointer */ - -typedef struct tagDC -{ - GDIOBJHDR header; - HDC hSelf; /* Handle to this DC */ - const struct tagDC_FUNCS *funcs; /* DC function table */ - PHYSDEV physDev; /* Physical device (driver-specific) */ - INT saveLevel; - DWORD dwHookData; - FARPROC16 hookProc; /* the original SEGPTR ... */ - DCHOOKPROC hookThunk; /* ... and the thunk to call it */ - - INT wndOrgX; /* Window origin */ - INT wndOrgY; - INT wndExtX; /* Window extent */ - INT wndExtY; - INT vportOrgX; /* Viewport origin */ - INT vportOrgY; - INT vportExtX; /* Viewport extent */ - INT vportExtY; - - int flags; - HRGN hClipRgn; /* Clip region (may be 0) */ - HRGN hVisRgn; /* Visible region (must never be 0) */ - HRGN hGCClipRgn; /* GC clip region (ClipRgn AND VisRgn) */ - HPEN hPen; - HBRUSH hBrush; - HFONT hFont; - HBITMAP hBitmap; - HANDLE hDevice; - HPALETTE hPalette; - - GdiFont gdiFont; - GdiPath path; - - WORD ROPmode; - WORD polyFillMode; - WORD stretchBltMode; - WORD relAbsMode; - WORD backgroundMode; - COLORREF backgroundColor; - COLORREF textColor; - COLORREF dcBrushColor; - COLORREF dcPenColor; - short brushOrgX; - short brushOrgY; - - WORD textAlign; /* Text alignment from SetTextAlign() */ - short charExtra; /* Spacing from SetTextCharacterExtra() */ - short breakTotalExtra; /* Total extra space for justification */ - short breakCount; /* Break char. count */ - short breakExtra; /* breakTotalExtra / breakCount */ - short breakRem; /* breakTotalExtra % breakCount */ - - RECT totalExtent; - BYTE bitsPerPixel; - - INT MapMode; - INT GraphicsMode; /* Graphics mode */ - ABORTPROC pAbortProc; /* AbortProc for Printing */ - ABORTPROC16 pAbortProc16; - INT CursPosX; /* Current position */ - INT CursPosY; - INT ArcDirection; - XFORM xformWorld2Wnd; /* World-to-window transformation */ - XFORM xformWorld2Vport; /* World-to-viewport transformation */ - XFORM xformVport2World; /* Inverse of the above transformation */ - BOOL vport2WorldValid; /* Is xformVport2World valid? */ -} DC; - /* Device functions for the Wine driver interface */ -typedef INT (*DEVICEFONTENUMPROC)(LPENUMLOGFONTEXW,NEWTEXTMETRICEXW *,DWORD, - LPARAM); - typedef struct tagDC_FUNCS { INT (*pAbortDoc)(PHYSDEV); @@ -303,184 +170,13 @@ typedef struct tagDC_FUNCS BOOL (*pWidenPath)(PHYSDEV); } DC_FUNCTIONS; -/* Certain functions will do no further processing if the driver returns this. - Used by mfdrv for example. */ -#define GDI_NO_MORE_WORK 2 - - /* DC hook codes */ -#define DCHC_INVALIDVISRGN 0x0001 -#define DCHC_DELETEDC 0x0002 - -#define DCHF_INVALIDATEVISRGN 0x0001 -#define DCHF_VALIDATEVISRGN 0x0002 - /* DC flags */ #define DC_SAVED 0x0002 /* It is a saved DC */ #define DC_DIRTY 0x0004 /* hVisRgn has to be updated */ -#define DC_THUNKHOOK 0x0008 /* DC hook is in the 16-bit code */ - -#define GDI_HEAP_SIZE 0xffe0 - -/* extra stock object: default 1x1 bitmap for memory DCs */ -#define DEFAULT_BITMAP (STOCK_LAST+1) - -/* Metafile defines */ - -#define META_EOF 0x0000 -/* values of mtType in METAHEADER. Note however that the disk image of a disk - based metafile has mtType == 1 */ -#define METAFILE_MEMORY 1 -#define METAFILE_DISK 2 - -/* Rounds a floating point number to integer. The world-to-viewport - * transformation process is done in floating point internally. This function - * is then used to round these coordinates to integer values. - */ -static inline INT WINE_UNUSED GDI_ROUND(FLOAT val) -{ - return (int)floor(val + 0.5); -} - - /* World -> Device size conversion */ - -/* Performs a world-to-viewport transformation on the specified width (which - * is in floating point format). - */ -static inline void WINE_UNUSED INTERNAL_XWSTODS_FLOAT(DC *dc, FLOAT *width) -{ - /* Perform the transformation */ - *width = *width * dc->xformWorld2Vport.eM11; -} - -/* Performs a world-to-viewport transformation on the specified width (which - * is in integer format). - */ -static inline INT WINE_UNUSED INTERNAL_XWSTODS(DC *dc, INT width) -{ - FLOAT floatWidth; - - /* Perform operation with floating point */ - floatWidth = (FLOAT)width; - INTERNAL_XWSTODS_FLOAT(dc, &floatWidth); - - /* Round to integers */ - return GDI_ROUND(floatWidth); -} - - -/* Performs a world-to-viewport transformation on the specified size (which - * is in floating point format). - */ -static inline void WINE_UNUSED INTERNAL_YWSTODS_FLOAT(DC *dc, FLOAT *height) -{ - /* Perform the transformation */ - *height = *height * dc->xformWorld2Vport.eM22; -} - -/* Performs a world-to-viewport transformation on the specified size (which - * is in integer format). - */ -static inline INT WINE_UNUSED INTERNAL_YWSTODS(DC *dc, INT height) -{ - FLOAT floatHeight; - - /* Perform operation with floating point */ - floatHeight = (FLOAT)height; - INTERNAL_YWSTODS_FLOAT(dc, &floatHeight); - - /* Round to integers */ - return GDI_ROUND(floatHeight); -} - - - /* Device -> World size conversion */ - -/* Performs a device to world transformation on the specified width (which - * is in floating point format). - */ -static inline void INTERNAL_XDSTOWS_FLOAT(DC *dc, FLOAT *width) -{ - /* Perform the transformation */ - *width = *width * dc->xformVport2World.eM11; -} - -/* Performs a device to world transformation on the specified width (which - * is in integer format). - */ -static inline INT INTERNAL_XDSTOWS(DC *dc, INT width) -{ - FLOAT floatWidth; - - /* Perform operation with floating point */ - floatWidth = (FLOAT)width; - INTERNAL_XDSTOWS_FLOAT(dc, &floatWidth); - - /* Round to integers */ - return GDI_ROUND(floatWidth); -} - -/* Performs a device to world transformation on the specified size (which - * is in floating point format). - */ -static inline void INTERNAL_YDSTOWS_FLOAT(DC *dc, FLOAT *height) -{ - /* Perform the transformation */ - *height = *height * dc->xformVport2World.eM22; -} - -/* Performs a device to world transformation on the specified size (which - * is in integer format). - */ -static inline INT INTERNAL_YDSTOWS(DC *dc, INT height) -{ - FLOAT floatHeight; - - /* Perform operation with floating point */ - floatHeight = (FLOAT)height; - INTERNAL_YDSTOWS_FLOAT(dc, &floatHeight); - - /* Round to integers */ - return GDI_ROUND(floatHeight); -} - - - /* Device <-> logical size conversion */ - -#define XDSTOLS(dc,x) \ - MulDiv((x), (dc)->wndExtX, (dc)->vportExtX) -#define YDSTOLS(dc,y) \ - MulDiv((y), (dc)->wndExtY, (dc)->vportExtY) -#define XLSTODS(dc,x) \ - MulDiv((x), (dc)->vportExtX, (dc)->wndExtX) -#define YLSTODS(dc,y) \ - MulDiv((y), (dc)->vportExtY, (dc)->wndExtY) - - /* GDI local heap */ - -extern BOOL GDI_Init(void); -extern void *GDI_AllocObject( WORD, WORD, HGDIOBJ *, const struct gdi_obj_funcs *funcs ); -extern void *GDI_ReallocObject( WORD, HGDIOBJ, void *obj ); -extern BOOL GDI_FreeObject( HGDIOBJ, void *obj ); -extern void *GDI_GetObjPtr( HGDIOBJ, WORD ); -extern void GDI_ReleaseObj( HGDIOBJ ); -extern void GDI_CheckNotLock(void); - -extern const DC_FUNCTIONS *DRIVER_load_driver( LPCWSTR name ); -extern const DC_FUNCTIONS *DRIVER_get_driver( const DC_FUNCTIONS *funcs ); -extern void DRIVER_release_driver( const DC_FUNCTIONS *funcs ); -extern BOOL DRIVER_GetDriverName( LPCWSTR device, LPWSTR driver, DWORD size ); - -extern POINT *GDI_Bezier( const POINT *Points, INT count, INT *nPtsOut ); - -extern DC * DC_AllocDC( const DC_FUNCTIONS *funcs, WORD magic ); -extern DC * DC_GetDCPtr( HDC hdc ); -extern DC * DC_GetDCUpdate( HDC hdc ); -extern void DC_InitDC( DC * dc ); -extern void DC_UpdateXforms( DC * dc ); - -BOOL GDI_hdc_using_object(HGDIOBJ obj, HDC hdc); -BOOL GDI_hdc_not_using_object(HGDIOBJ obj, HDC hdc); +/* Certain functions will do no further processing if the driver returns this. + Used by mfdrv for example. */ +#define GDI_NO_MORE_WORK 2 /* bidi.c */ @@ -501,6 +197,19 @@ extern BOOL BidiAvail; /* clipping.c */ extern void CLIPPING_UpdateGCRegion( DC * dc ); +/* dc.c */ +extern DC * DC_AllocDC( const DC_FUNCTIONS *funcs, WORD magic ); +extern DC * DC_GetDCUpdate( HDC hdc ); +extern DC * DC_GetDCPtr( HDC hdc ); +extern void DC_InitDC( DC * dc ); +extern void DC_UpdateXforms( DC * dc ); + +/* driver.c */ +extern const DC_FUNCTIONS *DRIVER_load_driver( LPCWSTR name ); +extern const DC_FUNCTIONS *DRIVER_get_driver( const DC_FUNCTIONS *funcs ); +extern void DRIVER_release_driver( const DC_FUNCTIONS *funcs ); +extern BOOL DRIVER_GetDriverName( LPCWSTR device, LPWSTR driver, DWORD size ); + /* enhmetafile.c */ extern HENHMETAFILE EMF_Create_HENHMETAFILE(ENHMETAHEADER *emh, BOOL on_disk ); @@ -512,10 +221,10 @@ extern DWORD WineEngEnumFonts(LPLOGFONTW, DEVICEFONTENUMPROC, LPARAM); extern BOOL WineEngGetCharWidth(GdiFont, UINT, UINT, LPINT); extern DWORD WineEngGetFontData(GdiFont, DWORD, DWORD, LPVOID, DWORD); extern DWORD WineEngGetGlyphIndices(GdiFont font, LPCWSTR lpstr, INT count, - LPWORD pgi, DWORD flags); + LPWORD pgi, DWORD flags); extern DWORD WineEngGetGlyphOutline(GdiFont, UINT glyph, UINT format, - LPGLYPHMETRICS, DWORD buflen, LPVOID buf, - const MAT2*); + LPGLYPHMETRICS, DWORD buflen, LPVOID buf, + const MAT2*); extern UINT WineEngGetOutlineTextMetrics(GdiFont, UINT, LPOUTLINETEXTMETRICW); extern UINT WineEngGetTextCharsetInfo(GdiFont font, LPFONTSIGNATURE fs, DWORD flags); extern BOOL WineEngGetTextExtentPoint(GdiFont, LPCWSTR, INT, LPSIZE); @@ -525,18 +234,20 @@ extern BOOL WineEngGetTextMetrics(GdiFont, LPTEXTMETRICW); extern BOOL WineEngInit(void); extern BOOL WineEngRemoveFontResourceEx(LPCWSTR, DWORD, PVOID); +/* gdiobj.c */ +extern BOOL GDI_Init(void); +extern void *GDI_AllocObject( WORD, WORD, HGDIOBJ *, const struct gdi_obj_funcs *funcs ); +extern void *GDI_ReallocObject( WORD, HGDIOBJ, void *obj ); +extern BOOL GDI_FreeObject( HGDIOBJ, void *obj ); +extern void GDI_CheckNotLock(void); +extern BOOL GDI_hdc_using_object(HGDIOBJ obj, HDC hdc); +extern BOOL GDI_hdc_not_using_object(HGDIOBJ obj, HDC hdc); + /* metafile.c */ extern HMETAFILE MF_Create_HMETAFILE(METAHEADER *mh); extern HMETAFILE16 MF_Create_HMETAFILE16(METAHEADER *mh); extern METAHEADER *MF_CreateMetaHeaderDisk(METAHEADER *mr, LPCSTR filename); -/* region.c */ -extern BOOL REGION_FrameRgn( HRGN dest, HRGN src, INT x, INT y ); - -/* palette.c */ -extern HPALETTE WINAPI GDISelectPalette( HDC hdc, HPALETTE hpal, WORD wBkg); -extern UINT WINAPI GDIRealizePalette( HDC hdc ); - /* path.c */ #define PATH_IsPathOpen(path) ((path).state==PATH_Open) @@ -565,9 +276,17 @@ extern BOOL PATH_PolyPolygon(DC *dc, const POINT *pt, const INT *counts, UINT po extern BOOL PATH_RoundRect(DC *dc, INT x1, INT y1, INT x2, INT y2, INT ell_width, INT ell_height); extern BOOL PATH_AddEntry(GdiPath *pPath, const POINT *pPoint, BYTE flags); +/* painting.c */ +extern POINT *GDI_Bezier( const POINT *Points, INT count, INT *nPtsOut ); + +/* palette.c */ +extern HPALETTE WINAPI GDISelectPalette( HDC hdc, HPALETTE hpal, WORD wBkg); +extern UINT WINAPI GDIRealizePalette( HDC hdc ); + +/* region.c */ +extern BOOL REGION_FrameRgn( HRGN dest, HRGN src, INT x, INT y ); + /* text.c */ extern LPWSTR FONT_mbtowc(HDC, LPCSTR, INT, INT*, UINT*); -#define WINE_GGO_GRAY16_BITMAP 0x7f - -#endif /* __WINE_GDI_H */ +#endif /* __WINE_GDI_PRIVATE_H */ diff --git a/dlls/gdi/mfdrv/init.c b/dlls/gdi/mfdrv/init.c index 35c5de1ebf8..7e358cf2dca 100644 --- a/dlls/gdi/mfdrv/init.c +++ b/dlls/gdi/mfdrv/init.c @@ -26,6 +26,7 @@ #include "wine/winbase16.h" #include "gdi.h" #include "wownt32.h" +#include "gdi_private.h" #include "mfdrv/metafiledrv.h" #include "wine/debug.h" diff --git a/dlls/gdi/mfdrv/mapping.c b/dlls/gdi/mfdrv/mapping.c index 5ce953f0adf..89450bdc748 100644 --- a/dlls/gdi/mfdrv/mapping.c +++ b/dlls/gdi/mfdrv/mapping.c @@ -19,6 +19,7 @@ */ #include "gdi.h" +#include "gdi_private.h" #include "mfdrv/metafiledrv.h" diff --git a/dlls/gdi/mfdrv/objects.c b/dlls/gdi/mfdrv/objects.c index adcf7b4fb14..0618a6bb7be 100644 --- a/dlls/gdi/mfdrv/objects.c +++ b/dlls/gdi/mfdrv/objects.c @@ -25,6 +25,7 @@ #include "bitmap.h" #include "wownt32.h" #include "mfdrv/metafiledrv.h" +#include "gdi_private.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(metafile); diff --git a/dlls/gdi/printdrv.c b/dlls/gdi/printdrv.c index a9c3b4713ae..73e5f44be99 100644 --- a/dlls/gdi/printdrv.c +++ b/dlls/gdi/printdrv.c @@ -49,6 +49,7 @@ #include "wownt32.h" #include "wine/debug.h" #include "gdi.h" +#include "gdi_private.h" #include "heap.h" WINE_DEFAULT_DEBUG_CHANNEL(print); diff --git a/dlls/gdi/wing.c b/dlls/gdi/wing.c index 042330f8606..ab4611e7638 100644 --- a/dlls/gdi/wing.c +++ b/dlls/gdi/wing.c @@ -23,7 +23,6 @@ #include "wine/winuser16.h" #include "bitmap.h" #include "wine/debug.h" -#include "palette.h" #include "windef.h" #include "wownt32.h" diff --git a/dlls/x11drv/bitblt.c b/dlls/x11drv/bitblt.c index 1ded2b7cedf..5daf99d4284 100644 --- a/dlls/x11drv/bitblt.c +++ b/dlls/x11drv/bitblt.c @@ -31,7 +31,6 @@ #include "wingdi.h" #include "winreg.h" #include "winuser.h" -#include "bitmap.h" #include "gdi.h" #include "x11drv.h" #include "wine/debug.h" diff --git a/dlls/x11drv/bitmap.c b/dlls/x11drv/bitmap.c index 0e4f7c18b9f..b43cf38be13 100644 --- a/dlls/x11drv/bitmap.c +++ b/dlls/x11drv/bitmap.c @@ -37,7 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv); GC BITMAP_monoGC = 0, BITMAP_colorGC = 0; Pixmap BITMAP_stock_pixmap; /* pixmap for the default stock bitmap */ -extern const DC_FUNCTIONS *X11DRV_DC_Funcs; /* hack */ +extern const struct tagDC_FUNCS *X11DRV_DC_Funcs; /* hack */ /*********************************************************************** * X11DRV_BITMAP_Init diff --git a/dlls/x11drv/graphics.c b/dlls/x11drv/graphics.c index 8aaef6e3bcf..0b6a5ccc40f 100644 --- a/dlls/x11drv/graphics.c +++ b/dlls/x11drv/graphics.c @@ -38,9 +38,7 @@ #include "x11drv.h" #include "x11font.h" -#include "bitmap.h" #include "gdi.h" -#include "palette.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(graphics); diff --git a/dlls/x11drv/init.c b/dlls/x11drv/init.c index e26c8c19929..bd10202f404 100644 --- a/dlls/x11drv/init.c +++ b/dlls/x11drv/init.c @@ -25,7 +25,6 @@ #include "windef.h" #include "winbase.h" -#include "bitmap.h" #include "x11drv.h" #include "x11font.h" #include "ddrawi.h" @@ -33,7 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv); -const DC_FUNCTIONS *X11DRV_DC_Funcs = NULL; /* hack */ +const struct tagDC_FUNCS *X11DRV_DC_Funcs = NULL; /* hack */ Display *gdi_display; /* display to use for all GDI functions */ diff --git a/dlls/x11drv/text.c b/dlls/x11drv/text.c index 7083065b478..93c3e466418 100644 --- a/dlls/x11drv/text.c +++ b/dlls/x11drv/text.c @@ -30,7 +30,6 @@ #include "wownt32.h" #include "gdi.h" #include "x11font.h" -#include "bitmap.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(text); diff --git a/dlls/x11drv/xrender.c b/dlls/x11drv/xrender.c index 423c87ecc87..eebb7437680 100644 --- a/dlls/x11drv/xrender.c +++ b/dlls/x11drv/xrender.c @@ -32,7 +32,6 @@ #include "winbase.h" #include "wownt32.h" #include "x11drv.h" -#include "bitmap.h" #include "wine/unicode.h" #include "wine/debug.h" diff --git a/graphics/bitblt.c b/graphics/bitblt.c index 69d1ad69188..82b94f5be6c 100644 --- a/graphics/bitblt.c +++ b/graphics/bitblt.c @@ -19,6 +19,7 @@ */ #include "gdi.h" +#include "gdi_private.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(bitblt); diff --git a/graphics/escape.c b/graphics/escape.c index a269a177c8d..af504cb8c7c 100644 --- a/graphics/escape.c +++ b/graphics/escape.c @@ -25,6 +25,7 @@ #include "winbase.h" #include "wingdi.h" #include "gdi.h" +#include "gdi_private.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(driver); diff --git a/graphics/mapping.c b/graphics/mapping.c index 43038dae9a8..507c78989fd 100644 --- a/graphics/mapping.c +++ b/graphics/mapping.c @@ -20,6 +20,7 @@ #include "gdi.h" #include "wownt32.h" +#include "gdi_private.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(gdi); diff --git a/graphics/painting.c b/graphics/painting.c index a7c37c2cd73..5ee1a1ca246 100644 --- a/graphics/painting.c +++ b/graphics/painting.c @@ -33,6 +33,7 @@ #include "winerror.h" #include "gdi.h" #include "bitmap.h" +#include "gdi_private.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(gdi); diff --git a/graphics/path.c b/graphics/path.c index d99fa7bd434..b19ec710843 100644 --- a/graphics/path.c +++ b/graphics/path.c @@ -36,6 +36,7 @@ #include "winerror.h" #include "gdi.h" +#include "gdi_private.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(gdi); diff --git a/include/gdi.h b/include/gdi.h dissimilarity index 69% index 2a8f9a7e36f..6f11508be2c 100644 --- a/include/gdi.h +++ b/include/gdi.h @@ -1,573 +1,213 @@ -/* - * GDI definitions - * - * Copyright 1993 Alexandre Julliard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __WINE_GDI_H -#define __WINE_GDI_H - -#include -#include -#include -#include -#include -#include - - /* GDI objects magic numbers */ -#define FIRST_MAGIC 0x4f47 -#define PEN_MAGIC 0x4f47 -#define BRUSH_MAGIC 0x4f48 -#define FONT_MAGIC 0x4f49 -#define PALETTE_MAGIC 0x4f4a -#define BITMAP_MAGIC 0x4f4b -#define REGION_MAGIC 0x4f4c -#define DC_MAGIC 0x4f4d -#define DISABLED_DC_MAGIC 0x4f4e -#define META_DC_MAGIC 0x4f4f -#define METAFILE_MAGIC 0x4f50 -#define METAFILE_DC_MAGIC 0x4f51 -#define ENHMETAFILE_MAGIC 0x4f52 -#define ENHMETAFILE_DC_MAGIC 0x4f53 -#define MEMORY_DC_MAGIC 0x4f54 -#define LAST_MAGIC 0x4f54 - -#define MAGIC_DONTCARE 0xffff - -/* GDI constants for making objects private/system (naming undoc. !) */ -#define OBJECT_PRIVATE 0x2000 -#define OBJECT_NOSYSTEM 0x8000 - -#define GDIMAGIC(magic) ((magic) & ~(OBJECT_PRIVATE|OBJECT_NOSYSTEM)) - -struct gdi_obj_funcs -{ - HGDIOBJ (*pSelectObject)( HGDIOBJ handle, void *obj, HDC hdc ); - INT (*pGetObject16)( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); - INT (*pGetObjectA)( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); - INT (*pGetObjectW)( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); - BOOL (*pUnrealizeObject)( HGDIOBJ handle, void *obj ); - BOOL (*pDeleteObject)( HGDIOBJ handle, void *obj ); -}; - -struct hdc_list -{ - HDC hdc; - struct hdc_list *next; -}; - -typedef struct tagGDIOBJHDR -{ - HANDLE16 hNext; - WORD wMagic; - DWORD dwCount; - const struct gdi_obj_funcs *funcs; - struct hdc_list *hdcs; -} GDIOBJHDR; - - -/* It should not be necessary to access the contents of the GdiPath - * structure directly; if you find that the exported functions don't - * allow you to do what you want, then please place a new exported - * function that does this job in path.c. - */ -typedef enum tagGdiPathState -{ - PATH_Null, - PATH_Open, - PATH_Closed -} GdiPathState; - -typedef struct tagGdiPath -{ - GdiPathState state; - POINT *pPoints; - BYTE *pFlags; - int numEntriesUsed, numEntriesAllocated; - BOOL newStroke; -} GdiPath; - -typedef struct tagGdiFont *GdiFont; - -typedef struct { int opaque; } *PHYSDEV; /* PHYSDEV is an opaque pointer */ - -typedef struct tagDC -{ - GDIOBJHDR header; - HDC hSelf; /* Handle to this DC */ - const struct tagDC_FUNCS *funcs; /* DC function table */ - PHYSDEV physDev; /* Physical device (driver-specific) */ - INT saveLevel; - DWORD dwHookData; - FARPROC16 hookProc; /* the original SEGPTR ... */ - DCHOOKPROC hookThunk; /* ... and the thunk to call it */ - - INT wndOrgX; /* Window origin */ - INT wndOrgY; - INT wndExtX; /* Window extent */ - INT wndExtY; - INT vportOrgX; /* Viewport origin */ - INT vportOrgY; - INT vportExtX; /* Viewport extent */ - INT vportExtY; - - int flags; - HRGN hClipRgn; /* Clip region (may be 0) */ - HRGN hVisRgn; /* Visible region (must never be 0) */ - HRGN hGCClipRgn; /* GC clip region (ClipRgn AND VisRgn) */ - HPEN hPen; - HBRUSH hBrush; - HFONT hFont; - HBITMAP hBitmap; - HANDLE hDevice; - HPALETTE hPalette; - - GdiFont gdiFont; - GdiPath path; - - WORD ROPmode; - WORD polyFillMode; - WORD stretchBltMode; - WORD relAbsMode; - WORD backgroundMode; - COLORREF backgroundColor; - COLORREF textColor; - COLORREF dcBrushColor; - COLORREF dcPenColor; - short brushOrgX; - short brushOrgY; - - WORD textAlign; /* Text alignment from SetTextAlign() */ - short charExtra; /* Spacing from SetTextCharacterExtra() */ - short breakTotalExtra; /* Total extra space for justification */ - short breakCount; /* Break char. count */ - short breakExtra; /* breakTotalExtra / breakCount */ - short breakRem; /* breakTotalExtra % breakCount */ - - RECT totalExtent; - BYTE bitsPerPixel; - - INT MapMode; - INT GraphicsMode; /* Graphics mode */ - ABORTPROC pAbortProc; /* AbortProc for Printing */ - ABORTPROC16 pAbortProc16; - INT CursPosX; /* Current position */ - INT CursPosY; - INT ArcDirection; - XFORM xformWorld2Wnd; /* World-to-window transformation */ - XFORM xformWorld2Vport; /* World-to-viewport transformation */ - XFORM xformVport2World; /* Inverse of the above transformation */ - BOOL vport2WorldValid; /* Is xformVport2World valid? */ -} DC; - -/* Device functions for the Wine driver interface */ - -typedef INT (*DEVICEFONTENUMPROC)(LPENUMLOGFONTEXW,NEWTEXTMETRICEXW *,DWORD, - LPARAM); - -typedef struct tagDC_FUNCS -{ - INT (*pAbortDoc)(PHYSDEV); - BOOL (*pAbortPath)(PHYSDEV); - BOOL (*pAngleArc)(PHYSDEV,INT,INT,DWORD,FLOAT,FLOAT); - BOOL (*pArc)(PHYSDEV,INT,INT,INT,INT,INT,INT,INT,INT); - BOOL (*pArcTo)(PHYSDEV,INT,INT,INT,INT,INT,INT,INT,INT); - BOOL (*pBeginPath)(PHYSDEV); - BOOL (*pBitBlt)(PHYSDEV,INT,INT,INT,INT,PHYSDEV,INT,INT,DWORD); - INT (*pChoosePixelFormat)(PHYSDEV,const PIXELFORMATDESCRIPTOR *); - BOOL (*pChord)(PHYSDEV,INT,INT,INT,INT,INT,INT,INT,INT); - BOOL (*pCloseFigure)(PHYSDEV); - BOOL (*pCreateBitmap)(PHYSDEV,HBITMAP); - BOOL (*pCreateDC)(DC *,PHYSDEV *,LPCWSTR,LPCWSTR,LPCWSTR,const DEVMODEW*); - HBITMAP (*pCreateDIBSection)(PHYSDEV,BITMAPINFO *,UINT,LPVOID *,HANDLE,DWORD,DWORD); - BOOL (*pDeleteBitmap)(HBITMAP); - BOOL (*pDeleteDC)(PHYSDEV); - BOOL (*pDeleteObject)(PHYSDEV,HGDIOBJ); - INT (*pDescribePixelFormat)(PHYSDEV,INT,UINT,PIXELFORMATDESCRIPTOR *); - DWORD (*pDeviceCapabilities)(LPSTR,LPCSTR,LPCSTR,WORD,LPSTR,LPDEVMODEA); - BOOL (*pEllipse)(PHYSDEV,INT,INT,INT,INT); - INT (*pEndDoc)(PHYSDEV); - INT (*pEndPage)(PHYSDEV); - BOOL (*pEndPath)(PHYSDEV); - BOOL (*pEnumDeviceFonts)(PHYSDEV,LPLOGFONTW,DEVICEFONTENUMPROC,LPARAM); - INT (*pExcludeClipRect)(PHYSDEV,INT,INT,INT,INT); - INT (*pExtDeviceMode)(LPSTR,HWND,LPDEVMODEA,LPSTR,LPSTR,LPDEVMODEA,LPSTR,DWORD); - INT (*pExtEscape)(PHYSDEV,INT,INT,LPCVOID,INT,LPVOID); - BOOL (*pExtFloodFill)(PHYSDEV,INT,INT,COLORREF,UINT); - INT (*pExtSelectClipRgn)(PHYSDEV,HRGN,INT); - BOOL (*pExtTextOut)(PHYSDEV,INT,INT,UINT,const RECT*,LPCWSTR,UINT,const INT*); - BOOL (*pFillPath)(PHYSDEV); - BOOL (*pFillRgn)(PHYSDEV,HRGN,HBRUSH); - BOOL (*pFlattenPath)(PHYSDEV); - BOOL (*pFrameRgn)(PHYSDEV,HRGN,HBRUSH,INT,INT); - BOOL (*pGdiComment)(PHYSDEV,UINT,CONST BYTE*); - LONG (*pGetBitmapBits)(HBITMAP,void*,LONG); - BOOL (*pGetCharWidth)(PHYSDEV,UINT,UINT,LPINT); - BOOL (*pGetDCOrgEx)(PHYSDEV,LPPOINT); - UINT (*pGetDIBColorTable)(PHYSDEV,UINT,UINT,RGBQUAD*); - INT (*pGetDIBits)(PHYSDEV,HBITMAP,UINT,UINT,LPVOID,BITMAPINFO*,UINT); - INT (*pGetDeviceCaps)(PHYSDEV,INT); - BOOL (*pGetDeviceGammaRamp)(PHYSDEV,LPVOID); - COLORREF (*pGetNearestColor)(PHYSDEV,COLORREF); - COLORREF (*pGetPixel)(PHYSDEV,INT,INT); - INT (*pGetPixelFormat)(PHYSDEV); - UINT (*pGetSystemPaletteEntries)(PHYSDEV,UINT,UINT,LPPALETTEENTRY); - BOOL (*pGetTextExtentPoint)(PHYSDEV,LPCWSTR,INT,LPSIZE); - BOOL (*pGetTextMetrics)(PHYSDEV,TEXTMETRICW*); - INT (*pIntersectClipRect)(PHYSDEV,INT,INT,INT,INT); - BOOL (*pInvertRgn)(PHYSDEV,HRGN); - BOOL (*pLineTo)(PHYSDEV,INT,INT); - BOOL (*pModifyWorldTransform)(PHYSDEV,const XFORM*,INT); - BOOL (*pMoveTo)(PHYSDEV,INT,INT); - INT (*pOffsetClipRgn)(PHYSDEV,INT,INT); - INT (*pOffsetViewportOrg)(PHYSDEV,INT,INT); - INT (*pOffsetWindowOrg)(PHYSDEV,INT,INT); - BOOL (*pPaintRgn)(PHYSDEV,HRGN); - BOOL (*pPatBlt)(PHYSDEV,INT,INT,INT,INT,DWORD); - BOOL (*pPie)(PHYSDEV,INT,INT,INT,INT,INT,INT,INT,INT); - BOOL (*pPolyBezier)(PHYSDEV,const POINT*,DWORD); - BOOL (*pPolyBezierTo)(PHYSDEV,const POINT*,DWORD); - BOOL (*pPolyDraw)(PHYSDEV,const POINT*,const BYTE *,DWORD); - BOOL (*pPolyPolygon)(PHYSDEV,const POINT*,const INT*,UINT); - BOOL (*pPolyPolyline)(PHYSDEV,const POINT*,const DWORD*,DWORD); - BOOL (*pPolygon)(PHYSDEV,const POINT*,INT); - BOOL (*pPolyline)(PHYSDEV,const POINT*,INT); - BOOL (*pPolylineTo)(PHYSDEV,const POINT*,INT); - UINT (*pRealizeDefaultPalette)(PHYSDEV); - UINT (*pRealizePalette)(PHYSDEV,HPALETTE,BOOL); - BOOL (*pRectangle)(PHYSDEV,INT,INT,INT,INT); - HDC (*pResetDC)(PHYSDEV,const DEVMODEW*); - BOOL (*pRestoreDC)(PHYSDEV,INT); - BOOL (*pRoundRect)(PHYSDEV,INT,INT,INT,INT,INT,INT); - INT (*pSaveDC)(PHYSDEV); - INT (*pScaleViewportExt)(PHYSDEV,INT,INT,INT,INT); - INT (*pScaleWindowExt)(PHYSDEV,INT,INT,INT,INT); - HBITMAP (*pSelectBitmap)(PHYSDEV,HBITMAP); - HBRUSH (*pSelectBrush)(PHYSDEV,HBRUSH); - BOOL (*pSelectClipPath)(PHYSDEV,INT); - HFONT (*pSelectFont)(PHYSDEV,HFONT); - HPALETTE (*pSelectPalette)(PHYSDEV,HPALETTE,BOOL); - HPEN (*pSelectPen)(PHYSDEV,HPEN); - INT (*pSetArcDirection)(PHYSDEV,INT); - LONG (*pSetBitmapBits)(HBITMAP,const void*,LONG); - COLORREF (*pSetBkColor)(PHYSDEV,COLORREF); - INT (*pSetBkMode)(PHYSDEV,INT); - COLORREF (*pSetDCBrushColor)(PHYSDEV, COLORREF); - DWORD (*pSetDCOrg)(PHYSDEV,INT,INT); - COLORREF (*pSetDCPenColor)(PHYSDEV, COLORREF); - UINT (*pSetDIBColorTable)(PHYSDEV,UINT,UINT,const RGBQUAD*); - INT (*pSetDIBits)(PHYSDEV,HBITMAP,UINT,UINT,LPCVOID,const BITMAPINFO*,UINT); - INT (*pSetDIBitsToDevice)(PHYSDEV,INT,INT,DWORD,DWORD,INT,INT,UINT,UINT,LPCVOID, - const BITMAPINFO*,UINT); - VOID (*pSetDeviceClipping)(PHYSDEV,HRGN); - BOOL (*pSetDeviceGammaRamp)(PHYSDEV,LPVOID); - INT (*pSetMapMode)(PHYSDEV,INT); - DWORD (*pSetMapperFlags)(PHYSDEV,DWORD); - COLORREF (*pSetPixel)(PHYSDEV,INT,INT,COLORREF); - BOOL (*pSetPixelFormat)(PHYSDEV,INT,const PIXELFORMATDESCRIPTOR *); - INT (*pSetPolyFillMode)(PHYSDEV,INT); - INT (*pSetROP2)(PHYSDEV,INT); - INT (*pSetRelAbs)(PHYSDEV,INT); - INT (*pSetStretchBltMode)(PHYSDEV,INT); - UINT (*pSetTextAlign)(PHYSDEV,UINT); - INT (*pSetTextCharacterExtra)(PHYSDEV,INT); - DWORD (*pSetTextColor)(PHYSDEV,DWORD); - INT (*pSetTextJustification)(PHYSDEV,INT,INT); - INT (*pSetViewportExt)(PHYSDEV,INT,INT); - INT (*pSetViewportOrg)(PHYSDEV,INT,INT); - INT (*pSetWindowExt)(PHYSDEV,INT,INT); - INT (*pSetWindowOrg)(PHYSDEV,INT,INT); - BOOL (*pSetWorldTransform)(PHYSDEV,const XFORM*); - INT (*pStartDoc)(PHYSDEV,const DOCINFOA*); - INT (*pStartPage)(PHYSDEV); - BOOL (*pStretchBlt)(PHYSDEV,INT,INT,INT,INT,PHYSDEV,INT,INT,INT,INT,DWORD); - INT (*pStretchDIBits)(PHYSDEV,INT,INT,INT,INT,INT,INT,INT,INT,const void *, - const BITMAPINFO*,UINT,DWORD); - BOOL (*pStrokeAndFillPath)(PHYSDEV); - BOOL (*pStrokePath)(PHYSDEV); - BOOL (*pSwapBuffers)(PHYSDEV); - BOOL (*pWidenPath)(PHYSDEV); -} DC_FUNCTIONS; - -/* Certain functions will do no further processing if the driver returns this. - Used by mfdrv for example. */ -#define GDI_NO_MORE_WORK 2 - - /* DC hook codes */ -#define DCHC_INVALIDVISRGN 0x0001 -#define DCHC_DELETEDC 0x0002 - -#define DCHF_INVALIDATEVISRGN 0x0001 -#define DCHF_VALIDATEVISRGN 0x0002 - - /* DC flags */ -#define DC_SAVED 0x0002 /* It is a saved DC */ -#define DC_DIRTY 0x0004 /* hVisRgn has to be updated */ -#define DC_THUNKHOOK 0x0008 /* DC hook is in the 16-bit code */ - -#define GDI_HEAP_SIZE 0xffe0 - -/* extra stock object: default 1x1 bitmap for memory DCs */ -#define DEFAULT_BITMAP (STOCK_LAST+1) - -/* Metafile defines */ - -#define META_EOF 0x0000 -/* values of mtType in METAHEADER. Note however that the disk image of a disk - based metafile has mtType == 1 */ -#define METAFILE_MEMORY 1 -#define METAFILE_DISK 2 - -/* Rounds a floating point number to integer. The world-to-viewport - * transformation process is done in floating point internally. This function - * is then used to round these coordinates to integer values. - */ -static inline INT WINE_UNUSED GDI_ROUND(FLOAT val) -{ - return (int)floor(val + 0.5); -} - - /* World -> Device size conversion */ - -/* Performs a world-to-viewport transformation on the specified width (which - * is in floating point format). - */ -static inline void WINE_UNUSED INTERNAL_XWSTODS_FLOAT(DC *dc, FLOAT *width) -{ - /* Perform the transformation */ - *width = *width * dc->xformWorld2Vport.eM11; -} - -/* Performs a world-to-viewport transformation on the specified width (which - * is in integer format). - */ -static inline INT WINE_UNUSED INTERNAL_XWSTODS(DC *dc, INT width) -{ - FLOAT floatWidth; - - /* Perform operation with floating point */ - floatWidth = (FLOAT)width; - INTERNAL_XWSTODS_FLOAT(dc, &floatWidth); - - /* Round to integers */ - return GDI_ROUND(floatWidth); -} - - -/* Performs a world-to-viewport transformation on the specified size (which - * is in floating point format). - */ -static inline void WINE_UNUSED INTERNAL_YWSTODS_FLOAT(DC *dc, FLOAT *height) -{ - /* Perform the transformation */ - *height = *height * dc->xformWorld2Vport.eM22; -} - -/* Performs a world-to-viewport transformation on the specified size (which - * is in integer format). - */ -static inline INT WINE_UNUSED INTERNAL_YWSTODS(DC *dc, INT height) -{ - FLOAT floatHeight; - - /* Perform operation with floating point */ - floatHeight = (FLOAT)height; - INTERNAL_YWSTODS_FLOAT(dc, &floatHeight); - - /* Round to integers */ - return GDI_ROUND(floatHeight); -} - - - /* Device -> World size conversion */ - -/* Performs a device to world transformation on the specified width (which - * is in floating point format). - */ -static inline void INTERNAL_XDSTOWS_FLOAT(DC *dc, FLOAT *width) -{ - /* Perform the transformation */ - *width = *width * dc->xformVport2World.eM11; -} - -/* Performs a device to world transformation on the specified width (which - * is in integer format). - */ -static inline INT INTERNAL_XDSTOWS(DC *dc, INT width) -{ - FLOAT floatWidth; - - /* Perform operation with floating point */ - floatWidth = (FLOAT)width; - INTERNAL_XDSTOWS_FLOAT(dc, &floatWidth); - - /* Round to integers */ - return GDI_ROUND(floatWidth); -} - - -/* Performs a device to world transformation on the specified size (which - * is in floating point format). - */ -static inline void INTERNAL_YDSTOWS_FLOAT(DC *dc, FLOAT *height) -{ - /* Perform the transformation */ - *height = *height * dc->xformVport2World.eM22; -} - -/* Performs a device to world transformation on the specified size (which - * is in integer format). - */ -static inline INT INTERNAL_YDSTOWS(DC *dc, INT height) -{ - FLOAT floatHeight; - - /* Perform operation with floating point */ - floatHeight = (FLOAT)height; - INTERNAL_YDSTOWS_FLOAT(dc, &floatHeight); - - /* Round to integers */ - return GDI_ROUND(floatHeight); -} - - - /* Device <-> logical size conversion */ - -#define XDSTOLS(dc,x) \ - MulDiv((x), (dc)->wndExtX, (dc)->vportExtX) -#define YDSTOLS(dc,y) \ - MulDiv((y), (dc)->wndExtY, (dc)->vportExtY) -#define XLSTODS(dc,x) \ - MulDiv((x), (dc)->vportExtX, (dc)->wndExtX) -#define YLSTODS(dc,y) \ - MulDiv((y), (dc)->vportExtY, (dc)->wndExtY) - - /* GDI local heap */ - -extern BOOL GDI_Init(void); -extern void *GDI_AllocObject( WORD, WORD, HGDIOBJ *, const struct gdi_obj_funcs *funcs ); -extern void *GDI_ReallocObject( WORD, HGDIOBJ, void *obj ); -extern BOOL GDI_FreeObject( HGDIOBJ, void *obj ); -extern void *GDI_GetObjPtr( HGDIOBJ, WORD ); -extern void GDI_ReleaseObj( HGDIOBJ ); -extern void GDI_CheckNotLock(void); - -extern const DC_FUNCTIONS *DRIVER_load_driver( LPCWSTR name ); -extern const DC_FUNCTIONS *DRIVER_get_driver( const DC_FUNCTIONS *funcs ); -extern void DRIVER_release_driver( const DC_FUNCTIONS *funcs ); -extern BOOL DRIVER_GetDriverName( LPCWSTR device, LPWSTR driver, DWORD size ); - -extern POINT *GDI_Bezier( const POINT *Points, INT count, INT *nPtsOut ); - -extern DC * DC_AllocDC( const DC_FUNCTIONS *funcs, WORD magic ); -extern DC * DC_GetDCPtr( HDC hdc ); -extern DC * DC_GetDCUpdate( HDC hdc ); -extern void DC_InitDC( DC * dc ); -extern void DC_UpdateXforms( DC * dc ); - -BOOL GDI_hdc_using_object(HGDIOBJ obj, HDC hdc); -BOOL GDI_hdc_not_using_object(HGDIOBJ obj, HDC hdc); - -/* bidi.c */ - -/* Wine_GCPW Flags */ -/* Directionality - - * LOOSE means that the paragraph dir is only set if there is no strong character. - * FORCE means override the characters in the paragraph. - */ -#define WINE_GCPW_FORCE_LTR 0 -#define WINE_GCPW_FORCE_RTL 1 -#define WINE_GCPW_LOOSE_LTR 2 -#define WINE_GCPW_LOOSE_RTL 3 -#define WINE_GCPW_DIR_MASK 3 -extern BOOL BIDI_Reorder( LPCWSTR lpString, INT uCount, DWORD dwFlags, DWORD dwWineGCP_Flags, - LPWSTR lpOutString, INT uCountOut, UINT *lpOrder ); -extern BOOL BidiAvail; - -/* clipping.c */ -extern void CLIPPING_UpdateGCRegion( DC * dc ); - -/* enhmetafile.c */ -extern HENHMETAFILE EMF_Create_HENHMETAFILE(ENHMETAHEADER *emh, BOOL on_disk ); - -/* freetype.c */ -extern INT WineEngAddFontResourceEx(LPCWSTR, DWORD, PVOID); -extern GdiFont WineEngCreateFontInstance(DC*, HFONT); -extern BOOL WineEngDestroyFontInstance(HFONT handle); -extern DWORD WineEngEnumFonts(LPLOGFONTW, DEVICEFONTENUMPROC, LPARAM); -extern BOOL WineEngGetCharWidth(GdiFont, UINT, UINT, LPINT); -extern DWORD WineEngGetFontData(GdiFont, DWORD, DWORD, LPVOID, DWORD); -extern DWORD WineEngGetGlyphIndices(GdiFont font, LPCWSTR lpstr, INT count, - LPWORD pgi, DWORD flags); -extern DWORD WineEngGetGlyphOutline(GdiFont, UINT glyph, UINT format, - LPGLYPHMETRICS, DWORD buflen, LPVOID buf, - const MAT2*); -extern UINT WineEngGetOutlineTextMetrics(GdiFont, UINT, LPOUTLINETEXTMETRICW); -extern UINT WineEngGetTextCharsetInfo(GdiFont font, LPFONTSIGNATURE fs, DWORD flags); -extern BOOL WineEngGetTextExtentPoint(GdiFont, LPCWSTR, INT, LPSIZE); -extern BOOL WineEngGetTextExtentPointI(GdiFont, const WORD *, INT, LPSIZE); -extern INT WineEngGetTextFace(GdiFont, INT, LPWSTR); -extern BOOL WineEngGetTextMetrics(GdiFont, LPTEXTMETRICW); -extern BOOL WineEngInit(void); -extern BOOL WineEngRemoveFontResourceEx(LPCWSTR, DWORD, PVOID); - -/* metafile.c */ -extern HMETAFILE MF_Create_HMETAFILE(METAHEADER *mh); -extern HMETAFILE16 MF_Create_HMETAFILE16(METAHEADER *mh); -extern METAHEADER *MF_CreateMetaHeaderDisk(METAHEADER *mr, LPCSTR filename); - -/* region.c */ -extern BOOL REGION_FrameRgn( HRGN dest, HRGN src, INT x, INT y ); - -/* palette.c */ -extern HPALETTE WINAPI GDISelectPalette( HDC hdc, HPALETTE hpal, WORD wBkg); -extern UINT WINAPI GDIRealizePalette( HDC hdc ); - -/* path.c */ - -#define PATH_IsPathOpen(path) ((path).state==PATH_Open) -/* Returns TRUE if the specified path is in the open state, i.e. in the - * state where points will be added to the path, or FALSE otherwise. This - * function is implemented as a macro for performance reasons. - */ - -extern void PATH_InitGdiPath(GdiPath *pPath); -extern void PATH_DestroyGdiPath(GdiPath *pPath); -extern BOOL PATH_AssignGdiPath(GdiPath *pPathDest, const GdiPath *pPathSrc); - -extern BOOL PATH_MoveTo(DC *dc); -extern BOOL PATH_LineTo(DC *dc, INT x, INT y); -extern BOOL PATH_Rectangle(DC *dc, INT x1, INT y1, INT x2, INT y2); -extern BOOL PATH_Ellipse(DC *dc, INT x1, INT y1, INT x2, INT y2); -extern BOOL PATH_Arc(DC *dc, INT x1, INT y1, INT x2, INT y2, - INT xStart, INT yStart, INT xEnd, INT yEnd, INT lines); -extern BOOL PATH_PolyBezierTo(DC *dc, const POINT *pt, DWORD cbCount); -extern BOOL PATH_PolyBezier(DC *dc, const POINT *pt, DWORD cbCount); -extern BOOL PATH_PolylineTo(DC *dc, const POINT *pt, DWORD cbCount); -extern BOOL PATH_Polyline(DC *dc, const POINT *pt, DWORD cbCount); -extern BOOL PATH_Polygon(DC *dc, const POINT *pt, DWORD cbCount); -extern BOOL PATH_PolyPolyline(DC *dc, const POINT *pt, const DWORD *counts, DWORD polylines); -extern BOOL PATH_PolyPolygon(DC *dc, const POINT *pt, const INT *counts, UINT polygons); -extern BOOL PATH_RoundRect(DC *dc, INT x1, INT y1, INT x2, INT y2, INT ell_width, INT ell_height); -extern BOOL PATH_AddEntry(GdiPath *pPath, const POINT *pPoint, BYTE flags); - -/* text.c */ -extern LPWSTR FONT_mbtowc(HDC, LPCSTR, INT, INT*, UINT*); - -#define WINE_GGO_GRAY16_BITMAP 0x7f - -#endif /* __WINE_GDI_H */ +/* + * GDI definitions + * + * Copyright 1993 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __WINE_GDI_H +#define __WINE_GDI_H + +#include +#include +#include +#include +#include +#include + + /* GDI objects magic numbers */ +#define FIRST_MAGIC 0x4f47 +#define PEN_MAGIC 0x4f47 +#define BRUSH_MAGIC 0x4f48 +#define FONT_MAGIC 0x4f49 +#define PALETTE_MAGIC 0x4f4a +#define BITMAP_MAGIC 0x4f4b +#define REGION_MAGIC 0x4f4c +#define DC_MAGIC 0x4f4d +#define DISABLED_DC_MAGIC 0x4f4e +#define META_DC_MAGIC 0x4f4f +#define METAFILE_MAGIC 0x4f50 +#define METAFILE_DC_MAGIC 0x4f51 +#define ENHMETAFILE_MAGIC 0x4f52 +#define ENHMETAFILE_DC_MAGIC 0x4f53 +#define MEMORY_DC_MAGIC 0x4f54 +#define LAST_MAGIC 0x4f54 + +#define MAGIC_DONTCARE 0xffff + +/* GDI constants for making objects private/system (naming undoc. !) */ +#define OBJECT_PRIVATE 0x2000 +#define OBJECT_NOSYSTEM 0x8000 + +#define GDIMAGIC(magic) ((magic) & ~(OBJECT_PRIVATE|OBJECT_NOSYSTEM)) + +struct gdi_obj_funcs; +struct hdc_list; + +typedef struct tagGDIOBJHDR +{ + HANDLE16 hNext; + WORD wMagic; + DWORD dwCount; + const struct gdi_obj_funcs *funcs; + struct hdc_list *hdcs; +} GDIOBJHDR; + + +/* It should not be necessary to access the contents of the GdiPath + * structure directly; if you find that the exported functions don't + * allow you to do what you want, then please place a new exported + * function that does this job in path.c. + */ +typedef enum tagGdiPathState +{ + PATH_Null, + PATH_Open, + PATH_Closed +} GdiPathState; + +typedef struct tagGdiPath +{ + GdiPathState state; + POINT *pPoints; + BYTE *pFlags; + int numEntriesUsed, numEntriesAllocated; + BOOL newStroke; +} GdiPath; + +typedef struct tagGdiFont *GdiFont; + +typedef struct { int opaque; } *PHYSDEV; /* PHYSDEV is an opaque pointer */ + +typedef struct tagDC +{ + GDIOBJHDR header; + HDC hSelf; /* Handle to this DC */ + const struct tagDC_FUNCS *funcs; /* DC function table */ + PHYSDEV physDev; /* Physical device (driver-specific) */ + INT saveLevel; + DWORD dwHookData; + FARPROC16 hookProc; /* the original SEGPTR ... */ + DCHOOKPROC hookThunk; /* ... and the thunk to call it */ + + INT wndOrgX; /* Window origin */ + INT wndOrgY; + INT wndExtX; /* Window extent */ + INT wndExtY; + INT vportOrgX; /* Viewport origin */ + INT vportOrgY; + INT vportExtX; /* Viewport extent */ + INT vportExtY; + + int flags; + HRGN hClipRgn; /* Clip region (may be 0) */ + HRGN hVisRgn; /* Visible region (must never be 0) */ + HRGN hGCClipRgn; /* GC clip region (ClipRgn AND VisRgn) */ + HPEN hPen; + HBRUSH hBrush; + HFONT hFont; + HBITMAP hBitmap; + HANDLE hDevice; + HPALETTE hPalette; + + GdiFont gdiFont; + GdiPath path; + + WORD ROPmode; + WORD polyFillMode; + WORD stretchBltMode; + WORD relAbsMode; + WORD backgroundMode; + COLORREF backgroundColor; + COLORREF textColor; + COLORREF dcBrushColor; + COLORREF dcPenColor; + short brushOrgX; + short brushOrgY; + + WORD textAlign; /* Text alignment from SetTextAlign() */ + short charExtra; /* Spacing from SetTextCharacterExtra() */ + short breakTotalExtra; /* Total extra space for justification */ + short breakCount; /* Break char. count */ + short breakExtra; /* breakTotalExtra / breakCount */ + short breakRem; /* breakTotalExtra % breakCount */ + + RECT totalExtent; + BYTE bitsPerPixel; + + INT MapMode; + INT GraphicsMode; /* Graphics mode */ + ABORTPROC pAbortProc; /* AbortProc for Printing */ + ABORTPROC16 pAbortProc16; + INT CursPosX; /* Current position */ + INT CursPosY; + INT ArcDirection; + XFORM xformWorld2Wnd; /* World-to-window transformation */ + XFORM xformWorld2Vport; /* World-to-viewport transformation */ + XFORM xformVport2World; /* Inverse of the above transformation */ + BOOL vport2WorldValid; /* Is xformVport2World valid? */ +} DC; + +typedef INT (*DEVICEFONTENUMPROC)(LPENUMLOGFONTEXW,NEWTEXTMETRICEXW *,DWORD,LPARAM); + +/* extra stock object: default 1x1 bitmap for memory DCs */ +#define DEFAULT_BITMAP (STOCK_LAST+1) + +/* Rounds a floating point number to integer. The world-to-viewport + * transformation process is done in floating point internally. This function + * is then used to round these coordinates to integer values. + */ +static inline INT WINE_UNUSED GDI_ROUND(FLOAT val) +{ + return (int)floor(val + 0.5); +} + + /* World -> Device size conversion */ + +/* Performs a world-to-viewport transformation on the specified width (which + * is in integer format). + */ +static inline INT WINE_UNUSED INTERNAL_XWSTODS(DC *dc, INT width) +{ + FLOAT floatWidth; + + /* Perform operation with floating point */ + floatWidth = (FLOAT)width * dc->xformWorld2Vport.eM11; + /* Round to integers */ + return GDI_ROUND(floatWidth); +} + +/* Performs a world-to-viewport transformation on the specified size (which + * is in integer format). + */ +static inline INT WINE_UNUSED INTERNAL_YWSTODS(DC *dc, INT height) +{ + FLOAT floatHeight; + + /* Perform operation with floating point */ + floatHeight = (FLOAT)height * dc->xformWorld2Vport.eM22; + /* Round to integers */ + return GDI_ROUND(floatHeight); +} + + /* GDI local heap */ + +extern void *GDI_GetObjPtr( HGDIOBJ, WORD ); +extern void GDI_ReleaseObj( HGDIOBJ ); + +#define WINE_GGO_GRAY16_BITMAP 0x7f + +#endif /* __WINE_GDI_H */ diff --git a/include/wine/wingdi16.h b/include/wine/wingdi16.h index 12bb18c9e5e..ac6d65c7b92 100644 --- a/include/wine/wingdi16.h +++ b/include/wine/wingdi16.h @@ -372,6 +372,13 @@ struct PATH_INFO { DWORD BkColor; }; +/* DC hook codes */ +#define DCHC_INVALIDVISRGN 0x0001 +#define DCHC_DELETEDC 0x0002 + +#define DCHF_INVALIDATEVISRGN 0x0001 +#define DCHF_VALIDATEVISRGN 0x0002 + /* RenderMode */ #define RENDERMODE_NO_DISPLAY 0 #define RENDERMODE_OPEN 1 diff --git a/objects/bitmap.c b/objects/bitmap.c index 8d36f4825a2..7ced4f7fceb 100644 --- a/objects/bitmap.c +++ b/objects/bitmap.c @@ -23,10 +23,11 @@ #include #include "wine/winbase16.h" +#include "wine/winuser16.h" #include "gdi.h" #include "bitmap.h" +#include "gdi_private.h" #include "wine/debug.h" -#include "wine/winuser16.h" WINE_DEFAULT_DEBUG_CHANNEL(bitmap); diff --git a/objects/brush.c b/objects/brush.c index cc308ded8d8..d9ec0bc5be2 100644 --- a/objects/brush.c +++ b/objects/brush.c @@ -29,6 +29,7 @@ #include "wine/wingdi16.h" #include "bitmap.h" #include "wownt32.h" +#include "gdi_private.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(gdi); diff --git a/objects/clipping.c b/objects/clipping.c index 11fd7bb39af..de1584572c9 100644 --- a/objects/clipping.c +++ b/objects/clipping.c @@ -26,6 +26,7 @@ #include "wownt32.h" #include "wine/winuser16.h" #include "gdi.h" +#include "gdi_private.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(clipping); @@ -157,7 +158,8 @@ INT WINAPI OffsetClipRgn( HDC hdc, INT x, INT y ) if(dc->funcs->pOffsetClipRgn) ret = dc->funcs->pOffsetClipRgn( dc->physDev, x, y ); else if (dc->hClipRgn) { - ret = OffsetRgn( dc->hClipRgn, XLSTODS(dc,x), YLSTODS(dc,y)); + ret = OffsetRgn( dc->hClipRgn, MulDiv( x, dc->vportExtX, dc->wndExtX ), + MulDiv( y, dc->vportExtY, dc->wndExtY ) ); CLIPPING_UpdateGCRegion( dc ); } GDI_ReleaseObj( hdc ); diff --git a/objects/dc.c b/objects/dc.c index 99a576e75cf..ebd8e8d6af5 100644 --- a/objects/dc.c +++ b/objects/dc.c @@ -32,6 +32,7 @@ #include "wownt32.h" #include "wine/winuser16.h" #include "gdi.h" +#include "gdi_private.h" #include "wine/unicode.h" #include "wine/debug.h" diff --git a/objects/dcvalues.c b/objects/dcvalues.c index 2516398d5e1..09bbdadbb44 100644 --- a/objects/dcvalues.c +++ b/objects/dcvalues.c @@ -28,6 +28,7 @@ #include "wownt32.h" #include "gdi.h" +#include "gdi_private.h" /*********************************************************************** diff --git a/objects/dib.c b/objects/dib.c index 43239d8c88d..7b4ba69db43 100644 --- a/objects/dib.c +++ b/objects/dib.c @@ -27,6 +27,7 @@ #include "bitmap.h" #include "gdi.h" #include "wownt32.h" +#include "gdi_private.h" #include "wine/debug.h" #include "palette.h" diff --git a/objects/enhmetafile.c b/objects/enhmetafile.c index 6c5f76af5de..920bfbbf359 100644 --- a/objects/enhmetafile.c +++ b/objects/enhmetafile.c @@ -43,6 +43,7 @@ #include "winnls.h" #include "winerror.h" #include "gdi.h" +#include "gdi_private.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(enhmetafile); diff --git a/objects/font.c b/objects/font.c index fba939b7375..78ecd4363bf 100644 --- a/objects/font.c +++ b/objects/font.c @@ -33,12 +33,42 @@ #include "winnls.h" #include "wownt32.h" #include "gdi.h" +#include "gdi_private.h" #include "wine/unicode.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(font); WINE_DECLARE_DEBUG_CHANNEL(gdi); + /* Device -> World size conversion */ + +/* Performs a device to world transformation on the specified width (which + * is in integer format). + */ +static inline INT INTERNAL_XDSTOWS(DC *dc, INT width) +{ + FLOAT floatWidth; + + /* Perform operation with floating point */ + floatWidth = (FLOAT)width * dc->xformVport2World.eM11; + /* Round to integers */ + return GDI_ROUND(floatWidth); +} + +/* Performs a device to world transformation on the specified size (which + * is in integer format). + */ +static inline INT INTERNAL_YDSTOWS(DC *dc, INT height) +{ + FLOAT floatHeight; + + /* Perform operation with floating point */ + floatHeight = (FLOAT)height * dc->xformVport2World.eM22; + /* Round to integers */ + return GDI_ROUND(floatHeight); +} + + static HGDIOBJ FONT_SelectObject( HGDIOBJ handle, void *obj, HDC hdc ); static INT FONT_GetObject16( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); static INT FONT_GetObjectA( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); diff --git a/objects/gdiobj.c b/objects/gdiobj.c index 7d3add35956..d66afa06e73 100644 --- a/objects/gdiobj.c +++ b/objects/gdiobj.c @@ -35,12 +35,15 @@ #include "local.h" #include "palette.h" #include "gdi.h" +#include "gdi_private.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(gdi); #define HGDIOBJ_32(h16) ((HGDIOBJ)(ULONG_PTR)(h16)) +#define GDI_HEAP_SIZE 0xffe0 + /*********************************************************************** * GDI stock objects */ diff --git a/objects/metafile.c b/objects/metafile.c index 4e233a3e51b..656bcd6d54c 100644 --- a/objects/metafile.c +++ b/objects/metafile.c @@ -54,6 +54,7 @@ #include "wownt32.h" #include "winreg.h" #include "winternl.h" +#include "gdi_private.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(metafile); diff --git a/objects/palette.c b/objects/palette.c index 02966cf3285..c21e912fe59 100644 --- a/objects/palette.c +++ b/objects/palette.c @@ -33,6 +33,7 @@ #include "wownt32.h" #include "wine/winuser16.h" #include "gdi.h" +#include "gdi_private.h" #include "palette.h" #include "wine/debug.h" #include "winerror.h" diff --git a/objects/pen.c b/objects/pen.c index e6933b4564c..f15cc44f90b 100644 --- a/objects/pen.c +++ b/objects/pen.c @@ -28,6 +28,7 @@ #include "wingdi.h" #include "wine/wingdi16.h" #include "gdi.h" +#include "gdi_private.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(gdi); diff --git a/objects/region.c b/objects/region.c index e82db2a65fa..336f58f1b43 100644 --- a/objects/region.c +++ b/objects/region.c @@ -101,6 +101,7 @@ SOFTWARE. #include "winbase.h" #include "wingdi.h" #include "gdi.h" +#include "gdi_private.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(region); diff --git a/objects/text.c b/objects/text.c index 3aa1bdf5fd1..e9c9aca5ff3 100644 --- a/objects/text.c +++ b/objects/text.c @@ -27,9 +27,10 @@ #include "wingdi.h" #include "wine/winuser16.h" #include "winerror.h" +#include "winnls.h" #include "gdi.h" +#include "gdi_private.h" #include "wine/debug.h" -#include "winnls.h" WINE_DEFAULT_DEBUG_CHANNEL(text); diff --git a/windows/dce.c b/windows/dce.c index eda3f793a3a..927c9de7ed9 100644 --- a/windows/dce.c +++ b/windows/dce.c @@ -34,7 +34,6 @@ #include #include "dce.h" #include "win.h" -#include "gdi.h" #include "user.h" #include "wine/debug.h" #include "windef.h" diff --git a/windows/nonclient.c b/windows/nonclient.c index 7d3a79a1de7..185b05e744f 100644 --- a/windows/nonclient.c +++ b/windows/nonclient.c @@ -35,7 +35,6 @@ #include "winpos.h" #include "nonclient.h" #include "shellapi.h" -#include "bitmap.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(nonclient); diff --git a/windows/painting.c b/windows/painting.c index bb2df1aea83..fb6a03c9340 100644 --- a/windows/painting.c +++ b/windows/painting.c @@ -31,7 +31,6 @@ #include "wownt32.h" #include "wine/unicode.h" #include "wine/server.h" -#include "gdi.h" #include "user.h" #include "win.h" #include "message.h" -- 2.11.4.GIT