[PATCH] 2/4 Implement GdipDeleteFontFamily
Adam Petaccia
adam at tpetaccia.com
Tue Jun 17 09:56:33 CDT 2008
---
dlls/gdiplus/font.c | 20 ++++++++++++++++++++
dlls/gdiplus/gdiplus.spec | 2 +-
include/gdiplusflat.h | 1 +
3 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index bc999af..c37ab31 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -207,3 +207,23 @@ GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR *name,
return Ok;
}
+/*****************************************************************************
+ * GdipDeleteFontFamily [GDIPLUS.@]
+ * PARAMS:
+ * *FontFamily [I] The family to delete
+ *
+ * RETURNS:
+ * InvalidParameter if FontFamily is NULL.
+ * Ok otherwise.
+ */
+GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily *FontFamily)
+{
+ if (!FontFamily)
+ return InvalidParameter;
+ TRACE("Deleting %p (%s)\n", FontFamily, debugstr_w(FontFamily->FamilyName));
+
+ if (FontFamily->FamilyName) GdipFree (FontFamily->FamilyName);
+ GdipFree (FontFamily);
+
+ return Ok;
+}
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 61fff6f..d07e3fc 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -141,7 +141,7 @@
@ stdcall GdipDeleteCustomLineCap(ptr)
@ stub GdipDeleteEffect
@ stdcall GdipDeleteFont(ptr)
-@ stub GdipDeleteFontFamily
+@ stdcall GdipDeleteFontFamily(ptr)
@ stdcall GdipDeleteGraphics(ptr)
@ stdcall GdipDeleteMatrix(ptr)
@ stdcall GdipDeletePath(ptr)
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 09601af..f5ebafa 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -345,6 +345,7 @@ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont*,GpGraphics*,LOGFONTW*);
GpStatus WINGDIPAPI GdipCloneFont(GpFont*,GpFont**);
GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR *name, GpFontCollection *fontCollection, GpFontFamily **FontFamily);
+GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily *FontFamily);
GpStatus WINGDIPAPI GdipCreateStringFormat(INT,LANGID,GpStringFormat**);
GpStatus WINGDIPAPI GdipDeleteStringFormat(GpStringFormat*);
--
1.5.4.3
More information about the wine-patches
mailing list