Alexandre Julliard : gdi32: Implement FontIsLinked as a standard driver entry point.
Alexandre Julliard
julliard at winehq.org
Wed Oct 26 12:35:46 CDT 2011
Module: wine
Branch: master
Commit: 8796831a9f567ee1ea94a47b0f5f30a98693e3e3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8796831a9f567ee1ea94a47b0f5f30a98693e3e3
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Oct 21 11:37:48 2011 +0200
gdi32: Implement FontIsLinked as a standard driver entry point.
---
dlls/gdi32/font.c | 6 ++++--
dlls/gdi32/freetype.c | 21 ++++++++++++---------
dlls/gdi32/gdi_private.h | 1 -
3 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index 0416103..700fc27 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -3378,10 +3378,12 @@ DWORD WINAPI GetFontUnicodeRanges(HDC hdc, LPGLYPHSET lpgs)
BOOL WINAPI FontIsLinked(HDC hdc)
{
DC *dc = get_dc_ptr(hdc);
- BOOL ret = FALSE;
+ PHYSDEV dev;
+ BOOL ret;
if (!dc) return FALSE;
- if (dc->gdiFont) ret = WineEngFontIsLinked(dc->gdiFont);
+ dev = GET_DC_PHYSDEV( dc, pFontIsLinked );
+ ret = dev->funcs->pFontIsLinked( dev );
release_dc_ptr(dc);
TRACE("returning %d\n", ret);
return ret;
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index f11d935..81115ea 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -6748,14 +6748,22 @@ static DWORD freetype_GetFontUnicodeRanges( PHYSDEV dev, LPGLYPHSET glyphset )
}
/*************************************************************
- * FontIsLinked
+ * freetype_FontIsLinked
*/
-BOOL WineEngFontIsLinked(GdiFont *font)
+static BOOL freetype_FontIsLinked( PHYSDEV dev )
{
+ struct freetype_physdev *physdev = get_freetype_dev( dev );
BOOL ret;
+
+ if (!physdev->font)
+ {
+ dev = GET_NEXT_PHYSDEV( dev, pFontIsLinked );
+ return dev->funcs->pFontIsLinked( dev );
+ }
+
GDI_CheckNotLock();
EnterCriticalSection( &freetype_cs );
- ret = !list_empty(&font->child_fonts);
+ ret = !list_empty(&physdev->font->child_fonts);
LeaveCriticalSection( &freetype_cs );
return ret;
}
@@ -7130,7 +7138,7 @@ static const struct gdi_dc_funcs freetype_funcs =
NULL, /* pFillPath */
NULL, /* pFillRgn */
NULL, /* pFlattenPath */
- NULL, /* pFontIsLinked */
+ freetype_FontIsLinked, /* pFontIsLinked */
NULL, /* pFrameRgn */
NULL, /* pGdiComment */
NULL, /* pGdiRealizationInfo */
@@ -7266,11 +7274,6 @@ BOOL WineEngGetLinkedHFont(DC *dc, WCHAR c, HFONT *new_hfont, UINT *glyph)
return FALSE;
}
-BOOL WineEngFontIsLinked(GdiFont *font)
-{
- return FALSE;
-}
-
/*************************************************************************
* GetRasterizerCaps (GDI32.@)
*/
diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h
index 40c3cba..f9c86d0 100644
--- a/dlls/gdi32/gdi_private.h
+++ b/dlls/gdi32/gdi_private.h
@@ -293,7 +293,6 @@ extern INT WineEngAddFontResourceEx(LPCWSTR, DWORD, PVOID) DECLSPEC_HIDDEN;
extern HANDLE WineEngAddFontMemResourceEx(PVOID, DWORD, PVOID, LPDWORD) DECLSPEC_HIDDEN;
extern BOOL WineEngDestroyFontInstance(HFONT handle) DECLSPEC_HIDDEN;
extern BOOL WineEngGetLinkedHFont(DC *dc, WCHAR c, HFONT *new_hfont, UINT *glyph) DECLSPEC_HIDDEN;
-extern BOOL WineEngFontIsLinked(GdiFont*) DECLSPEC_HIDDEN;
extern BOOL WineEngInit(void) DECLSPEC_HIDDEN;
extern BOOL WineEngRealizationInfo(GdiFont*, realization_info_t*) DECLSPEC_HIDDEN;
extern BOOL WineEngRemoveFontResourceEx(LPCWSTR, DWORD, PVOID) DECLSPEC_HIDDEN;
More information about the wine-cvs
mailing list