Evan Stade : gdiplus: Added GdipSetStringFormatHotkeyPrefix/ GdipGetStringFormatHotkeyPrefix.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Aug 15 04:34:17 CDT 2007


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

Author: Evan Stade <estade at gmail.com>
Date:   Tue Aug 14 19:00:53 2007 -0700

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 b762c69..b13fc8f 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 0c74245..e8832e6 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 d1e3719..311c5ee 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 786cf51..c625e68 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 b5123b9..84634e0 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




More information about the wine-cvs mailing list