Commit 6ec42c0c authored by Alexandre Julliard's avatar Alexandre Julliard

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.
parent d03300ec
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "winreg.h" #include "winreg.h"
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "wine/debug.h" #include "wine/debug.h"
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "winbase.h" #include "winbase.h"
#include "wingdi.h" #include "wingdi.h"
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
#include "enhmfdrv/enhmetafiledrv.h" #include "enhmfdrv/enhmetafiledrv.h"
#include "wine/debug.h" #include "wine/debug.h"
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "bitmap.h" #include "bitmap.h"
#include "enhmfdrv/enhmetafiledrv.h" #include "enhmfdrv/enhmetafiledrv.h"
#include "gdi_private.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(enhmetafile); WINE_DEFAULT_DEBUG_CHANNEL(enhmetafile);
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include "config.h" #include "config.h"
#include "wine/port.h"
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -36,10 +36,10 @@ ...@@ -36,10 +36,10 @@
#include "winerror.h" #include "winerror.h"
#include "winreg.h" #include "winreg.h"
#include "wingdi.h" #include "wingdi.h"
#include "gdi.h"
#include "gdi_private.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "wine/port.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "gdi.h"
WINE_DEFAULT_DEBUG_CHANNEL(font); WINE_DEFAULT_DEBUG_CHANNEL(font);
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "wownt32.h" #include "wownt32.h"
#include "wine/wingdi16.h" #include "wine/wingdi16.h"
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(gdi); WINE_DEFAULT_DEBUG_CHANNEL(gdi);
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
#include "winbase.h" #include "winbase.h"
#include "wingdi.h" #include "wingdi.h"
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
/*********************************************************************** /***********************************************************************
* GDI initialisation routine * GDI initialisation routine
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "gdi.h" #include "gdi.h"
#include "wownt32.h" #include "wownt32.h"
#include "gdi_private.h"
#include "mfdrv/metafiledrv.h" #include "mfdrv/metafiledrv.h"
#include "wine/debug.h" #include "wine/debug.h"
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
*/ */
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
#include "mfdrv/metafiledrv.h" #include "mfdrv/metafiledrv.h"
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "bitmap.h" #include "bitmap.h"
#include "wownt32.h" #include "wownt32.h"
#include "mfdrv/metafiledrv.h" #include "mfdrv/metafiledrv.h"
#include "gdi_private.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(metafile); WINE_DEFAULT_DEBUG_CHANNEL(metafile);
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include "wownt32.h" #include "wownt32.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
#include "heap.h" #include "heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(print); WINE_DEFAULT_DEBUG_CHANNEL(print);
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "bitmap.h" #include "bitmap.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "palette.h"
#include "windef.h" #include "windef.h"
#include "wownt32.h" #include "wownt32.h"
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include "wingdi.h" #include "wingdi.h"
#include "winreg.h" #include "winreg.h"
#include "winuser.h" #include "winuser.h"
#include "bitmap.h"
#include "gdi.h" #include "gdi.h"
#include "x11drv.h" #include "x11drv.h"
#include "wine/debug.h" #include "wine/debug.h"
......
...@@ -37,7 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv); ...@@ -37,7 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv);
GC BITMAP_monoGC = 0, BITMAP_colorGC = 0; GC BITMAP_monoGC = 0, BITMAP_colorGC = 0;
Pixmap BITMAP_stock_pixmap; /* pixmap for the default stock bitmap */ 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 * X11DRV_BITMAP_Init
......
...@@ -38,9 +38,7 @@ ...@@ -38,9 +38,7 @@
#include "x11drv.h" #include "x11drv.h"
#include "x11font.h" #include "x11font.h"
#include "bitmap.h"
#include "gdi.h" #include "gdi.h"
#include "palette.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(graphics); WINE_DEFAULT_DEBUG_CHANNEL(graphics);
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "bitmap.h"
#include "x11drv.h" #include "x11drv.h"
#include "x11font.h" #include "x11font.h"
#include "ddrawi.h" #include "ddrawi.h"
...@@ -33,7 +32,7 @@ ...@@ -33,7 +32,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(x11drv); 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 */ Display *gdi_display; /* display to use for all GDI functions */
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include "wownt32.h" #include "wownt32.h"
#include "gdi.h" #include "gdi.h"
#include "x11font.h" #include "x11font.h"
#include "bitmap.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(text); WINE_DEFAULT_DEBUG_CHANNEL(text);
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include "winbase.h" #include "winbase.h"
#include "wownt32.h" #include "wownt32.h"
#include "x11drv.h" #include "x11drv.h"
#include "bitmap.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "wine/debug.h" #include "wine/debug.h"
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
*/ */
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(bitblt); WINE_DEFAULT_DEBUG_CHANNEL(bitblt);
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "winbase.h" #include "winbase.h"
#include "wingdi.h" #include "wingdi.h"
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(driver); WINE_DEFAULT_DEBUG_CHANNEL(driver);
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "gdi.h" #include "gdi.h"
#include "wownt32.h" #include "wownt32.h"
#include "gdi_private.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(gdi); WINE_DEFAULT_DEBUG_CHANNEL(gdi);
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "winerror.h" #include "winerror.h"
#include "gdi.h" #include "gdi.h"
#include "bitmap.h" #include "bitmap.h"
#include "gdi_private.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(gdi); WINE_DEFAULT_DEBUG_CHANNEL(gdi);
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "winerror.h" #include "winerror.h"
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(gdi); WINE_DEFAULT_DEBUG_CHANNEL(gdi);
......
...@@ -372,6 +372,13 @@ struct PATH_INFO { ...@@ -372,6 +372,13 @@ struct PATH_INFO {
DWORD BkColor; DWORD BkColor;
}; };
/* DC hook codes */
#define DCHC_INVALIDVISRGN 0x0001
#define DCHC_DELETEDC 0x0002
#define DCHF_INVALIDATEVISRGN 0x0001
#define DCHF_VALIDATEVISRGN 0x0002
/* RenderMode */ /* RenderMode */
#define RENDERMODE_NO_DISPLAY 0 #define RENDERMODE_NO_DISPLAY 0
#define RENDERMODE_OPEN 1 #define RENDERMODE_OPEN 1
......
...@@ -23,10 +23,11 @@ ...@@ -23,10 +23,11 @@
#include <string.h> #include <string.h>
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "gdi.h" #include "gdi.h"
#include "bitmap.h" #include "bitmap.h"
#include "gdi_private.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/winuser16.h"
WINE_DEFAULT_DEBUG_CHANNEL(bitmap); WINE_DEFAULT_DEBUG_CHANNEL(bitmap);
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "wine/wingdi16.h" #include "wine/wingdi16.h"
#include "bitmap.h" #include "bitmap.h"
#include "wownt32.h" #include "wownt32.h"
#include "gdi_private.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(gdi); WINE_DEFAULT_DEBUG_CHANNEL(gdi);
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "wownt32.h" #include "wownt32.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(clipping); WINE_DEFAULT_DEBUG_CHANNEL(clipping);
...@@ -157,7 +158,8 @@ INT WINAPI OffsetClipRgn( HDC hdc, INT x, INT y ) ...@@ -157,7 +158,8 @@ INT WINAPI OffsetClipRgn( HDC hdc, INT x, INT y )
if(dc->funcs->pOffsetClipRgn) if(dc->funcs->pOffsetClipRgn)
ret = dc->funcs->pOffsetClipRgn( dc->physDev, x, y ); ret = dc->funcs->pOffsetClipRgn( dc->physDev, x, y );
else if (dc->hClipRgn) { 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 ); CLIPPING_UpdateGCRegion( dc );
} }
GDI_ReleaseObj( hdc ); GDI_ReleaseObj( hdc );
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "wownt32.h" #include "wownt32.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "wine/debug.h" #include "wine/debug.h"
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "wownt32.h" #include "wownt32.h"
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
/*********************************************************************** /***********************************************************************
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "bitmap.h" #include "bitmap.h"
#include "gdi.h" #include "gdi.h"
#include "wownt32.h" #include "wownt32.h"
#include "gdi_private.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "palette.h" #include "palette.h"
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include "winnls.h" #include "winnls.h"
#include "winerror.h" #include "winerror.h"
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(enhmetafile); WINE_DEFAULT_DEBUG_CHANNEL(enhmetafile);
......
...@@ -33,12 +33,42 @@ ...@@ -33,12 +33,42 @@
#include "winnls.h" #include "winnls.h"
#include "wownt32.h" #include "wownt32.h"
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(font); WINE_DEFAULT_DEBUG_CHANNEL(font);
WINE_DECLARE_DEBUG_CHANNEL(gdi); 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 HGDIOBJ FONT_SelectObject( HGDIOBJ handle, void *obj, HDC hdc );
static INT FONT_GetObject16( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); static INT FONT_GetObject16( HGDIOBJ handle, void *obj, INT count, LPVOID buffer );
static INT FONT_GetObjectA( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); static INT FONT_GetObjectA( HGDIOBJ handle, void *obj, INT count, LPVOID buffer );
......
...@@ -35,12 +35,15 @@ ...@@ -35,12 +35,15 @@
#include "local.h" #include "local.h"
#include "palette.h" #include "palette.h"
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(gdi); WINE_DEFAULT_DEBUG_CHANNEL(gdi);
#define HGDIOBJ_32(h16) ((HGDIOBJ)(ULONG_PTR)(h16)) #define HGDIOBJ_32(h16) ((HGDIOBJ)(ULONG_PTR)(h16))
#define GDI_HEAP_SIZE 0xffe0
/*********************************************************************** /***********************************************************************
* GDI stock objects * GDI stock objects
*/ */
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
#include "wownt32.h" #include "wownt32.h"
#include "winreg.h" #include "winreg.h"
#include "winternl.h" #include "winternl.h"
#include "gdi_private.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(metafile); WINE_DEFAULT_DEBUG_CHANNEL(metafile);
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "wownt32.h" #include "wownt32.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
#include "palette.h" #include "palette.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "winerror.h" #include "winerror.h"
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "wingdi.h" #include "wingdi.h"
#include "wine/wingdi16.h" #include "wine/wingdi16.h"
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(gdi); WINE_DEFAULT_DEBUG_CHANNEL(gdi);
......
...@@ -101,6 +101,7 @@ SOFTWARE. ...@@ -101,6 +101,7 @@ SOFTWARE.
#include "winbase.h" #include "winbase.h"
#include "wingdi.h" #include "wingdi.h"
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(region); WINE_DEFAULT_DEBUG_CHANNEL(region);
......
...@@ -27,9 +27,10 @@ ...@@ -27,9 +27,10 @@
#include "wingdi.h" #include "wingdi.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "winerror.h" #include "winerror.h"
#include "winnls.h"
#include "gdi.h" #include "gdi.h"
#include "gdi_private.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "winnls.h"
WINE_DEFAULT_DEBUG_CHANNEL(text); WINE_DEFAULT_DEBUG_CHANNEL(text);
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <assert.h> #include <assert.h>
#include "dce.h" #include "dce.h"
#include "win.h" #include "win.h"
#include "gdi.h"
#include "user.h" #include "user.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "windef.h" #include "windef.h"
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include "winpos.h" #include "winpos.h"
#include "nonclient.h" #include "nonclient.h"
#include "shellapi.h" #include "shellapi.h"
#include "bitmap.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(nonclient); WINE_DEFAULT_DEBUG_CHANNEL(nonclient);
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include "wownt32.h" #include "wownt32.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "wine/server.h" #include "wine/server.h"
#include "gdi.h"
#include "user.h" #include "user.h"
#include "win.h" #include "win.h"
#include "message.h" #include "message.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment