Jacek Caban : gdi32: Introduce NtGdiLineTo.

Alexandre Julliard julliard at winehq.org
Mon Jul 19 15:59:15 CDT 2021


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Sat Jul 17 16:56:39 2021 +0200

gdi32: Introduce NtGdiLineTo.

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/gdi_private.h |  6 ++++++
 dlls/gdi32/gdidc.c       | 35 +++++++++++++++++++++++++++++++++++
 dlls/gdi32/objects.c     |  6 +-----
 dlls/gdi32/painting.c    |  6 ++----
 5 files changed, 45 insertions(+), 9 deletions(-)

diff --git a/dlls/gdi32/Makefile.in b/dlls/gdi32/Makefile.in
index 1bf6a4fa711..4132c511a4e 100644
--- a/dlls/gdi32/Makefile.in
+++ b/dlls/gdi32/Makefile.in
@@ -31,6 +31,7 @@ C_SRCS = \
 	enhmfdrv/objects.c \
 	font.c \
 	freetype.c \
+	gdidc.c \
 	gdiobj.c \
 	icm.c \
 	mapping.c \
diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h
index db33f33110f..8db78190d5f 100644
--- a/dlls/gdi32/gdi_private.h
+++ b/dlls/gdi32/gdi_private.h
@@ -22,6 +22,12 @@
 #ifndef __WINE_GDI_PRIVATE_H
 #define __WINE_GDI_PRIVATE_H
 
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "ntgdi.h"
+
 void set_gdi_client_ptr( HGDIOBJ handle, void *ptr ) DECLSPEC_HIDDEN;
 void *get_gdi_client_ptr( HGDIOBJ handle, WORD type ) DECLSPEC_HIDDEN;
 
diff --git a/dlls/gdi32/gdidc.c b/dlls/gdi32/gdidc.c
new file mode 100644
index 00000000000..e1becbee3a4
--- /dev/null
+++ b/dlls/gdi32/gdidc.c
@@ -0,0 +1,35 @@
+/*
+ * GDI Device Context functions
+ *
+ * Copyright 1993, 1994 Alexandre Julliard
+ * Copyright 1997 Bertho A. Stultiens
+ *           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 "gdi_private.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(gdi);
+
+/***********************************************************************
+ *           LineTo    (GDI32.@)
+ */
+BOOL WINAPI LineTo( HDC hdc, INT x, INT y )
+{
+    TRACE( "%p, (%d, %d)\n", hdc, x, y );
+    return NtGdiLineTo( hdc, x, y );
+}
diff --git a/dlls/gdi32/objects.c b/dlls/gdi32/objects.c
index 63a79255224..e5aafc1fed4 100644
--- a/dlls/gdi32/objects.c
+++ b/dlls/gdi32/objects.c
@@ -19,12 +19,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-
-#include "windef.h"
-#include "winbase.h"
+#include "gdi_private.h"
 #include "winnls.h"
-#include "ntgdi.h"
 #include "winternl.h"
 
 #include "wine/debug.h"
diff --git a/dlls/gdi32/painting.c b/dlls/gdi32/painting.c
index 3f77650259f..fc83949d67c 100644
--- a/dlls/gdi32/painting.c
+++ b/dlls/gdi32/painting.c
@@ -226,16 +226,14 @@ BOOL CDECL nulldrv_PolylineTo( PHYSDEV dev, const POINT *points, INT count )
 }
 
 /***********************************************************************
- *           LineTo    (GDI32.@)
+ *           NtGdiLineTo    (win32u.@)
  */
-BOOL WINAPI LineTo( HDC hdc, INT x, INT y )
+BOOL WINAPI NtGdiLineTo( HDC hdc, INT x, INT y )
 {
     DC * dc = get_dc_ptr( hdc );
     PHYSDEV physdev;
     BOOL ret;
 
-    TRACE( "%p, (%d, %d)\n", hdc, x, y );
-
     if(!dc) return FALSE;
 
     update_dc( dc );




More information about the wine-cvs mailing list