user32: Load uxtheme when theming is active.
[wine.git] / include / gdiplustypes.h
blob80d5955ffb2ef160e155769380dd61eff679a676
1 /*
2 * Copyright (C) 2007 Google (Evan Stade)
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef _GDIPLUSTYPES_H
20 #define _GDIPLUSTYPES_H
22 typedef float REAL;
24 enum Status{
25 Ok = 0,
26 GenericError = 1,
27 InvalidParameter = 2,
28 OutOfMemory = 3,
29 ObjectBusy = 4,
30 InsufficientBuffer = 5,
31 NotImplemented = 6,
32 Win32Error = 7,
33 WrongState = 8,
34 Aborted = 9,
35 FileNotFound = 10,
36 ValueOverflow = 11,
37 AccessDenied = 12,
38 UnknownImageFormat = 13,
39 FontFamilyNotFound = 14,
40 FontStyleNotFound = 15,
41 NotTrueTypeFont = 16,
42 UnsupportedGdiplusVersion = 17,
43 GdiplusNotInitialized = 18,
44 PropertyNotFound = 19,
45 PropertyNotSupported = 20,
46 ProfileNotFound = 21
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
54 typedef BOOL (CALLBACK * ImageAbort)(VOID *);
55 typedef ImageAbort DrawImageAbort;
56 typedef ImageAbort GetThumbnailImageAbort;
57 typedef struct GdiplusAbort GdiplusAbort;
59 typedef BOOL (CALLBACK * EnumerateMetafileProc)(EmfPlusRecordType,UINT,UINT,const BYTE*,VOID*);
61 #ifdef __cplusplus
63 #endif
66 #ifdef __cplusplus
68 class Point
70 public:
71 Point()
73 X = Y = 0;
76 Point(IN const Point &pt)
78 X = pt.X;
79 Y = pt.Y;
82 /* FIXME: missing constructor that takes a Size */
84 Point(IN INT x, IN INT y)
86 X = x;
87 Y = y;
90 Point operator+(IN const Point& pt) const
92 return Point(X + pt.X, Y + pt.Y);
95 Point operator-(IN const Point& pt) const
97 return Point(X - pt.X, Y - pt.Y);
100 BOOL Equals(IN const Point& pt)
102 return (X == pt.X) && (Y == pt.Y);
105 public:
106 INT X;
107 INT Y;
110 class PointF
112 public:
113 PointF()
115 X = Y = 0.0f;
118 PointF(IN const PointF &pt)
120 X = pt.X;
121 Y = pt.Y;
124 /* FIXME: missing constructor that takes a SizeF */
126 PointF(IN REAL x, IN REAL y)
128 X = x;
129 Y = y;
132 PointF operator+(IN const PointF& pt) const
134 return PointF(X + pt.X, Y + pt.Y);
137 PointF operator-(IN const PointF& pt) const
139 return PointF(X - pt.X, Y - pt.Y);
142 BOOL Equals(IN const PointF& pt)
144 return (X == pt.X) && (Y == pt.Y);
147 public:
148 REAL X;
149 REAL Y;
152 class PathData
154 public:
155 PathData()
157 Count = 0;
158 Points = NULL;
159 Types = NULL;
162 ~PathData()
164 if (Points != NULL)
166 delete Points;
169 if (Types != NULL)
171 delete Types;
175 private:
176 PathData(const PathData &);
177 PathData& operator=(const PathData &);
179 public:
180 INT Count;
181 PointF* Points;
182 BYTE* Types;
185 /* FIXME: missing the methods. */
186 class RectF
188 public:
189 REAL X;
190 REAL Y;
191 REAL Width;
192 REAL Height;
195 /* FIXME: missing the methods. */
196 class Rect
198 public:
199 INT X;
200 INT Y;
201 INT Width;
202 INT Height;
205 class CharacterRange
207 public:
208 CharacterRange()
210 First = Length = 0;
213 CharacterRange(INT first, INT length)
215 First = first;
216 Length = length;
219 CharacterRange& operator=(const CharacterRange& rhs)
221 First = rhs.First;
222 Length = rhs.Length;
223 return *this;
225 public:
226 INT First;
227 INT Length;
230 #else /* end of c++ typedefs */
232 typedef struct Point
234 INT X;
235 INT Y;
236 } Point;
238 typedef struct PointF
240 REAL X;
241 REAL Y;
242 } PointF;
244 typedef struct PathData
246 INT Count;
247 PointF* Points;
248 BYTE* Types;
249 } PathData;
251 typedef struct RectF
253 REAL X;
254 REAL Y;
255 REAL Width;
256 REAL Height;
257 } RectF;
259 typedef struct Rect
261 INT X;
262 INT Y;
263 INT Width;
264 INT Height;
265 } Rect;
267 typedef struct CharacterRange
269 INT First;
270 INT Length;
271 } CharacterRange;
273 typedef enum Status Status;
275 #endif /* end of c typedefs */
277 #endif