winapi: Add support for the thiscall keyword.
[wine/hramrach.git] / include / gdiplustypes.h
blob4f97432bc64e9236ca7d6aa3a63550662da60328
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;
58 #ifdef __cplusplus
60 #endif
63 #ifdef __cplusplus
65 class Point
67 public:
68 Point()
70 X = Y = 0;
73 Point(IN const Point &pt)
75 X = pt.X;
76 Y = pt.Y;
79 /* FIXME: missing constructor that takes a Size */
81 Point(IN INT x, IN INT y)
83 X = x;
84 Y = y;
87 Point operator+(IN const Point& pt) const
89 return Point(X + pt.X, Y + pt.Y);
92 Point operator-(IN const Point& pt) const
94 return Point(X - pt.X, Y - pt.Y);
97 BOOL Equals(IN const Point& pt)
99 return (X == pt.X) && (Y == pt.Y);
102 public:
103 INT X;
104 INT Y;
107 class PointF
109 public:
110 PointF()
112 X = Y = 0.0f;
115 PointF(IN const PointF &pt)
117 X = pt.X;
118 Y = pt.Y;
121 /* FIXME: missing constructor that takes a SizeF */
123 PointF(IN REAL x, IN REAL y)
125 X = x;
126 Y = y;
129 PointF operator+(IN const PointF& pt) const
131 return PointF(X + pt.X, Y + pt.Y);
134 PointF operator-(IN const PointF& pt) const
136 return PointF(X - pt.X, Y - pt.Y);
139 BOOL Equals(IN const PointF& pt)
141 return (X == pt.X) && (Y == pt.Y);
144 public:
145 REAL X;
146 REAL Y;
149 class PathData
151 public:
152 PathData()
154 Count = 0;
155 Points = NULL;
156 Types = NULL;
159 ~PathData()
161 if (Points != NULL)
163 delete Points;
166 if (Types != NULL)
168 delete Types;
172 private:
173 PathData(const PathData &);
174 PathData& operator=(const PathData &);
176 public:
177 INT Count;
178 PointF* Points;
179 BYTE* Types;
182 /* FIXME: missing the methods. */
183 class RectF
185 public:
186 REAL X;
187 REAL Y;
188 REAL Width;
189 REAL Height;
192 /* FIXME: missing the methods. */
193 class Rect
195 public:
196 INT X;
197 INT Y;
198 INT Width;
199 INT Height;
202 #else /* end of c++ typedefs */
204 typedef struct Point
206 INT X;
207 INT Y;
208 } Point;
210 typedef struct PointF
212 REAL X;
213 REAL Y;
214 } PointF;
216 typedef struct PathData
218 INT Count;
219 PointF* Points;
220 BYTE* Types;
221 } PathData;
223 typedef struct RectF
225 REAL X;
226 REAL Y;
227 REAL Width;
228 REAL Height;
229 } RectF;
231 typedef struct Rect
233 INT X;
234 INT Y;
235 INT Width;
236 INT Height;
237 } Rect;
239 typedef struct CharacterRange
241 INT First;
242 INT Length;
243 } CharacterRange;
245 typedef enum Status Status;
247 #endif /* end of c typedefs */
249 #endif