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