vbscript: 'property' may be both keyword and identifier.
[wine/multimedia.git] / include / gdiplustypes.h
blob2e46bb4aecde3e4c05b5a8371de8ecca32ecf27c
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 typedef BOOL (CALLBACK * EnumerateMetafileProc)(EmfPlusRecordType,UINT,UINT,const BYTE*,VOID*);
60 #ifdef __cplusplus
62 #endif
65 #ifdef __cplusplus
67 class Point
69 public:
70 Point()
72 X = Y = 0;
75 Point(IN const Point &pt)
77 X = pt.X;
78 Y = pt.Y;
81 /* FIXME: missing constructor that takes a Size */
83 Point(IN INT x, IN INT y)
85 X = x;
86 Y = y;
89 Point operator+(IN const Point& pt) const
91 return Point(X + pt.X, Y + pt.Y);
94 Point operator-(IN const Point& pt) const
96 return Point(X - pt.X, Y - pt.Y);
99 BOOL Equals(IN const Point& pt)
101 return (X == pt.X) && (Y == pt.Y);
104 public:
105 INT X;
106 INT Y;
109 class PointF
111 public:
112 PointF()
114 X = Y = 0.0f;
117 PointF(IN const PointF &pt)
119 X = pt.X;
120 Y = pt.Y;
123 /* FIXME: missing constructor that takes a SizeF */
125 PointF(IN REAL x, IN REAL y)
127 X = x;
128 Y = y;
131 PointF operator+(IN const PointF& pt) const
133 return PointF(X + pt.X, Y + pt.Y);
136 PointF operator-(IN const PointF& pt) const
138 return PointF(X - pt.X, Y - pt.Y);
141 BOOL Equals(IN const PointF& pt)
143 return (X == pt.X) && (Y == pt.Y);
146 public:
147 REAL X;
148 REAL Y;
151 class PathData
153 public:
154 PathData()
156 Count = 0;
157 Points = NULL;
158 Types = NULL;
161 ~PathData()
163 if (Points != NULL)
165 delete Points;
168 if (Types != NULL)
170 delete Types;
174 private:
175 PathData(const PathData &);
176 PathData& operator=(const PathData &);
178 public:
179 INT Count;
180 PointF* Points;
181 BYTE* Types;
184 /* FIXME: missing the methods. */
185 class RectF
187 public:
188 REAL X;
189 REAL Y;
190 REAL Width;
191 REAL Height;
194 /* FIXME: missing the methods. */
195 class Rect
197 public:
198 INT X;
199 INT Y;
200 INT Width;
201 INT Height;
204 class CharacterRange
206 public:
207 CharacterRange()
209 First = Length = 0;
212 CharacterRange(INT first, INT length)
214 First = first;
215 Length = length;
218 CharacterRange& operator=(const CharacterRange& rhs)
220 First = rhs.First;
221 Length = rhs.Length;
222 return *this;
224 public:
225 INT First;
226 INT Length;
229 #else /* end of c++ typedefs */
231 typedef struct Point
233 INT X;
234 INT Y;
235 } Point;
237 typedef struct PointF
239 REAL X;
240 REAL Y;
241 } PointF;
243 typedef struct PathData
245 INT Count;
246 PointF* Points;
247 BYTE* Types;
248 } PathData;
250 typedef struct RectF
252 REAL X;
253 REAL Y;
254 REAL Width;
255 REAL Height;
256 } RectF;
258 typedef struct Rect
260 INT X;
261 INT Y;
262 INT Width;
263 INT Height;
264 } Rect;
266 typedef struct CharacterRange
268 INT First;
269 INT Length;
270 } CharacterRange;
272 typedef enum Status Status;
274 #endif /* end of c typedefs */
276 #endif