Commit 3a850fc8 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Add null driver entry points for the mapping functions.

parent 6419edfb
......@@ -126,8 +126,8 @@ static struct graphics_driver *create_driver( HMODULE module )
GET_FUNC(MoveTo);
GET_FUNC(ModifyWorldTransform);
GET_FUNC(OffsetClipRgn);
GET_FUNC(OffsetViewportOrg);
GET_FUNC(OffsetWindowOrg);
GET_FUNC(OffsetViewportOrgEx);
GET_FUNC(OffsetWindowOrgEx);
GET_FUNC(PaintRgn);
GET_FUNC(PatBlt);
GET_FUNC(Pie);
......@@ -146,8 +146,8 @@ static struct graphics_driver *create_driver( HMODULE module )
GET_FUNC(RestoreDC);
GET_FUNC(RoundRect);
GET_FUNC(SaveDC);
GET_FUNC(ScaleViewportExt);
GET_FUNC(ScaleWindowExt);
GET_FUNC(ScaleViewportExtEx);
GET_FUNC(ScaleWindowExtEx);
GET_FUNC(SelectBitmap);
GET_FUNC(SelectBrush);
GET_FUNC(SelectClipPath);
......@@ -177,10 +177,10 @@ static struct graphics_driver *create_driver( HMODULE module )
GET_FUNC(SetTextCharacterExtra);
GET_FUNC(SetTextColor);
GET_FUNC(SetTextJustification);
GET_FUNC(SetViewportExt);
GET_FUNC(SetViewportOrg);
GET_FUNC(SetWindowExt);
GET_FUNC(SetWindowOrg);
GET_FUNC(SetViewportExtEx);
GET_FUNC(SetViewportOrgEx);
GET_FUNC(SetWindowExtEx);
GET_FUNC(SetWindowOrgEx);
GET_FUNC(SetWorldTransform);
GET_FUNC(StartDoc);
GET_FUNC(StartPage);
......@@ -483,8 +483,8 @@ const DC_FUNCTIONS null_driver =
NULL, /* pModifyWorldTransform */
nulldrv_MoveTo, /* pMoveTo */
nulldrv_OffsetClipRgn, /* pOffsetClipRgn */
NULL, /* pOffsetViewportOrg */
NULL, /* pOffsetWindowOrg */
nulldrv_OffsetViewportOrgEx, /* pOffsetViewportOrg */
nulldrv_OffsetWindowOrgEx, /* pOffsetWindowOrg */
nulldrv_PaintRgn, /* pPaintRgn */
NULL, /* pPatBlt */
nulldrv_Pie, /* pPie */
......@@ -503,8 +503,8 @@ const DC_FUNCTIONS null_driver =
NULL, /* pRestoreDC */
nulldrv_RoundRect, /* pRoundRect */
NULL, /* pSaveDC */
NULL, /* pScaleViewportExt */
NULL, /* pScaleWindowExt */
nulldrv_ScaleViewportExtEx, /* pScaleViewportExt */
nulldrv_ScaleWindowExtEx, /* pScaleWindowExt */
NULL, /* pSelectBitmap */
NULL, /* pSelectBrush */
NULL, /* pSelectClipPath */
......@@ -522,7 +522,7 @@ const DC_FUNCTIONS null_driver =
NULL, /* pSetDIBitsToDevice */
nulldrv_SetDeviceClipping, /* pSetDeviceClipping */
NULL, /* pSetDeviceGammaRamp */
NULL, /* pSetMapMode */
nulldrv_SetMapMode, /* pSetMapMode */
NULL, /* pSetMapperFlags */
nulldrv_SetPixel, /* pSetPixel */
NULL, /* pSetPixelFormat */
......@@ -534,10 +534,10 @@ const DC_FUNCTIONS null_driver =
NULL, /* pSetTextCharacterExtra */
NULL, /* pSetTextColor */
NULL, /* pSetTextJustification */
NULL, /* pSetViewportExt */
NULL, /* pSetViewportOrg */
NULL, /* pSetWindowExt */
NULL, /* pSetWindowOrg */
nulldrv_SetViewportExtEx, /* pSetViewportExt */
nulldrv_SetViewportOrgEx, /* pSetViewportOrg */
nulldrv_SetWindowExtEx, /* pSetWindowExt */
nulldrv_SetWindowOrgEx, /* pSetWindowOrg */
NULL, /* pSetWorldTransform */
nulldrv_StartDoc, /* pStartDoc */
nulldrv_StartPage, /* pStartPage */
......
......@@ -94,8 +94,8 @@ extern BOOL CDECL EMFDRV_LineTo( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN
extern BOOL CDECL EMFDRV_ModifyWorldTransform( PHYSDEV dev, const XFORM *xform, DWORD mode ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_MoveTo( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern INT CDECL EMFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern INT CDECL EMFDRV_OffsetViewportOrg( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern INT CDECL EMFDRV_OffsetWindowOrg( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_OffsetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_OffsetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_PaintRgn( PHYSDEV dev, HRGN hrgn ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_PatBlt( PHYSDEV dev, INT left, INT top,
INT width, INT height, DWORD rop ) DECLSPEC_HIDDEN;
......@@ -115,10 +115,10 @@ extern BOOL CDECL EMFDRV_RoundRect( PHYSDEV dev, INT left, INT top,
INT right, INT bottom, INT ell_width,
INT ell_height ) DECLSPEC_HIDDEN;
extern INT CDECL EMFDRV_SaveDC( PHYSDEV dev ) DECLSPEC_HIDDEN;
extern INT CDECL EMFDRV_ScaleViewportExt( PHYSDEV dev, INT xNum,
INT xDenom, INT yNum, INT yDenom ) DECLSPEC_HIDDEN;
extern INT CDECL EMFDRV_ScaleWindowExt( PHYSDEV dev, INT xNum, INT xDenom,
INT yNum, INT yDenom ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_ScaleViewportExtEx( PHYSDEV dev, INT xNum, INT xDenom,
INT yNum, INT yDenom, SIZE *size ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_ScaleWindowExtEx( PHYSDEV dev, INT xNum, INT xDenom,
INT yNum, INT yDenom, SIZE *size ) DECLSPEC_HIDDEN;
extern HBITMAP CDECL EMFDRV_SelectBitmap( PHYSDEV dev, HBITMAP handle ) DECLSPEC_HIDDEN;
extern HBRUSH CDECL EMFDRV_SelectBrush( PHYSDEV dev, HBRUSH handle ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_SelectClipPath( PHYSDEV dev, INT iMode ) DECLSPEC_HIDDEN;
......@@ -143,10 +143,10 @@ extern UINT CDECL EMFDRV_SetTextAlign( PHYSDEV dev, UINT align ) DECLSPEC_HI
extern COLORREF CDECL EMFDRV_SetTextColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_SetTextJustification( PHYSDEV dev, INT nBreakExtra,
INT nBreakCount ) DECLSPEC_HIDDEN;
extern INT CDECL EMFDRV_SetViewportExt( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern INT CDECL EMFDRV_SetViewportOrg( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern INT CDECL EMFDRV_SetWindowExt( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern INT CDECL EMFDRV_SetWindowOrg( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_SetViewportExtEx( PHYSDEV dev, INT x, INT y, SIZE *size ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_SetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_SetWindowExtEx( PHYSDEV dev, INT x, INT y, SIZE *size ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_SetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_SetWorldTransform( PHYSDEV dev, const XFORM *xform ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_StretchBlt( PHYSDEV devDst, INT xDst, INT yDst,
INT widthDst, INT heightDst,
......
......@@ -88,8 +88,8 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
EMFDRV_ModifyWorldTransform, /* pModifyWorldTransform */
EMFDRV_MoveTo, /* pMoveTo */
EMFDRV_OffsetClipRgn, /* pOffsetClipRgn */
EMFDRV_OffsetViewportOrg, /* pOffsetViewportOrg */
EMFDRV_OffsetWindowOrg, /* pOffsetWindowOrg */
EMFDRV_OffsetViewportOrgEx, /* pOffsetViewportOrgEx */
EMFDRV_OffsetWindowOrgEx, /* pOffsetWindowOrgEx */
EMFDRV_PaintRgn, /* pPaintRgn */
EMFDRV_PatBlt, /* pPatBlt */
EMFDRV_Pie, /* pPie */
......@@ -108,8 +108,8 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
EMFDRV_RestoreDC, /* pRestoreDC */
EMFDRV_RoundRect, /* pRoundRect */
EMFDRV_SaveDC, /* pSaveDC */
EMFDRV_ScaleViewportExt, /* pScaleViewportExt */
EMFDRV_ScaleWindowExt, /* pScaleWindowExt */
EMFDRV_ScaleViewportExtEx, /* pScaleViewportExtEx */
EMFDRV_ScaleWindowExtEx, /* pScaleWindowExtEx */
EMFDRV_SelectBitmap, /* pSelectBitmap */
EMFDRV_SelectBrush, /* pSelectBrush */
EMFDRV_SelectClipPath, /* pSelectClipPath */
......@@ -139,10 +139,10 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
NULL, /* pSetTextCharacterExtra */
EMFDRV_SetTextColor, /* pSetTextColor */
EMFDRV_SetTextJustification, /* pSetTextJustification */
EMFDRV_SetViewportExt, /* pSetViewportExt */
EMFDRV_SetViewportOrg, /* pSetViewportOrg */
EMFDRV_SetWindowExt, /* pSetWindowExt */
EMFDRV_SetWindowOrg, /* pSetWindowOrg */
EMFDRV_SetViewportExtEx, /* pSetViewportExtEx */
EMFDRV_SetViewportOrgEx, /* pSetViewportOrgEx */
EMFDRV_SetWindowExtEx, /* pSetWindowExtEx */
EMFDRV_SetWindowOrgEx, /* pSetWindowOrgEx */
EMFDRV_SetWorldTransform, /* pSetWorldTransform */
NULL, /* pStartDoc */
NULL, /* pStartPage */
......
......@@ -22,16 +22,19 @@
INT CDECL EMFDRV_SetMapMode( PHYSDEV dev, INT mode )
{
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetMapMode );
EMRSETMAPMODE emr;
emr.emr.iType = EMR_SETMAPMODE;
emr.emr.nSize = sizeof(emr);
emr.iMode = mode;
return EMFDRV_WriteRecord( dev, &emr.emr );
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return 0;
return next->funcs->pSetMapMode( next, mode );
}
INT CDECL EMFDRV_SetViewportExt( PHYSDEV dev, INT cx, INT cy )
BOOL CDECL EMFDRV_SetViewportExtEx( PHYSDEV dev, INT cx, INT cy, SIZE *size )
{
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetViewportExtEx );
EMRSETVIEWPORTEXTEX emr;
emr.emr.iType = EMR_SETVIEWPORTEXTEX;
......@@ -39,11 +42,13 @@ INT CDECL EMFDRV_SetViewportExt( PHYSDEV dev, INT cx, INT cy )
emr.szlExtent.cx = cx;
emr.szlExtent.cy = cy;
return EMFDRV_WriteRecord( dev, &emr.emr );
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return FALSE;
return next->funcs->pSetViewportExtEx( next, cx, cy, size );
}
INT CDECL EMFDRV_SetWindowExt( PHYSDEV dev, INT cx, INT cy )
BOOL CDECL EMFDRV_SetWindowExtEx( PHYSDEV dev, INT cx, INT cy, SIZE *size )
{
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetWindowExtEx );
EMRSETWINDOWEXTEX emr;
emr.emr.iType = EMR_SETWINDOWEXTEX;
......@@ -51,11 +56,13 @@ INT CDECL EMFDRV_SetWindowExt( PHYSDEV dev, INT cx, INT cy )
emr.szlExtent.cx = cx;
emr.szlExtent.cy = cy;
return EMFDRV_WriteRecord( dev, &emr.emr );
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return 0;
return next->funcs->pSetWindowExtEx( next, cx, cy, size );
}
INT CDECL EMFDRV_SetViewportOrg( PHYSDEV dev, INT x, INT y )
BOOL CDECL EMFDRV_SetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
{
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetViewportOrgEx );
EMRSETVIEWPORTORGEX emr;
emr.emr.iType = EMR_SETVIEWPORTORGEX;
......@@ -63,11 +70,13 @@ INT CDECL EMFDRV_SetViewportOrg( PHYSDEV dev, INT x, INT y )
emr.ptlOrigin.x = x;
emr.ptlOrigin.y = y;
return EMFDRV_WriteRecord( dev, &emr.emr );
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return 0;
return next->funcs->pSetViewportOrgEx( next, x, y, pt );
}
INT CDECL EMFDRV_SetWindowOrg( PHYSDEV dev, INT x, INT y )
BOOL CDECL EMFDRV_SetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
{
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetWindowOrgEx );
EMRSETWINDOWORGEX emr;
emr.emr.iType = EMR_SETWINDOWORGEX;
......@@ -75,12 +84,13 @@ INT CDECL EMFDRV_SetWindowOrg( PHYSDEV dev, INT x, INT y )
emr.ptlOrigin.x = x;
emr.ptlOrigin.y = y;
return EMFDRV_WriteRecord( dev, &emr.emr );
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return 0;
return next->funcs->pSetWindowOrgEx( next, x, y, pt );
}
INT CDECL EMFDRV_ScaleViewportExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
INT yDenom )
BOOL CDECL EMFDRV_ScaleViewportExtEx( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom, SIZE *size )
{
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pScaleViewportExtEx );
EMRSCALEVIEWPORTEXTEX emr;
emr.emr.iType = EMR_SCALEVIEWPORTEXTEX;
......@@ -90,12 +100,13 @@ INT CDECL EMFDRV_ScaleViewportExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
emr.yNum = yNum;
emr.yDenom = yDenom;
return EMFDRV_WriteRecord( dev, &emr.emr );
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return 0;
return next->funcs->pScaleViewportExtEx( next, xNum, xDenom, yNum, yDenom, size );
}
INT CDECL EMFDRV_ScaleWindowExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
INT yDenom )
BOOL CDECL EMFDRV_ScaleWindowExtEx( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom, SIZE *size )
{
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pScaleWindowExtEx );
EMRSCALEWINDOWEXTEX emr;
emr.emr.iType = EMR_SCALEWINDOWEXTEX;
......@@ -105,7 +116,8 @@ INT CDECL EMFDRV_ScaleWindowExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
emr.yNum = yNum;
emr.yDenom = yDenom;
return EMFDRV_WriteRecord( dev, &emr.emr );
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return 0;
return next->funcs->pScaleWindowExtEx( next, xNum, xDenom, yNum, yDenom, size );
}
BOOL CDECL EMFDRV_SetWorldTransform( PHYSDEV dev, const XFORM *xform)
......@@ -131,34 +143,36 @@ BOOL CDECL EMFDRV_ModifyWorldTransform( PHYSDEV dev, const XFORM *xform, DWORD m
return EMFDRV_WriteRecord( dev, &emr.emr );
}
INT CDECL EMFDRV_OffsetViewportOrg( PHYSDEV dev, INT x, INT y )
BOOL CDECL EMFDRV_OffsetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
{
POINT pt;
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pOffsetViewportOrgEx );
EMRSETVIEWPORTORGEX emr;
EMFDRV_PDEVICE* physDev = (EMFDRV_PDEVICE*)dev;
GetViewportOrgEx(physDev->hdc, &pt);
GetViewportOrgEx(physDev->hdc, pt);
emr.emr.iType = EMR_SETVIEWPORTORGEX;
emr.emr.nSize = sizeof(emr);
emr.ptlOrigin.x = pt.x + x;
emr.ptlOrigin.y = pt.y + y;
emr.ptlOrigin.x = pt->x + x;
emr.ptlOrigin.y = pt->y + y;
return EMFDRV_WriteRecord( dev, &emr.emr );
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return 0;
return next->funcs->pOffsetViewportOrgEx( next, x, y, pt );
}
INT CDECL EMFDRV_OffsetWindowOrg( PHYSDEV dev, INT x, INT y )
BOOL CDECL EMFDRV_OffsetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
{
POINT pt;
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pOffsetWindowOrgEx );
EMRSETWINDOWORGEX emr;
EMFDRV_PDEVICE* physDev = (EMFDRV_PDEVICE*)dev;
GetWindowOrgEx(physDev->hdc, &pt);
GetWindowOrgEx(physDev->hdc, pt);
emr.emr.iType = EMR_SETWINDOWORGEX;
emr.emr.nSize = sizeof(emr);
emr.ptlOrigin.x = pt.x + x;
emr.ptlOrigin.y = pt.y + y;
emr.ptlOrigin.x = pt->x + x;
emr.ptlOrigin.y = pt->y + y;
return EMFDRV_WriteRecord( dev, &emr.emr );
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return 0;
return next->funcs->pOffsetWindowOrgEx( next, x, y, pt );
}
......@@ -135,8 +135,8 @@ typedef struct tagDC_FUNCS
BOOL (CDECL *pModifyWorldTransform)(PHYSDEV,const XFORM*,DWORD);
BOOL (CDECL *pMoveTo)(PHYSDEV,INT,INT);
INT (CDECL *pOffsetClipRgn)(PHYSDEV,INT,INT);
INT (CDECL *pOffsetViewportOrg)(PHYSDEV,INT,INT);
INT (CDECL *pOffsetWindowOrg)(PHYSDEV,INT,INT);
BOOL (CDECL *pOffsetViewportOrgEx)(PHYSDEV,INT,INT,POINT*);
BOOL (CDECL *pOffsetWindowOrgEx)(PHYSDEV,INT,INT,POINT*);
BOOL (CDECL *pPaintRgn)(PHYSDEV,HRGN);
BOOL (CDECL *pPatBlt)(PHYSDEV,INT,INT,INT,INT,DWORD);
BOOL (CDECL *pPie)(PHYSDEV,INT,INT,INT,INT,INT,INT,INT,INT);
......@@ -155,8 +155,8 @@ typedef struct tagDC_FUNCS
BOOL (CDECL *pRestoreDC)(PHYSDEV,INT);
BOOL (CDECL *pRoundRect)(PHYSDEV,INT,INT,INT,INT,INT,INT);
INT (CDECL *pSaveDC)(PHYSDEV);
INT (CDECL *pScaleViewportExt)(PHYSDEV,INT,INT,INT,INT);
INT (CDECL *pScaleWindowExt)(PHYSDEV,INT,INT,INT,INT);
BOOL (CDECL *pScaleViewportExtEx)(PHYSDEV,INT,INT,INT,INT,SIZE*);
BOOL (CDECL *pScaleWindowExtEx)(PHYSDEV,INT,INT,INT,INT,SIZE*);
HBITMAP (CDECL *pSelectBitmap)(PHYSDEV,HBITMAP);
HBRUSH (CDECL *pSelectBrush)(PHYSDEV,HBRUSH);
BOOL (CDECL *pSelectClipPath)(PHYSDEV,INT);
......@@ -187,10 +187,10 @@ typedef struct tagDC_FUNCS
INT (CDECL *pSetTextCharacterExtra)(PHYSDEV,INT);
DWORD (CDECL *pSetTextColor)(PHYSDEV,DWORD);
INT (CDECL *pSetTextJustification)(PHYSDEV,INT,INT);
INT (CDECL *pSetViewportExt)(PHYSDEV,INT,INT);
INT (CDECL *pSetViewportOrg)(PHYSDEV,INT,INT);
INT (CDECL *pSetWindowExt)(PHYSDEV,INT,INT);
INT (CDECL *pSetWindowOrg)(PHYSDEV,INT,INT);
BOOL (CDECL *pSetViewportExtEx)(PHYSDEV,INT,INT,SIZE*);
BOOL (CDECL *pSetViewportOrgEx)(PHYSDEV,INT,INT,POINT*);
BOOL (CDECL *pSetWindowExtEx)(PHYSDEV,INT,INT,SIZE*);
BOOL (CDECL *pSetWindowOrgEx)(PHYSDEV,INT,INT,POINT*);
BOOL (CDECL *pSetWorldTransform)(PHYSDEV,const XFORM*);
INT (CDECL *pStartDoc)(PHYSDEV,const DOCINFOW*);
INT (CDECL *pStartPage)(PHYSDEV);
......@@ -521,10 +521,19 @@ extern BOOL CDECL nulldrv_FrameRgn( PHYSDEV dev, HRGN rgn, HBRUSH brush, INT wid
extern INT CDECL nulldrv_IntersectClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN;
extern BOOL CDECL nulldrv_InvertRgn( PHYSDEV dev, HRGN rgn ) DECLSPEC_HIDDEN;
extern INT CDECL nulldrv_OffsetClipRgn( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern BOOL CDECL nulldrv_OffsetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
extern BOOL CDECL nulldrv_OffsetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
extern BOOL CDECL nulldrv_PolyBezier( PHYSDEV dev, const POINT *points, DWORD count ) DECLSPEC_HIDDEN;
extern BOOL CDECL nulldrv_PolyBezierTo( PHYSDEV dev, const POINT *points, DWORD count ) DECLSPEC_HIDDEN;
extern BOOL CDECL nulldrv_PolyDraw( PHYSDEV dev, const POINT *points, const BYTE *types, DWORD count ) DECLSPEC_HIDDEN;
extern BOOL CDECL nulldrv_PolylineTo( PHYSDEV dev, const POINT *points, INT count ) DECLSPEC_HIDDEN;
extern BOOL CDECL nulldrv_ScaleViewportExtEx( PHYSDEV dev, INT x_num, INT x_denom, INT y_num, INT y_denom, SIZE *size ) DECLSPEC_HIDDEN;
extern BOOL CDECL nulldrv_ScaleWindowExtEx( PHYSDEV dev, INT x_num, INT x_denom, INT y_num, INT y_denom, SIZE *size ) DECLSPEC_HIDDEN;
extern INT CDECL nulldrv_SetMapMode( PHYSDEV dev, INT mode ) DECLSPEC_HIDDEN;
extern BOOL CDECL nulldrv_SetViewportExtEx( PHYSDEV dev, INT cx, INT cy, SIZE *size ) DECLSPEC_HIDDEN;
extern BOOL CDECL nulldrv_SetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
extern BOOL CDECL nulldrv_SetWindowExtEx( PHYSDEV dev, INT cx, INT cy, SIZE *size ) DECLSPEC_HIDDEN;
extern BOOL CDECL nulldrv_SetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
static inline DC *get_nulldrv_dc( PHYSDEV dev )
{
......
......@@ -86,8 +86,8 @@ static const DC_FUNCTIONS MFDRV_Funcs =
NULL, /* pModifyWorldTransform */
MFDRV_MoveTo, /* pMoveTo */
MFDRV_OffsetClipRgn, /* pOffsetClipRgn */
MFDRV_OffsetViewportOrg, /* pOffsetViewportOrg */
MFDRV_OffsetWindowOrg, /* pOffsetWindowOrg */
MFDRV_OffsetViewportOrgEx, /* pOffsetViewportOrgEx */
MFDRV_OffsetWindowOrgEx, /* pOffsetWindowOrgEx */
MFDRV_PaintRgn, /* pPaintRgn */
MFDRV_PatBlt, /* pPatBlt */
MFDRV_Pie, /* pPie */
......@@ -106,8 +106,8 @@ static const DC_FUNCTIONS MFDRV_Funcs =
MFDRV_RestoreDC, /* pRestoreDC */
MFDRV_RoundRect, /* pRoundRect */
MFDRV_SaveDC, /* pSaveDC */
MFDRV_ScaleViewportExt, /* pScaleViewportExt */
MFDRV_ScaleWindowExt, /* pScaleWindowExt */
MFDRV_ScaleViewportExtEx, /* pScaleViewportExtEx */
MFDRV_ScaleWindowExtEx, /* pScaleWindowExtEx */
MFDRV_SelectBitmap, /* pSelectBitmap */
MFDRV_SelectBrush, /* pSelectBrush */
MFDRV_SelectClipPath, /* pSelectClipPath */
......@@ -137,10 +137,10 @@ static const DC_FUNCTIONS MFDRV_Funcs =
MFDRV_SetTextCharacterExtra, /* pSetTextCharacterExtra */
MFDRV_SetTextColor, /* pSetTextColor */
MFDRV_SetTextJustification, /* pSetTextJustification */
MFDRV_SetViewportExt, /* pSetViewportExt */
MFDRV_SetViewportOrg, /* pSetViewportOrg */
MFDRV_SetWindowExt, /* pSetWindowExt */
MFDRV_SetWindowOrg, /* pSetWindowOrg */
MFDRV_SetViewportExtEx, /* pSetViewportExtEx */
MFDRV_SetViewportOrgEx, /* pSetViewportOrgEx */
MFDRV_SetWindowExtEx, /* pSetWindowExtEx */
MFDRV_SetWindowOrgEx, /* pSetWindowOrgEx */
NULL, /* pSetWorldTransform */
NULL, /* pStartDoc */
NULL, /* pStartPage */
......
......@@ -31,95 +31,77 @@
*/
INT CDECL MFDRV_SetMapMode( PHYSDEV dev, INT mode )
{
if(!MFDRV_MetaParam1( dev, META_SETMAPMODE, mode ))
return FALSE;
return GDI_NO_MORE_WORK;
return MFDRV_MetaParam1( dev, META_SETMAPMODE, mode );
}
/***********************************************************************
* MFDRV_SetViewportExt
* MFDRV_SetViewportExtEx
*/
INT CDECL MFDRV_SetViewportExt( PHYSDEV dev, INT x, INT y )
BOOL CDECL MFDRV_SetViewportExtEx( PHYSDEV dev, INT x, INT y, SIZE *size )
{
if(!MFDRV_MetaParam2( dev, META_SETVIEWPORTEXT, x, y ))
return FALSE;
return GDI_NO_MORE_WORK;
return MFDRV_MetaParam2( dev, META_SETVIEWPORTEXT, x, y );
}
/***********************************************************************
* MFDRV_SetViewportOrg
* MFDRV_SetViewportOrgEx
*/
INT CDECL MFDRV_SetViewportOrg( PHYSDEV dev, INT x, INT y )
BOOL CDECL MFDRV_SetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
{
if(!MFDRV_MetaParam2( dev, META_SETVIEWPORTORG, x, y ))
return FALSE;
return GDI_NO_MORE_WORK;
return MFDRV_MetaParam2( dev, META_SETVIEWPORTORG, x, y );
}
/***********************************************************************
* MFDRV_SetWindowExt
* MFDRV_SetWindowExtEx
*/
INT CDECL MFDRV_SetWindowExt( PHYSDEV dev, INT x, INT y )
BOOL CDECL MFDRV_SetWindowExtEx( PHYSDEV dev, INT x, INT y, SIZE *size )
{
if(!MFDRV_MetaParam2( dev, META_SETWINDOWEXT, x, y ))
return FALSE;
return GDI_NO_MORE_WORK;
return MFDRV_MetaParam2( dev, META_SETWINDOWEXT, x, y );
}
/***********************************************************************
* MFDRV_SetWindowOrg
* MFDRV_SetWindowOrgEx
*/
INT CDECL MFDRV_SetWindowOrg( PHYSDEV dev, INT x, INT y )
BOOL CDECL MFDRV_SetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
{
if(!MFDRV_MetaParam2( dev, META_SETWINDOWORG, x, y ))
return FALSE;
return GDI_NO_MORE_WORK;
return MFDRV_MetaParam2( dev, META_SETWINDOWORG, x, y );
}
/***********************************************************************
* MFDRV_OffsetViewportOrg
* MFDRV_OffsetViewportOrgEx
*/
INT CDECL MFDRV_OffsetViewportOrg( PHYSDEV dev, INT x, INT y )
BOOL CDECL MFDRV_OffsetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
{
if(!MFDRV_MetaParam2( dev, META_OFFSETVIEWPORTORG, x, y ))
return FALSE;
return GDI_NO_MORE_WORK;
return MFDRV_MetaParam2( dev, META_OFFSETVIEWPORTORG, x, y );
}
/***********************************************************************
* MFDRV_OffsetWindowOrg
* MFDRV_OffsetWindowOrgEx
*/
INT CDECL MFDRV_OffsetWindowOrg( PHYSDEV dev, INT x, INT y )
BOOL CDECL MFDRV_OffsetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt )
{
if(!MFDRV_MetaParam2( dev, META_OFFSETWINDOWORG, x, y ))
return FALSE;
return GDI_NO_MORE_WORK;
return MFDRV_MetaParam2( dev, META_OFFSETWINDOWORG, x, y );
}
/***********************************************************************
* MFDRV_ScaleViewportExt
* MFDRV_ScaleViewportExtEx
*/
INT CDECL MFDRV_ScaleViewportExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom )
BOOL CDECL MFDRV_ScaleViewportExtEx( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom, SIZE *size )
{
if(!MFDRV_MetaParam4( dev, META_SCALEVIEWPORTEXT, xNum, xDenom, yNum, yDenom ))
return FALSE;
return GDI_NO_MORE_WORK;
return MFDRV_MetaParam4( dev, META_SCALEVIEWPORTEXT, xNum, xDenom, yNum, yDenom );
}
/***********************************************************************
* MFDRV_ScaleWindowExt
* MFDRV_ScaleWindowExtEx
*/
INT CDECL MFDRV_ScaleWindowExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom )
BOOL CDECL MFDRV_ScaleWindowExtEx( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom, SIZE *size )
{
if(!MFDRV_MetaParam4( dev, META_SCALEWINDOWEXT, xNum, xDenom, yNum, yDenom ))
return FALSE;
return GDI_NO_MORE_WORK;
return MFDRV_MetaParam4( dev, META_SCALEWINDOWEXT, xNum, xDenom, yNum, yDenom );
}
......@@ -92,8 +92,8 @@ extern BOOL CDECL MFDRV_InvertRgn( PHYSDEV dev, HRGN hrgn ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_LineTo( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_MoveTo( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern INT CDECL MFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern INT CDECL MFDRV_OffsetViewportOrg( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern INT CDECL MFDRV_OffsetWindowOrg( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_OffsetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_OffsetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_PaintRgn( PHYSDEV dev, HRGN hrgn ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_PatBlt( PHYSDEV dev, INT left, INT top, INT width, INT height,
DWORD rop ) DECLSPEC_HIDDEN;
......@@ -113,10 +113,10 @@ extern BOOL CDECL MFDRV_RoundRect( PHYSDEV dev, INT left, INT top,
INT right, INT bottom, INT ell_width,
INT ell_height ) DECLSPEC_HIDDEN;
extern INT CDECL MFDRV_SaveDC( PHYSDEV dev ) DECLSPEC_HIDDEN;
extern INT CDECL MFDRV_ScaleViewportExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
INT yDenom ) DECLSPEC_HIDDEN;
extern INT CDECL MFDRV_ScaleWindowExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
INT yDenom ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_ScaleViewportExtEx( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
INT yDenom, SIZE *size ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_ScaleWindowExtEx( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
INT yDenom, SIZE *size ) DECLSPEC_HIDDEN;
extern HBITMAP CDECL MFDRV_SelectBitmap( PHYSDEV dev, HBITMAP handle ) DECLSPEC_HIDDEN;
extern HBRUSH CDECL MFDRV_SelectBrush( PHYSDEV dev, HBRUSH handle ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_SelectClipPath( PHYSDEV dev, INT iMode ) DECLSPEC_HIDDEN;
......@@ -137,10 +137,10 @@ extern UINT CDECL MFDRV_SetTextAlign( PHYSDEV dev, UINT align ) DECLSPEC_HIDDEN
extern INT CDECL MFDRV_SetTextCharacterExtra( PHYSDEV dev, INT extra ) DECLSPEC_HIDDEN;
extern COLORREF CDECL MFDRV_SetTextColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
extern INT CDECL MFDRV_SetTextJustification( PHYSDEV dev, INT extra, INT breaks ) DECLSPEC_HIDDEN;
extern INT CDECL MFDRV_SetViewportExt( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern INT CDECL MFDRV_SetViewportOrg( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern INT CDECL MFDRV_SetWindowExt( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern INT CDECL MFDRV_SetWindowOrg( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_SetViewportExtEx( PHYSDEV dev, INT x, INT y, SIZE *size ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_SetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_SetWindowExtEx( PHYSDEV dev, INT x, INT y, SIZE *size ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_SetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_StretchBlt( PHYSDEV devDst, INT xDst, INT yDst, INT widthDst,
INT heightDst, PHYSDEV devSrc, INT xSrc, INT ySrc,
INT widthSrc, INT heightSrc, DWORD rop ) DECLSPEC_HIDDEN;
......
......@@ -846,10 +846,18 @@ static void test_mf_SaveDC(void)
/* Need to write something to the emf, otherwise Windows won't play it back */
LineTo(hdcMetafile, 150, 150);
SetWindowOrgEx(hdcMetafile, 0, 0, NULL);
SetViewportOrgEx(hdcMetafile, 0, 0, NULL);
SetWindowExtEx(hdcMetafile, 110, 110, NULL );
SetViewportExtEx(hdcMetafile, 120, 120, NULL );
pt.x = pt.y = 5555;
SetWindowOrgEx(hdcMetafile, 0, 0, &pt);
ok( pt.x == 5555 && pt.y == 5555, "wrong origin %d,%d\n", pt.x, pt.y);
pt.x = pt.y = 5555;
SetViewportOrgEx(hdcMetafile, 0, 0, &pt);
ok( pt.x == 5555 && pt.y == 5555, "wrong origin %d,%d\n", pt.x, pt.y);
size.cx = size.cy = 5555;
SetWindowExtEx(hdcMetafile, 110, 110, &size );
ok( size.cx == 5555 && size.cy == 5555, "wrong size %d,%d\n", size.cx, size.cy );
size.cx = size.cy = 5555;
SetViewportExtEx(hdcMetafile, 120, 120, &size );
ok( size.cx == 5555 && size.cy == 5555, "wrong size %d,%d\n", size.cx, size.cy );
/* Force Win9x to update DC state */
SetPixelV(hdcMetafile, 50, 50, 0);
......
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