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