Commit f62ca752 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

gdi32: Move MFDRV_{ExtEscape,GetDeviceCaps}() up and make them static.

parent 4d003283
...@@ -32,6 +32,52 @@ WINE_DEFAULT_DEBUG_CHANNEL(metafile); ...@@ -32,6 +32,52 @@ WINE_DEFAULT_DEBUG_CHANNEL(metafile);
static BOOL CDECL MFDRV_DeleteDC( PHYSDEV dev ); static BOOL CDECL MFDRV_DeleteDC( PHYSDEV dev );
/**********************************************************************
* MFDRV_ExtEscape
*/
static INT CDECL MFDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_data,
INT cbOutput, LPVOID out_data )
{
METARECORD *mr;
DWORD len;
INT ret;
if (cbOutput) return 0; /* escapes that require output cannot work in metafiles */
len = sizeof(*mr) + sizeof(WORD) + ((cbInput + 1) & ~1);
mr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
mr->rdSize = len / 2;
mr->rdFunction = META_ESCAPE;
mr->rdParm[0] = nEscape;
mr->rdParm[1] = cbInput;
memcpy(&(mr->rdParm[2]), in_data, cbInput);
ret = MFDRV_WriteRecord( dev, mr, len);
HeapFree(GetProcessHeap(), 0, mr);
return ret;
}
/******************************************************************
* MFDRV_GetDeviceCaps
*
*A very simple implementation that returns DT_METAFILE
*/
static INT CDECL MFDRV_GetDeviceCaps(PHYSDEV dev, INT cap)
{
switch(cap)
{
case TECHNOLOGY:
return DT_METAFILE;
case TEXTCAPS:
return 0;
default:
TRACE(" unsupported capability %d, will return 0\n", cap );
}
return 0;
}
static const DC_FUNCTIONS MFDRV_Funcs = static const DC_FUNCTIONS MFDRV_Funcs =
{ {
NULL, /* pAbortDoc */ NULL, /* pAbortDoc */
...@@ -533,48 +579,3 @@ BOOL MFDRV_MetaParam8(PHYSDEV dev, short func, short param1, short param2, ...@@ -533,48 +579,3 @@ BOOL MFDRV_MetaParam8(PHYSDEV dev, short func, short param1, short param2,
*(mr->rdParm + 7) = param1; *(mr->rdParm + 7) = param1;
return MFDRV_WriteRecord( dev, mr, mr->rdSize * 2); return MFDRV_WriteRecord( dev, mr, mr->rdSize * 2);
} }
/**********************************************************************
* MFDRV_ExtEscape
*/
INT CDECL MFDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_data,
INT cbOutput, LPVOID out_data )
{
METARECORD *mr;
DWORD len;
INT ret;
if (cbOutput) return 0; /* escapes that require output cannot work in metafiles */
len = sizeof(*mr) + sizeof(WORD) + ((cbInput + 1) & ~1);
mr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
mr->rdSize = len / 2;
mr->rdFunction = META_ESCAPE;
mr->rdParm[0] = nEscape;
mr->rdParm[1] = cbInput;
memcpy(&(mr->rdParm[2]), in_data, cbInput);
ret = MFDRV_WriteRecord( dev, mr, len);
HeapFree(GetProcessHeap(), 0, mr);
return ret;
}
/******************************************************************
* MFDRV_GetDeviceCaps
*
*A very simple implementation that returns DT_METAFILE
*/
INT CDECL MFDRV_GetDeviceCaps(PHYSDEV dev, INT cap)
{
switch(cap)
{
case TECHNOLOGY:
return DT_METAFILE;
case TEXTCAPS:
return 0;
default:
TRACE(" unsupported capability %d, will return 0\n", cap );
}
return 0;
}
...@@ -74,8 +74,6 @@ extern BOOL CDECL MFDRV_Ellipse( PHYSDEV dev, INT left, INT top, ...@@ -74,8 +74,6 @@ extern BOOL CDECL MFDRV_Ellipse( PHYSDEV dev, INT left, INT top,
extern BOOL CDECL MFDRV_EndPath( PHYSDEV dev ) DECLSPEC_HIDDEN; extern BOOL CDECL MFDRV_EndPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
extern INT CDECL MFDRV_ExcludeClipRect( PHYSDEV dev, INT left, INT top, INT right, extern INT CDECL MFDRV_ExcludeClipRect( PHYSDEV dev, INT left, INT top, INT right,
INT bottom ) DECLSPEC_HIDDEN; INT bottom ) DECLSPEC_HIDDEN;
extern INT CDECL MFDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_data,
INT cbOutput, LPVOID out_data ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT fillType ) DECLSPEC_HIDDEN; extern BOOL CDECL MFDRV_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT fillType ) DECLSPEC_HIDDEN;
extern INT CDECL MFDRV_ExtSelectClipRgn( PHYSDEV dev, HRGN hrgn, INT mode ) DECLSPEC_HIDDEN; extern INT CDECL MFDRV_ExtSelectClipRgn( PHYSDEV dev, HRGN hrgn, INT mode ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_ExtTextOut( PHYSDEV dev, INT x, INT y, extern BOOL CDECL MFDRV_ExtTextOut( PHYSDEV dev, INT x, INT y,
...@@ -85,7 +83,6 @@ extern BOOL CDECL MFDRV_FillPath( PHYSDEV dev ) DECLSPEC_HIDDEN; ...@@ -85,7 +83,6 @@ extern BOOL CDECL MFDRV_FillPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_FillRgn( PHYSDEV dev, HRGN hrgn, HBRUSH hbrush ) DECLSPEC_HIDDEN; extern BOOL CDECL MFDRV_FillRgn( PHYSDEV dev, HRGN hrgn, HBRUSH hbrush ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_FlattenPath( PHYSDEV dev ) DECLSPEC_HIDDEN; extern BOOL CDECL MFDRV_FlattenPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_FrameRgn( PHYSDEV dev, HRGN hrgn, HBRUSH hbrush, INT x, INT y ) DECLSPEC_HIDDEN; extern BOOL CDECL MFDRV_FrameRgn( PHYSDEV dev, HRGN hrgn, HBRUSH hbrush, INT x, INT y ) DECLSPEC_HIDDEN;
extern INT CDECL MFDRV_GetDeviceCaps( PHYSDEV dev , INT cap ) DECLSPEC_HIDDEN;
extern INT CDECL MFDRV_IntersectClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN; extern INT CDECL MFDRV_IntersectClipRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_InvertRgn( PHYSDEV dev, HRGN hrgn ) DECLSPEC_HIDDEN; 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_LineTo( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
......
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