3 * Copyright (C) 2007 Google (Evan Stade)
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
30 #include "gdiplus_private.h"
32 GpStatus WINGDIPAPI GdipCreateStringFormat(INT attr, LANGID lang,
33 GpStringFormat **format)
36 return InvalidParameter;
38 *format = GdipAlloc(sizeof(GpStringFormat));
39 if(!*format) return OutOfMemory;
41 (*format)->attr = attr;
42 (*format)->lang = lang;
43 (*format)->trimming = StringTrimmingCharacter;
48 GpStatus WINGDIPAPI GdipDeleteStringFormat(GpStringFormat *format)
51 return InvalidParameter;
58 GpStatus WINGDIPAPI GdipGetStringFormatAlign(GpStringFormat *format,
59 StringAlignment *align)
62 return InvalidParameter;
64 *align = format->align;
69 GpStatus WINGDIPAPI GdipGetStringFormatHotkeyPrefix(GDIPCONST GpStringFormat
73 return InvalidParameter;
75 *hkpx = (INT)format->hkprefix;
80 GpStatus WINGDIPAPI GdipGetStringFormatLineAlign(GpStringFormat *format,
81 StringAlignment *align)
84 return InvalidParameter;
86 *align = format->vertalign;
91 GpStatus WINGDIPAPI GdipGetStringFormatTrimming(GpStringFormat *format,
92 StringTrimming *trimming)
94 if(!format || !trimming)
95 return InvalidParameter;
97 *trimming = format->trimming;
102 GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat *format,
103 StringAlignment align)
106 return InvalidParameter;
108 format->align = align;
113 GpStatus WINGDIPAPI GdipSetStringFormatHotkeyPrefix(GpStringFormat *format,
116 if(!format || hkpx < 0 || hkpx > 2)
117 return InvalidParameter;
119 format->hkprefix = (HotkeyPrefix) hkpx;
124 GpStatus WINGDIPAPI GdipSetStringFormatLineAlign(GpStringFormat *format,
125 StringAlignment align)
128 return InvalidParameter;
130 format->vertalign = align;
135 GpStatus WINGDIPAPI GdipSetStringFormatTrimming(GpStringFormat *format,
136 StringTrimming trimming)
139 return InvalidParameter;
141 format->trimming = trimming;