Alexandre Julliard : gdi32: Move the generic part of FontIsLinked() to font .c.

Alexandre Julliard julliard at winehq.org
Thu Sep 27 09:27:20 CDT 2007


Module: wine
Branch: master
Commit: 3363d65f168f57f9ec34f1b80e03e0e104a84107
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3363d65f168f57f9ec34f1b80e03e0e104a84107

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Sep 26 20:21:34 2007 +0200

gdi32: Move the generic part of FontIsLinked() to font.c.

---

 dlls/gdi32/font.c        |   16 ++++++++++++++++
 dlls/gdi32/freetype.c    |   14 +++-----------
 dlls/gdi32/gdi_private.h |    1 +
 3 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index 59b6780..269638f 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -3422,3 +3422,19 @@ DWORD WINAPI GetFontUnicodeRanges(HDC hdc, LPGLYPHSET lpgs)
     DC_ReleaseDCPtr(dc);
     return ret;
 }
+
+
+/*************************************************************
+ *           FontIsLinked    (GDI32.@)
+ */
+BOOL WINAPI FontIsLinked(HDC hdc)
+{
+    DC *dc = DC_GetDCPtr(hdc);
+    BOOL ret = FALSE;
+
+    if (!dc) return FALSE;
+    if (dc->gdiFont) ret = WineEngFontIsLinked(dc->gdiFont);
+    DC_ReleaseDCPtr(dc);
+    TRACE("returning %d\n", ret);
+    return ret;
+}
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index cc784ea..3ec28f9 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -4651,17 +4651,9 @@ DWORD WineEngGetFontUnicodeRanges(GdiFont *font, LPGLYPHSET glyphset)
 /*************************************************************
  *     FontIsLinked
  */
-BOOL WINAPI FontIsLinked(HDC hdc)
+BOOL WineEngFontIsLinked(GdiFont *font)
 {
-    DC *dc = DC_GetDCPtr(hdc);
-    BOOL ret = FALSE;
-
-    if(!dc) return FALSE;
-    if(dc->gdiFont && !list_empty(&dc->gdiFont->child_fonts))
-        ret = TRUE;
-    DC_ReleaseDCPtr(dc);
-    TRACE("returning %d\n", ret);
-    return ret;
+    return !list_empty(&font->child_fonts);
 }
 
 static BOOL is_hinting_enabled(void)
@@ -5074,7 +5066,7 @@ DWORD WineEngGetFontUnicodeRanges(GdiFont *font, LPGLYPHSET glyphset)
     return 0;
 }
 
-BOOL WINAPI FontIsLinked(HDC hdc)
+BOOL WineEngFontIsLinked(GdiFont *font)
 {
     return FALSE;
 }
diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h
index 0904049..08ba02b 100644
--- a/dlls/gdi32/gdi_private.h
+++ b/dlls/gdi32/gdi_private.h
@@ -444,6 +444,7 @@ extern BOOL WineEngGetTextExtentExPoint(GdiFont*, LPCWSTR, INT, INT, LPINT, LPIN
 extern BOOL WineEngGetTextExtentPointI(GdiFont*, const WORD *, INT, LPSIZE);
 extern INT  WineEngGetTextFace(GdiFont*, INT, LPWSTR);
 extern BOOL WineEngGetTextMetrics(GdiFont*, LPTEXTMETRICW);
+extern BOOL WineEngFontIsLinked(GdiFont*);
 extern BOOL WineEngInit(void);
 extern BOOL WineEngRemoveFontResourceEx(LPCWSTR, DWORD, PVOID);
 




More information about the wine-cvs mailing list