00001
00002
00003 #ifndef _CLUTTERMM_TYPES_H
00004 #define _CLUTTERMM_TYPES_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <clutter/clutter-types.h>
00027 #include <clutter/clutter-event.h>
00028 #include <clutter/clutter-units.h>
00029 #include <clutter/clutter-color.h>
00030 #include <clutter/clutter-main.h>
00031
00032
00033 namespace Clutter
00034 {
00035
00036 typedef ClutterEvent Event;
00037 typedef ClutterButtonEvent ButtonEvent;
00038 typedef ClutterKeyEvent KeyEvent;
00039 typedef ClutterMotionEvent MotionEvent;
00040 typedef ClutterScrollEvent ScrollEvent;
00041 typedef ClutterCrossingEvent CrossingEvent;
00042
00043
00044 typedef ClutterUnit Unit;
00045 typedef ClutterFixed Fixed;
00046 typedef ClutterAngle Angle;
00047
00048 class InitError : public Glib::Error
00049 {
00050 public:
00051 enum Code
00052 {
00053 INIT_SUCCESS = 1,
00054 UNKNOWN = 0,
00055 THREADS = -1,
00056 BACKEND = -2,
00057 INTERNAL = -3
00058 };
00059
00060 InitError(Code error_code, const Glib::ustring& error_message);
00061 explicit InitError(GError* gobject);
00062 Code code() const;
00063
00064 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00065 private:
00066
00067 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00068 static void throw_func(GError* gobject);
00069 #else
00070
00071 static std::auto_ptr<Glib::Error> throw_func(GError* gobject);
00072 #endif //GLIBMM_EXCEPTIONS_ENABLED
00073
00074 friend void wrap_init();
00075 #endif
00076 };
00077
00078
00084 enum RotateDirection
00085 {
00086 ROTATE_CW,
00087 ROTATE_CCW
00088 };
00089
00090
00094 enum RotateAxis
00095 {
00096 X_AXIS,
00097 Y_AXIS,
00098 Z_AXIS
00099 };
00100
00101
00105 enum Gravity
00106 {
00107 GRAVITY_NONE,
00108 GRAVITY_NORTH,
00109 GRAVITY_NORTH_EAST,
00110 GRAVITY_EAST,
00111 GRAVITY_SOUTH_EAST,
00112 GRAVITY_SOUTH,
00113 GRAVITY_SOUTH_WEST,
00114 GRAVITY_WEST,
00115 GRAVITY_NORTH_WEST,
00116 GRAVITY_CENTER
00117 };
00118
00119
00123 enum RequestMode
00124 {
00125 REQUEST_HEIGHT_FOR_WIDTH,
00126 REQUEST_WIDTH_FOR_HEIGHT
00127 };
00128
00129
00130 class Knot
00131 {
00132 public:
00133 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00134 typedef Knot CppObjectType;
00135 typedef ClutterKnot BaseObjectType;
00136
00137 static GType get_type() G_GNUC_CONST;
00138 #endif
00139
00140 Knot();
00141
00142 explicit Knot(const ClutterKnot* gobject);
00143
00145 ClutterKnot* gobj() { return &gobject_; }
00146
00148 const ClutterKnot* gobj() const { return &gobject_; }
00149
00150 protected:
00151 ClutterKnot gobject_;
00152
00153 private:
00154
00155 public:
00156 Knot(int x, int y);
00157
00158 int get_x() const;
00159 void set_x(const int& value);
00160 int get_y() const;
00161 void set_y(const int& value);
00162
00163 bool operator==(const Knot& knot) const;
00164
00165
00166 };
00167
00168 class Vertex
00169 {
00170 public:
00171 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00172 typedef Vertex CppObjectType;
00173 typedef ClutterVertex BaseObjectType;
00174
00175 static GType get_type() G_GNUC_CONST;
00176 #endif
00177
00178 Vertex();
00179
00180 explicit Vertex(const ClutterVertex* gobject);
00181
00183 ClutterVertex* gobj() { return &gobject_; }
00184
00186 const ClutterVertex* gobj() const { return &gobject_; }
00187
00188 protected:
00189 ClutterVertex gobject_;
00190
00191 private:
00192
00193 public:
00194 Vertex(Unit x, Unit y, Unit z);
00195
00196 Unit get_x() const;
00197 void set_x(const Unit& value);
00198 Unit get_y() const;
00199 void set_y(const Unit& value);
00200 Unit get_z() const;
00201 void set_z(const Unit& value);
00202
00203
00204 };
00205
00206 class Geometry
00207 {
00208 public:
00209 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00210 typedef Geometry CppObjectType;
00211 typedef ClutterGeometry BaseObjectType;
00212
00213 static GType get_type() G_GNUC_CONST;
00214 #endif
00215
00216 Geometry();
00217
00218 explicit Geometry(const ClutterGeometry* gobject);
00219
00221 ClutterGeometry* gobj() { return &gobject_; }
00222
00224 const ClutterGeometry* gobj() const { return &gobject_; }
00225
00226 protected:
00227 ClutterGeometry gobject_;
00228
00229 private:
00230
00231 public:
00232 Geometry(int x, int y, unsigned int width, unsigned int height);
00233
00234 int get_x() const;
00235 void set_x(const int& value);
00236 int get_y() const;
00237 void set_y(const int& value);
00238 unsigned int get_width() const;
00239 void set_width(const unsigned int& value);
00240 unsigned int get_height() const;
00241 void set_height(const unsigned int& value);
00242
00243
00244 };
00245
00246 }
00247
00248
00249 namespace Glib
00250 {
00251
00256 Clutter::Knot& wrap(ClutterKnot* object);
00257
00262 const Clutter::Knot& wrap(const ClutterKnot* object);
00263
00264 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00265 template <>
00266 class Value<Clutter::Knot> : public Glib::Value_Boxed<Clutter::Knot>
00267 {};
00268 #endif
00269
00270 }
00271
00272
00273 namespace Glib
00274 {
00275
00280 Clutter::Vertex& wrap(ClutterVertex* object);
00281
00286 const Clutter::Vertex& wrap(const ClutterVertex* object);
00287
00288 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00289 template <>
00290 class Value<Clutter::Vertex> : public Glib::Value_Boxed<Clutter::Vertex>
00291 {};
00292 #endif
00293
00294 }
00295
00296
00297 namespace Glib
00298 {
00299
00304 Clutter::Geometry& wrap(ClutterGeometry* object);
00305
00310 const Clutter::Geometry& wrap(const ClutterGeometry* object);
00311
00312 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00313 template <>
00314 class Value<Clutter::Geometry> : public Glib::Value_Boxed<Clutter::Geometry>
00315 {};
00316 #endif
00317
00318 }
00319
00320
00321 #endif
00322