Francois Gouget : gdi32: Move MFDRV_{ExtEscape, GetDeviceCaps}() up and make them static.
Alexandre Julliard
julliard at winehq.org
Wed May 25 11:28:18 CDT 2011
Module: wine
Branch: master
Commit: f62ca752e9c6cdf38da4d1eec333cbf522a9ef5a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f62ca752e9c6cdf38da4d1eec333cbf522a9ef5a
Author: Francois Gouget <fgouget at free.fr>
Date: Wed May 25 11:09:07 2011 +0200
gdi32: Move MFDRV_{ExtEscape,GetDeviceCaps}() up and make them static.
---
dlls/gdi32/mfdrv/init.c | 91 ++++++++++++++++++++--------------------
dlls/gdi32/mfdrv/metafiledrv.h | 3 -
2 files changed, 46 insertions(+), 48 deletions(-)
diff --git a/dlls/gdi32/mfdrv/init.c b/dlls/gdi32/mfdrv/init.c
index cba26eb..a8ecf3f 100644
--- a/dlls/gdi32/mfdrv/init.c
+++ b/dlls/gdi32/mfdrv/init.c
@@ -32,6 +32,52 @@ WINE_DEFAULT_DEBUG_CHANNEL(metafile);
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 =
{
NULL, /* pAbortDoc */
@@ -533,48 +579,3 @@ BOOL MFDRV_MetaParam8(PHYSDEV dev, short func, short param1, short param2,
*(mr->rdParm + 7) = param1;
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;
-}
diff --git a/dlls/gdi32/mfdrv/metafiledrv.h b/dlls/gdi32/mfdrv/metafiledrv.h
index 296cb47..a5e0605 100644
--- a/dlls/gdi32/mfdrv/metafiledrv.h
+++ b/dlls/gdi32/mfdrv/metafiledrv.h
@@ -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 INT CDECL MFDRV_ExcludeClipRect( PHYSDEV dev, INT left, INT top, INT right,
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 INT CDECL MFDRV_ExtSelectClipRgn( PHYSDEV dev, HRGN hrgn, INT mode ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_ExtTextOut( PHYSDEV dev, INT x, INT y,
@@ -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_FlattenPath( PHYSDEV dev ) 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 BOOL CDECL MFDRV_InvertRgn( PHYSDEV dev, HRGN hrgn ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_LineTo( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
More information about the wine-cvs
mailing list