gdiplus: Stub GdipSetStringFormatMeasurableCharacterRanges.
[wine] / include / gdiplustypes.h
1 /*
2  * Copyright (C) 2007 Google (Evan Stade)
3  *
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.
8  *
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.
13  *
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
17  */
18
19 #ifndef _GDIPLUSTYPES_H
20 #define _GDIPLUSTYPES_H
21
22 typedef float REAL;
23
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
47 };
48
49
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53
54 typedef BOOL (CALLBACK * ImageAbort)(VOID *);
55 typedef ImageAbort DrawImageAbort;
56 typedef ImageAbort GetThumbnailImageAbort;
57
58 #ifdef __cplusplus
59 }
60 #endif
61
62
63 #ifdef __cplusplus
64
65 class Point
66 {
67 public:
68    Point()
69    {
70        X = Y = 0;
71    }
72
73    Point(IN const Point &pt)
74    {
75        X = pt.X;
76        Y = pt.Y;
77    }
78
79    /* FIXME: missing constructor that takes a Size */
80
81    Point(IN INT x, IN INT y)
82    {
83        X = x;
84        Y = y;
85    }
86
87    Point operator+(IN const Point& pt) const
88    {
89        return Point(X + pt.X, Y + pt.Y);
90    }
91
92    Point operator-(IN const Point& pt) const
93    {
94        return Point(X - pt.X, Y - pt.Y);
95    }
96
97    BOOL Equals(IN const Point& pt)
98    {
99        return (X == pt.X) && (Y == pt.Y);
100    }
101
102 public:
103     INT X;
104     INT Y;
105 };
106
107 class PointF
108 {
109 public:
110    PointF()
111    {
112        X = Y = 0.0f;
113    }
114
115    PointF(IN const PointF &pt)
116    {
117        X = pt.X;
118        Y = pt.Y;
119    }
120
121    /* FIXME: missing constructor that takes a SizeF */
122
123    PointF(IN REAL x, IN REAL y)
124    {
125        X = x;
126        Y = y;
127    }
128
129    PointF operator+(IN const PointF& pt) const
130    {
131        return PointF(X + pt.X, Y + pt.Y);
132    }
133
134    PointF operator-(IN const PointF& pt) const
135    {
136        return PointF(X - pt.X, Y - pt.Y);
137    }
138
139    BOOL Equals(IN const PointF& pt)
140    {
141        return (X == pt.X) && (Y == pt.Y);
142    }
143
144 public:
145     REAL X;
146     REAL Y;
147 };
148
149 class PathData
150 {
151 public:
152     PathData()
153     {
154         Count = 0;
155         Points = NULL;
156         Types = NULL;
157     }
158
159     ~PathData()
160     {
161         if (Points != NULL)
162         {
163             delete Points;
164         }
165
166         if (Types != NULL)
167         {
168             delete Types;
169         }
170     }
171
172 private:
173     PathData(const PathData &);
174     PathData& operator=(const PathData &);
175
176 public:
177     INT Count;
178     PointF* Points;
179     BYTE* Types;
180 };
181
182 /* FIXME: missing the methods. */
183 class RectF
184 {
185 public:
186     REAL X;
187     REAL Y;
188     REAL Width;
189     REAL Height;
190 };
191
192 /* FIXME: missing the methods. */
193 class Rect
194 {
195 public:
196     INT X;
197     INT Y;
198     INT Width;
199     INT Height;
200 };
201
202 #else /* end of c++ typedefs */
203
204 typedef struct Point
205 {
206     INT X;
207     INT Y;
208 } Point;
209
210 typedef struct PointF
211 {
212     REAL X;
213     REAL Y;
214 } PointF;
215
216 typedef struct PathData
217 {
218     INT Count;
219     PointF* Points;
220     BYTE* Types;
221 } PathData;
222
223 typedef struct RectF
224 {
225     REAL X;
226     REAL Y;
227     REAL Width;
228     REAL Height;
229 } RectF;
230
231 typedef struct Rect
232 {
233     INT X;
234     INT Y;
235     INT Width;
236     INT Height;
237 } Rect;
238
239 typedef struct CharacterRange
240 {
241     INT First;
242     INT Length;
243 } CharacterRange;
244
245 typedef enum Status Status;
246
247 #endif /* end of c typedefs */
248
249 #endif