Jacek Caban : gdi32: Merge mfdrv/dc.c into metadc.c.

Alexandre Julliard julliard at winehq.org
Wed Aug 18 16:22:09 CDT 2021


Module: wine
Branch: master
Commit: 1b86e52ec465942602997eb0410f2f6931487f9e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=1b86e52ec465942602997eb0410f2f6931487f9e

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Aug 18 11:56:51 2021 +0200

gdi32: Merge mfdrv/dc.c into metadc.c.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdi32/Makefile.in |   1 -
 dlls/gdi32/metadc.c    | 130 ++++++++++++++++++++++++++++++++++++++++++
 dlls/gdi32/mfdrv/dc.c  | 151 -------------------------------------------------
 3 files changed, 130 insertions(+), 152 deletions(-)

diff --git a/dlls/gdi32/Makefile.in b/dlls/gdi32/Makefile.in
index 633def9c6c2..cab0623a56c 100644
--- a/dlls/gdi32/Makefile.in
+++ b/dlls/gdi32/Makefile.in
@@ -38,7 +38,6 @@ C_SRCS = \
 	metadc.c \
 	metafile.c \
 	mfdrv/bitblt.c \
-	mfdrv/dc.c \
 	mfdrv/graphics.c \
 	mfdrv/objects.c \
 	mfdrv/text.c \
diff --git a/dlls/gdi32/metadc.c b/dlls/gdi32/metadc.c
index 324fe7e2535..903b80854c4 100644
--- a/dlls/gdi32/metadc.c
+++ b/dlls/gdi32/metadc.c
@@ -167,6 +167,136 @@ BOOL metadc_param8( HDC hdc, short func, short param1, short param2,
     return metadc_record( hdc, mr, sizeof(buffer) );
 }
 
