inetcomm: Parse headers into a list.
[wine/multimedia.git] / include / gdiplustypes.h
blobc9a5740bf3912779a1258fa9be0b2f7606c7cd69
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
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
53 typedef BOOL (CALLBACK * ImageAbort)(VOID *);
54 typedef ImageAbort DrawImageAbort;
55 typedef ImageAbort GetThumbnailImageAbort;
57 #ifdef __cplusplus
59 #endif
62 #ifdef __cplusplus
64 class Point
66 public:
67 Point()
69 X = Y = 0;
72 Point(IN const Point &pt)
74 X = pt.X;
75 Y = pt.Y;
78 /* FIXME: missing constructor that takes a Size */
80 Point(IN INT x, IN INT y)
82 X = x;
83 Y = y;
86 Point operator+(IN const Point& pt) const
88 return Point(X + pt.X, Y + pt.Y);
91 Point operator-(IN const Point& pt) const
93 return Point(X - pt.X, Y - pt.Y);
96 BOOL Equals(IN const Point& pt)
98 return (X == pt.X) && (Y == pt.Y);
101 public:
102 INT X;
103 INT Y;
106 class PointF
108 public:
109 PointF()
111 X = Y = 0.0f;
114 PointF(IN const PointF &pt)
116 X = pt.X;
117 Y = pt.Y;
120 /* FIXME: missing constructor that takes a SizeF */
122 PointF(IN REAL x, IN REAL y)
124 X = x;
125 Y = y;
128 PointF operator+(IN const PointF& pt) const
130 return PointF(X + pt.X, Y + pt.Y);
133 PointF operator-(IN const PointF& pt) const
135 return PointF(X - pt.X, Y - pt.Y);
138 BOOL Equals(IN const PointF& pt)
140 return (X == pt.X) && (Y == pt.Y);
143 public:
144 REAL X;
145 REAL Y;
148 class PathData
150 public:
151 PathData()
153 Count = 0;
154 Points = NULL;
155 Types = NULL;
158 ~PathData()
160 if (Points != NULL)
162 delete Points;
165 if (Types != NULL)
167 delete Types;
171 private:
172 PathData(const PathData &);
173 PathData& operator=(const PathData &);
175 public:
176 INT Count;
177 PointF* Points;
178 BYTE* Types;
181 /* FIXME: missing the methods. */
182 class RectF
184 public:
185 REAL X;
186 REAL Y;
187 REAL Width;
188 REAL Height;
191 /* FIXME: missing the methods. */
192 class Rect
194 public:
195 INT X;
196 INT Y;
197 INT Width;
198 INT Height;
201 #else /* end of c++ typedefs */
203 typedef struct Point
205 INT X;
206 INT Y;
207 } Point;
209 typedef struct PointF
211 REAL X;
212 REAL Y;
213 } PointF;
215 typedef struct PathData
217 INT Count;
218 PointF* Points;
219 BYTE* Types;
220 } PathData;
222 typedef struct RectF
224 REAL X;
225 REAL Y;
226 REAL Width;
227 REAL Height;
228 } RectF;
230 typedef struct Rect
232 INT X;
233 INT Y;
234 INT Width;
235 INT Height;
236 } Rect;
238 typedef enum Status Status;
240 #endif /* end of c typedefs */
242 #endif