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"
31 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(gdiplus
);
35 GpStatus WINGDIPAPI
GdipCreateStringFormat(INT attr
, LANGID lang
,
36 GpStringFormat
**format
)
39 return InvalidParameter
;
41 *format
= GdipAlloc(sizeof(GpStringFormat
));
42 if(!*format
) return OutOfMemory
;
44 (*format
)->attr
= attr
;
45 (*format
)->lang
= lang
;
46 (*format
)->trimming
= StringTrimmingCharacter
;
51 GpStatus WINGDIPAPI
GdipDeleteStringFormat(GpStringFormat
*format
)
54 return InvalidParameter
;
61 GpStatus WINGDIPAPI
GdipStringFormatGetGenericDefault(GpStringFormat
**format
)
64 return InvalidParameter
;
66 FIXME("stub: %p\n", format
);
68 return NotImplemented
;
71 GpStatus WINGDIPAPI
GdipGetStringFormatAlign(GpStringFormat
*format
,
72 StringAlignment
*align
)
75 return InvalidParameter
;
77 *align
= format
->align
;
82 GpStatus WINGDIPAPI
GdipGetStringFormatFlags(GDIPCONST GpStringFormat
* format
,
85 if (!(format
&& flags
))
86 return InvalidParameter
;
88 *flags
= format
->attr
;
93 GpStatus WINGDIPAPI
GdipGetStringFormatHotkeyPrefix(GDIPCONST GpStringFormat
97 return InvalidParameter
;
99 *hkpx
= (INT
)format
->hkprefix
;
104 GpStatus WINGDIPAPI
GdipGetStringFormatLineAlign(GpStringFormat
*format
,
105 StringAlignment
*align
)
107 if(!format
|| !align
)
108 return InvalidParameter
;
110 *align
= format
->vertalign
;
115 GpStatus WINGDIPAPI
GdipGetStringFormatMeasurableCharacterRangeCount(
116 GDIPCONST GpStringFormat
* format
, INT
* count
)
118 if (!(format
&& count
))
119 return InvalidParameter
;
121 FIXME("stub: %p %p\n", format
, count
);
123 return NotImplemented
;
126 GpStatus WINGDIPAPI
GdipGetStringFormatTrimming(GpStringFormat
*format
,
127 StringTrimming
*trimming
)
129 if(!format
|| !trimming
)
130 return InvalidParameter
;
132 *trimming
= format
->trimming
;
137 GpStatus WINGDIPAPI
GdipSetStringFormatAlign(GpStringFormat
*format
,
138 StringAlignment align
)
141 return InvalidParameter
;
143 format
->align
= align
;
148 GpStatus WINGDIPAPI
GdipSetStringFormatHotkeyPrefix(GpStringFormat
*format
,
151 if(!format
|| hkpx
< 0 || hkpx
> 2)
152 return InvalidParameter
;
154 format
->hkprefix
= (HotkeyPrefix
) hkpx
;
159 GpStatus WINGDIPAPI
GdipSetStringFormatLineAlign(GpStringFormat
*format
,
160 StringAlignment align
)
163 return InvalidParameter
;
165 format
->vertalign
= align
;
170 GpStatus WINGDIPAPI
GdipSetStringFormatTrimming(GpStringFormat
*format
,
171 StringTrimming trimming
)
174 return InvalidParameter
;
176 format
->trimming
= trimming
;
181 GpStatus WINGDIPAPI
GdipSetStringFormatFlags(GDIPCONST GpStringFormat
*format
, INT flags
)
183 FIXME("format (%p) flags (%d)\n", format
, flags
);
188 GpStatus WINGDIPAPI
GdipCloneStringFormat(GDIPCONST GpStringFormat
*format
, GpStringFormat
**newFormat
)
190 if(!format
|| !newFormat
)
191 return InvalidParameter
;
193 *newFormat
= GdipAlloc(sizeof(GpStringFormat
));
194 if(!*newFormat
) return OutOfMemory
;
196 **newFormat
= *format
;
198 TRACE("%p %p\n",format
,newFormat
);