mciqtz: Mark one variable as static.
[wine/multimedia.git] / include / gdiplustypes.h
blob816dba8abfa8b5e5ad624cc83ffcc19c254900c3
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 class CharacterRange
204 public:
205 CharacterRange()
207 First = Length = 0;
210 CharacterRange(INT first, INT length)
212 First = first;
213 Length = length;
216 CharacterRange& operator=(const CharacterRange& rhs)
218 First = rhs.First;
219 Length = rhs.Length;
220 return *this;
222 public:
223 INT First;
224 INT Length;
227 #else /* end of c++ typedefs */
229 typedef struct Point
231 INT X;
232 INT Y;
233 } Point;
235 typedef struct PointF
237 REAL X;
238 REAL Y;
239 } PointF;
241 typedef struct PathData
243 INT Count;
244 PointF* Points;
245 BYTE* Types;
246 } PathData;
248 typedef struct RectF
250 REAL X;
251 REAL Y;
252 REAL Width;
253 REAL Height;
254 } RectF;
256 typedef struct Rect
258 INT X;
259 INT Y;
260 INT Width;
261 INT Height;
262 } Rect;
264 typedef struct CharacterRange
266 INT First;
267 INT Length;
268 } CharacterRange;
270 typedef enum Status Status;
272 #endif /* end of c typedefs */
274 #endif