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
GdipGetStringFormatAlign(GpStringFormat
*format
,
62 StringAlignment
*align
)
65 return InvalidParameter
;
67 *align
= format
->align
;
72 GpStatus WINGDIPAPI
GdipGetStringFormatHotkeyPrefix(GDIPCONST GpStringFormat
76 return InvalidParameter
;
78 *hkpx
= (INT
)format
->hkprefix
;
83 GpStatus WINGDIPAPI
GdipGetStringFormatLineAlign(GpStringFormat
*format
,
84 StringAlignment
*align
)
87 return InvalidParameter
;
89 *align
= format
->vertalign
;
94 GpStatus WINGDIPAPI
GdipGetStringFormatTrimming(GpStringFormat
*format
,
95 StringTrimming
*trimming
)
97 if(!format
|| !trimming
)
98 return InvalidParameter
;
100 *trimming
= format
->trimming
;
105 GpStatus WINGDIPAPI
GdipSetStringFormatAlign(GpStringFormat
*format
,
106 StringAlignment align
)
109 return InvalidParameter
;
111 format
->align
= align
;
116 GpStatus WINGDIPAPI
GdipSetStringFormatHotkeyPrefix(GpStringFormat
*format
,
119 if(!format
|| hkpx
< 0 || hkpx
> 2)
120 return InvalidParameter
;
122 format
->hkprefix
= (HotkeyPrefix
) hkpx
;
127 GpStatus WINGDIPAPI
GdipSetStringFormatLineAlign(GpStringFormat
*format
,
128 StringAlignment align
)
131 return InvalidParameter
;
133 format
->vertalign
= align
;
138 GpStatus WINGDIPAPI
GdipSetStringFormatTrimming(GpStringFormat
*format
,
139 StringTrimming trimming
)
142 return InvalidParameter
;
144 format
->trimming
= trimming
;
149 GpStatus WINGDIPAPI
GdipSetStringFormatFlags(GDIPCONST GpStringFormat
*format
, INT flags
)
151 FIXME("format (%p) flags (%d)\n", format
, flags
);