diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 5a2bbd2ec9..b762c69f53 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -394,7 +394,7 @@ @ stub GdipGetStringFormatMeasurableCharacterRangeCount @ stub GdipGetStringFormatTabStopCount @ stub GdipGetStringFormatTabStops -@ stub GdipGetStringFormatTrimming +@ stdcall GdipGetStringFormatTrimming(ptr ptr) @ stub GdipGetTextContrast @ stdcall GdipGetTextRenderingHint(ptr ptr) @ stub GdipGetTextureImage @@ -592,7 +592,7 @@ @ stub GdipSetStringFormatLineAlign @ stub GdipSetStringFormatMeasurableCharacterRanges @ stub GdipSetStringFormatTabStops -@ stub GdipSetStringFormatTrimming +@ stdcall GdipSetStringFormatTrimming(ptr long) @ stub GdipSetTextContrast @ stdcall GdipSetTextRenderingHint(ptr long) @ stdcall GdipSetTextureTransform(ptr ptr) diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index d6c9dbae1b..0c742456e5 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -179,6 +179,7 @@ struct GpStringFormat{ INT attr; LANGID lang; StringAlignment align; + StringTrimming trimming; }; #endif diff --git a/dlls/gdiplus/stringformat.c b/dlls/gdiplus/stringformat.c index c8bd3d1877..d1e3719844 100644 --- a/dlls/gdiplus/stringformat.c +++ b/dlls/gdiplus/stringformat.c @@ -55,6 +55,17 @@ GpStatus WINGDIPAPI GdipGetStringFormatAlign(GpStringFormat *format, return Ok; } +GpStatus WINGDIPAPI GdipGetStringFormatTrimming(GpStringFormat *format, + StringTrimming *trimming) +{ + if(!format || !trimming) + return InvalidParameter; + + *trimming = format->trimming; + + return Ok; +} + GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat *format, StringAlignment align) { @@ -65,3 +76,14 @@ GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat *format, return Ok; } + +GpStatus WINGDIPAPI GdipSetStringFormatTrimming(GpStringFormat *format, + StringTrimming trimming) +{ + if(!format) + return InvalidParameter; + + format->trimming = trimming; + + return Ok; +} diff --git a/include/gdiplusenums.h b/include/gdiplusenums.h index 91e779b810..786cf5188a 100644 --- a/include/gdiplusenums.h +++ b/include/gdiplusenums.h @@ -221,6 +221,29 @@ enum StringAlignment StringAlignmentFar = 2 }; +enum StringFormatFlags +{ + StringFormatFlagsDirectionRightToLeft = 0x00000001, + StringFormatFlagsDirectionVertical = 0x00000002, + StringFormatFlagsNoFitBlackBox = 0x00000004, + StringFormatFlagsDisplayFormatControl = 0x00000020, + StringFormatFlagsNoFontFallback = 0x00000400, + StringFormatFlagsMeasureTrailingSpaces = 0x00000800, + StringFormatFlagsNoWrap = 0x00001000, + StringFormatFlagsLineLimit = 0x00002000, + StringFormatFlagsNoClip = 0x00004000 +}; + +enum StringTrimming +{ + StringTrimmingNone = 0, + StringTrimmingCharacter = 1, + StringTrimmingWord = 2, + StringTrimmingEllipsisCharacter = 3, + StringTrimmingEllipsisWord = 4, + StringTrimmingEllipsisPath = 5 +}; + #ifndef __cplusplus typedef enum Unit Unit; @@ -245,6 +268,8 @@ typedef enum EmfType EmfType; typedef enum CompositingMode CompositingMode; typedef enum TextRenderingHint TextRenderingHint; typedef enum StringAlignment StringAlignment; +typedef enum StringTrimming StringTrimming; +typedef enum StringFormatFlags StringFormatFlags; #endif /* end of c typedefs */ diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index ff1bcb1528..b5123b9f01 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -250,7 +250,9 @@ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont*,GpGraphics*,LOGFONTW*); GpStatus WINGDIPAPI GdipCreateStringFormat(INT,LANGID,GpStringFormat**); GpStatus WINGDIPAPI GdipGetStringFormatAlign(GpStringFormat*,StringAlignment*); +GpStatus WINGDIPAPI GdipGetStringFormatTrimming(GpStringFormat*,StringTrimming*); GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat*,StringAlignment); +GpStatus WINGDIPAPI GdipSetStringFormatTrimming(GpStringFormat*,StringTrimming); #ifdef __cplusplus }