Adam Petaccia : gdiplus: Implement GdipDeleteFontFamily.
Alexandre Julliard
julliard at winehq.org
Wed Jun 25 16:44:18 CDT 2008
Module: wine
Branch: master
Commit: d5b8c9d8704ef2c5af60e8f48290d6d642630e4a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d5b8c9d8704ef2c5af60e8f48290d6d642630e4a
Author: Adam Petaccia <adam at tpetaccia.com>
Date: Sat Jun 21 13:02:48 2008 -0400
gdiplus: Implement GdipDeleteFontFamily.
---
dlls/gdiplus/font.c | 27 +++++++++++++++++++++++++++
dlls/gdiplus/gdiplus.spec | 2 +-
include/gdiplusflat.h | 1 +
3 files changed, 29 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index b3e49c4..ec591c1 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -218,3 +218,30 @@ GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR *name,
return Ok;
}
+
+
+/*****************************************************************************
+ * GdipDeleteFontFamily [GDIPLUS.@]
+ *
+ * Removes the specified FontFamily
+ *
+ * PARAMS
+ * *FontFamily [I] The family to delete
+ *
+ * RETURNS
+ * SUCCESS: Ok
+ * FAILURE: InvalidParameter if FontFamily is NULL.
+ *
+ */
+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);
+ if (FontFamily->tmw) GdipFree (FontFamily->tmw);
+ GdipFree (FontFamily);
+
+ return Ok;
+}
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 2af90ea..b88298e 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 aa9c6dc..cb6ca01 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -350,6 +350,7 @@ GpStatus WINGDIPAPI GdipCloneFont(GpFont*,GpFont**);
GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR*,
GpFontCollection*, GpFontFamily**);
+GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily*);
GpStatus WINGDIPAPI GdipCreateStringFormat(INT,LANGID,GpStringFormat**);
GpStatus WINGDIPAPI GdipDeleteStringFormat(GpStringFormat*);
More information about the wine-cvs
mailing list