From 936f310190806eada54edf353c89421cdb0c7b4f Mon Sep 17 00:00:00 2001 From: Evan Stade Date: Tue, 14 Aug 2007 19:00:53 -0700 Subject: [PATCH] gdiplus: Added GdipSetStringFormatHotkeyPrefix/GdipGetStringFormatHotkeyPrefix. --- dlls/gdiplus/gdiplus.spec | 4 ++-- dlls/gdiplus/gdiplus_private.h | 1 + dlls/gdiplus/stringformat.c | 22 ++++++++++++++++++++++ include/gdiplusenums.h | 9 +++++++++ include/gdiplusflat.h | 2 ++ 5 files changed, 36 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index b762c69f53d..b13fc8f6431 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -389,7 +389,7 @@ @ stdcall GdipGetStringFormatAlign(ptr ptr) @ stub GdipGetStringFormatDigitSubstitution @ stub GdipGetStringFormatFlags -@ stub GdipGetStringFormatHotkeyPrefix +@ stdcall GdipGetStringFormatHotkeyPrefix(ptr ptr) @ stub GdipGetStringFormatLineAlign @ stub GdipGetStringFormatMeasurableCharacterRangeCount @ stub GdipGetStringFormatTabStopCount @@ -588,7 +588,7 @@ @ stdcall GdipSetStringFormatAlign(ptr long) @ stub GdipSetStringFormatDigitSubstitution @ stub GdipSetStringFormatFlags -@ stub GdipSetStringFormatHotkeyPrefix +@ stdcall GdipSetStringFormatHotkeyPrefix(ptr long) @ stub GdipSetStringFormatLineAlign @ stub GdipSetStringFormatMeasurableCharacterRanges @ stub GdipSetStringFormatTabStops diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index 0c742456e5d..e8832e6e009 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -180,6 +180,7 @@ struct GpStringFormat{ LANGID lang; StringAlignment align; StringTrimming trimming; + HotkeyPrefix hkprefix; }; #endif diff --git a/dlls/gdiplus/stringformat.c b/dlls/gdiplus/stringformat.c index d1e3719844b..311c5eee3f5 100644 --- a/dlls/gdiplus/stringformat.c +++ b/dlls/gdiplus/stringformat.c @@ -55,6 +55,17 @@ GpStatus WINGDIPAPI GdipGetStringFormatAlign(GpStringFormat *format, return Ok; } +GpStatus WINGDIPAPI GdipGetStringFormatHotkeyPrefix(GDIPCONST GpStringFormat + *format, INT *hkpx) +{ + if(!format || !hkpx) + return InvalidParameter; + + *hkpx = (INT)format->hkprefix; + + return Ok; +} + GpStatus WINGDIPAPI GdipGetStringFormatTrimming(GpStringFormat *format, StringTrimming *trimming) { @@ -77,6 +88,17 @@ GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat *format, return Ok; } +GpStatus WINGDIPAPI GdipSetStringFormatHotkeyPrefix(GpStringFormat *format, + INT hkpx) +{ + if(!format || hkpx < 0 || hkpx > 2) + return InvalidParameter; + + format->hkprefix = (HotkeyPrefix) hkpx; + + return Ok; +} + GpStatus WINGDIPAPI GdipSetStringFormatTrimming(GpStringFormat *format, StringTrimming trimming) { diff --git a/include/gdiplusenums.h b/include/gdiplusenums.h index 786cf5188aa..c625e684e2b 100644 --- a/include/gdiplusenums.h +++ b/include/gdiplusenums.h @@ -244,6 +244,14 @@ enum StringTrimming StringTrimmingEllipsisPath = 5 }; +enum HotkeyPrefix +{ + HotkeyPrefixNone = 0, + HotkeyPrefixShow = 1, + HotkeyPrefixHide = 2 +}; + + #ifndef __cplusplus typedef enum Unit Unit; @@ -270,6 +278,7 @@ typedef enum TextRenderingHint TextRenderingHint; typedef enum StringAlignment StringAlignment; typedef enum StringTrimming StringTrimming; typedef enum StringFormatFlags StringFormatFlags; +typedef enum HotkeyPrefix HotkeyPrefix; #endif /* end of c typedefs */ diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index b5123b9f01e..84634e03cc2 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -250,8 +250,10 @@ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont*,GpGraphics*,LOGFONTW*); GpStatus WINGDIPAPI GdipCreateStringFormat(INT,LANGID,GpStringFormat**); GpStatus WINGDIPAPI GdipGetStringFormatAlign(GpStringFormat*,StringAlignment*); +GpStatus WINGDIPAPI GdipGetStringFormatHotkeyPrefix(GDIPCONST GpStringFormat*,INT*); GpStatus WINGDIPAPI GdipGetStringFormatTrimming(GpStringFormat*,StringTrimming*); GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat*,StringAlignment); +GpStatus WINGDIPAPI GdipSetStringFormatHotkeyPrefix(GpStringFormat*,INT); GpStatus WINGDIPAPI GdipSetStringFormatTrimming(GpStringFormat*,StringTrimming); #ifdef __cplusplus