+BOOL METADC_SaveDC( HDC hdc )
+{
+    return metadc_param0( hdc, META_SAVEDC );
+}
+
+BOOL METADC_RestoreDC( HDC hdc, INT level )
+{
+    return metadc_param1( hdc, META_RESTOREDC, level );
+}
+
+BOOL METADC_SetTextAlign( HDC hdc, UINT align )
+{
+    return metadc_param2( hdc, META_SETTEXTALIGN, HIWORD(align), LOWORD(align) );
+}
+
+BOOL METADC_SetBkMode( HDC hdc, INT mode )
+{
+    return metadc_param1( hdc, META_SETBKMODE, (WORD)mode );
+}
+
+BOOL METADC_SetBkColor( HDC hdc, COLORREF color )
+{
+    return metadc_param2( hdc, META_SETBKCOLOR, HIWORD(color), LOWORD(color) );
+}
+
+BOOL METADC_SetTextColor( HDC hdc, COLORREF color )
+{
+    return metadc_param2( hdc, META_SETTEXTCOLOR, HIWORD(color), LOWORD(color) );
+}
+
+BOOL METADC_SetROP2( HDC hdc, INT rop )
+{
+    return metadc_param1( hdc, META_SETROP2, (WORD)rop );
+}
+
+BOOL METADC_SetRelAbs( HDC hdc, INT mode )
+{
+    return metadc_param1( hdc, META_SETRELABS, (WORD)mode );
+}
+
+BOOL METADC_SetPolyFillMode( HDC hdc, INT mode )
+{
+    return metadc_param1( hdc, META_SETPOLYFILLMODE, mode );
+}
+
+BOOL METADC_SetStretchBltMode( HDC hdc, INT mode )
+{
+    return metadc_param1( hdc, META_SETSTRETCHBLTMODE, mode );
+}
+
+BOOL METADC_IntersectClipRect( HDC hdc, INT left, INT top, INT right, INT bottom )
+{
+    return metadc_param4( hdc, META_INTERSECTCLIPRECT, left, top, right, bottom );
+}
+
+BOOL METADC_ExcludeClipRect( HDC hdc, INT left, INT top, INT right, INT bottom )
+{
+    return metadc_param4( hdc, META_EXCLUDECLIPRECT, left, top, right, bottom );
+}
+
+BOOL METADC_OffsetClipRgn( HDC hdc, INT x, INT y )
+{
+    return metadc_param2( hdc, META_OFFSETCLIPRGN, x, y );
+}
+
+BOOL METADC_SetLayout( HDC hdc, DWORD layout )
+{
+    return metadc_param2( hdc, META_SETLAYOUT, HIWORD(layout), LOWORD(layout) );
+}
+
+BOOL METADC_SetMapMode( HDC hdc, INT mode )
+{
+    return metadc_param1( hdc, META_SETMAPMODE, mode );
+}
+
+BOOL METADC_SetViewportExtEx( HDC hdc, INT x, INT y )
+{
+    return metadc_param2( hdc, META_SETVIEWPORTEXT, x, y );
+}
+
+BOOL METADC_SetViewportOrgEx( HDC hdc, INT x, INT y )
+{
+    return metadc_param2( hdc, META_SETVIEWPORTORG, x, y );
+}
+
+BOOL METADC_SetWindowExtEx( HDC hdc, INT x, INT y )
+{
+    return metadc_param2( hdc, META_SETWINDOWEXT, x, y );
+}
+
+BOOL METADC_SetWindowOrgEx( HDC hdc, INT x, INT y )
+{
+    return metadc_param2( hdc, META_SETWINDOWORG, x, y );
+}
+
+BOOL METADC_OffsetViewportOrgEx( HDC hdc, INT x, INT y )
+{
+    return metadc_param2( hdc, META_OFFSETVIEWPORTORG, x, y );
+}
+
+BOOL METADC_OffsetWindowOrgEx( HDC hdc, INT x, INT y )
+{
+    return metadc_param2( hdc, META_OFFSETWINDOWORG, x, y );
+}
+
+BOOL METADC_ScaleViewportExtEx( HDC hdc, INT x_num, INT x_denom, INT y_num, INT y_denom )
+{
+    return metadc_param4( hdc, META_SCALEVIEWPORTEXT, x_num, x_denom, y_num, y_denom );
+}
+
+BOOL METADC_ScaleWindowExtEx( HDC hdc, INT x_num, INT x_denom, INT y_num, INT y_denom )
+{
+    return metadc_param4( hdc, META_SCALEWINDOWEXT, x_num, x_denom, y_num, y_denom );
+}
+
+BOOL METADC_SetTextJustification( HDC hdc, INT extra, INT breaks )
+{
+    return metadc_param2( hdc, META_SETTEXTJUSTIFICATION, extra, breaks );
+}
+
+BOOL METADC_SetTextCharacterExtra( HDC hdc, INT extra )
+{
+    return metadc_param1( hdc, META_SETTEXTCHAREXTRA, extra );
+}
+
+BOOL METADC_SetMapperFlags( HDC hdc, DWORD flags )
+{
+    return metadc_param2( hdc, META_SETMAPPERFLAGS, HIWORD(flags), LOWORD(flags) );
+}
+
 BOOL METADC_ExtEscape( HDC hdc, INT escape, INT input_size, const void *input,
                        INT output_size, void *output )
 {
diff --git a/dlls/gdi32/mfdrv/dc.c b/dlls/gdi32/mfdrv/dc.c
deleted file mode 100644
index 1fe36127676..00000000000
--- a/dlls/gdi32/mfdrv/dc.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * MetaFile driver DC value functions
- *
- * Copyright 1999 Huw D M Davies
- *
- * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#include "mfdrv/metafiledrv.h"
-
-BOOL METADC_SaveDC( HDC hdc )
-{
-    return metadc_param0( hdc, META_SAVEDC );
-}
-
-BOOL METADC_RestoreDC( HDC hdc, INT level )
-{
-    return metadc_param1( hdc, META_RESTOREDC, level );
-}
-
-BOOL METADC_SetTextAlign( HDC hdc, UINT align )
-{
-    return metadc_param2( hdc, META_SETTEXTALIGN, HIWORD(align), LOWORD(align) );
-}
-
-BOOL METADC_SetBkMode( HDC hdc, INT mode )
-{
-    return metadc_param1( hdc, META_SETBKMODE, (WORD)mode );
-}
-
-BOOL METADC_SetBkColor( HDC hdc, COLORREF color )
-{
-    return metadc_param2( hdc, META_SETBKCOLOR, HIWORD(color), LOWORD(color) );
-}
-
-BOOL METADC_SetTextColor( HDC hdc, COLORREF color )
-{
-    return metadc_param2( hdc, META_SETTEXTCOLOR, HIWORD(color), LOWORD(color) );
-}
-
-BOOL METADC_SetROP2( HDC hdc, INT rop )
-{
-    return metadc_param1( hdc, META_SETROP2, (WORD)rop );
-}
-
-BOOL METADC_SetRelAbs( HDC hdc, INT mode )
-{
-    return metadc_param1( hdc, META_SETRELABS, (WORD)mode );
-}
-
-BOOL METADC_SetPolyFillMode( HDC hdc, INT mode )
-{
-    return metadc_param1( hdc, META_SETPOLYFILLMODE, mode );
-}
-
-BOOL METADC_SetStretchBltMode( HDC hdc, INT mode )
-{
-    return metadc_param1( hdc, META_SETSTRETCHBLTMODE, mode );
-}
-
-BOOL METADC_IntersectClipRect( HDC hdc, INT left, INT top, INT right, INT bottom )
-{
-    return metadc_param4( hdc, META_INTERSECTCLIPRECT, left, top, right, bottom );
-}
-
-BOOL METADC_ExcludeClipRect( HDC hdc, INT left, INT top, INT right, INT bottom )
-{
-    return metadc_param4( hdc, META_EXCLUDECLIPRECT, left, top, right, bottom );
-}
-
-BOOL METADC_OffsetClipRgn( HDC hdc, INT x, INT y )
-{
-    return metadc_param2( hdc, META_OFFSETCLIPRGN, x, y );
-}
-
-BOOL METADC_SetLayout( HDC hdc, DWORD layout )
-{
-    return metadc_param2( hdc, META_SETLAYOUT, HIWORD(layout), LOWORD(layout) );
-}
-
-BOOL METADC_SetMapMode( HDC hdc, INT mode )
-{
-    return metadc_param1( hdc, META_SETMAPMODE, mode );
-}
-
-BOOL METADC_SetViewportExtEx( HDC hdc, INT x, INT y )
-{
-    return metadc_param2( hdc, META_SETVIEWPORTEXT, x, y );
-}
-
-BOOL METADC_SetViewportOrgEx( HDC hdc, INT x, INT y )
-{
-    return metadc_param2( hdc, META_SETVIEWPORTORG, x, y );
-}
-
-BOOL METADC_SetWindowExtEx( HDC hdc, INT x, INT y )
-{
-    return metadc_param2( hdc, META_SETWINDOWEXT, x, y );
-}
-
-BOOL METADC_SetWindowOrgEx( HDC hdc, INT x, INT y )
-{
-    return metadc_param2( hdc, META_SETWINDOWORG, x, y );
-}
-
-BOOL METADC_OffsetViewportOrgEx( HDC hdc, INT x, INT y )
-{
-    return metadc_param2( hdc, META_OFFSETVIEWPORTORG, x, y );
-}
-
-BOOL METADC_OffsetWindowOrgEx( HDC hdc, INT x, INT y )
-{
-    return metadc_param2( hdc, META_OFFSETWINDOWORG, x, y );
-}
-
-BOOL METADC_ScaleViewportExtEx( HDC hdc, INT x_num, INT x_denom, INT y_num, INT y_denom )
-{
-    return metadc_param4( hdc, META_SCALEVIEWPORTEXT, x_num, x_denom, y_num, y_denom );
-}
-
-BOOL METADC_ScaleWindowExtEx( HDC hdc, INT x_num, INT x_denom, INT y_num, INT y_denom )
-{
-    return metadc_param4( hdc, META_SCALEWINDOWEXT, x_num, x_denom, y_num, y_denom );
-}
-
-BOOL METADC_SetTextJustification( HDC hdc, INT extra, INT breaks )
-{
-    return metadc_param2( hdc, META_SETTEXTJUSTIFICATION, extra, breaks );
-}
-
-BOOL METADC_SetTextCharacterExtra( HDC hdc, INT extra )
-{
-    return metadc_param1( hdc, META_SETTEXTCHAREXTRA, extra );
-}
-
-BOOL METADC_SetMapperFlags( HDC hdc, DWORD flags )
-{
-    return metadc_param2( hdc, META_SETMAPPERFLAGS, HIWORD(flags), LOWORD(flags) );
-}




More information about the wine-cvs mailing list