types.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _CLUTTERMM_TYPES_H
00004 #define _CLUTTERMM_TYPES_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 /* Copyright (C) 2007 The cluttermm Development Team
00010  *
00011  * This library is free software; you can redistribute it and/or
00012  * modify it under the terms of the GNU Lesser General Public
00013  * License as published by the Free Software Foundation; either
00014  * version 2.1 of the License, or (at your option) any later version.
00015  *
00016  * This library is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  * Lesser General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Lesser General Public
00022  * License along with this library; if not, write to the Free
00023  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00024  */
00025 
00026 #include <clutter/clutter.h>
00027 #include <cogl/cogl.h>
00028 
00029 
00030 namespace Cogl
00031 {
00032 typedef CoglAngle Angle;
00033 typedef CoglFixed Fixed;
00034 } // namespace Cogl
00035 
00036 namespace Clutter
00037 {
00038 
00039 typedef ClutterEvent Event;
00040 typedef ClutterButtonEvent ButtonEvent;
00041 typedef ClutterKeyEvent KeyEvent;
00042 typedef ClutterMotionEvent MotionEvent;
00043 typedef ClutterScrollEvent ScrollEvent;
00044 typedef ClutterCrossingEvent CrossingEvent;
00045 
00046 //TODO: Maybe redefine these, to avoid including a C header in our C++ header:
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   //When not using exceptions, we just pass the Exception object around without throwing it:
00071   static std::auto_ptr<Glib::Error> throw_func(GError* gobject);
00072 #endif //GLIBMM_EXCEPTIONS_ENABLED
00073 
00074   friend void wrap_init(); // uses throw_func()
00075 #endif
00076 };
00077 
00078 } // namespace Clutter
00079 
00080 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00081 namespace Glib
00082 {
00083 
00084 template <>
00085 class Value<Clutter::InitError::Code> : public Glib::Value_Enum<Clutter::InitError::Code>
00086 {
00087 public:
00088   static GType value_type() G_GNUC_CONST;
00089 };
00090 
00091 } // namespace Glib
00092 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00093 
00094 
00095 namespace Clutter
00096 {
00097 
00098 
00104 enum AnimationMode
00105 {
00106   CUSTOM_MODE,
00107   LINEAR,
00108   EASE_IN_QUAD,
00109   EASE_OUT_QUAD,
00110   EASE_IN_OUT_QUAD,
00111   EASE_IN_CUBIC,
00112   EASE_OUT_CUBIC,
00113   EASE_IN_OUT_CUBIC,
00114   EASE_IN_QUART,
00115   EASE_OUT_QUART,
00116   EASE_IN_OUT_QUART,
00117   EASE_IN_QUINT,
00118   EASE_OUT_QUINT,
00119   EASE_IN_OUT_QUINT,
00120   EASE_IN_SINE,
00121   EASE_OUT_SINE,
00122   EASE_IN_OUT_SINE,
00123   EASE_IN_EXPO,
00124   EASE_OUT_EXPO,
00125   EASE_IN_OUT_EXPO,
00126   EASE_IN_CIRC,
00127   EASE_OUT_CIRC,
00128   EASE_IN_OUT_CIRC,
00129   EASE_IN_ELASTIC,
00130   EASE_OUT_ELASTIC,
00131   EASE_IN_OUT_ELASTIC,
00132   EASE_IN_BACK,
00133   EASE_OUT_BACK,
00134   EASE_IN_OUT_BACK,
00135   EASE_IN_BOUNCE,
00136   EASE_OUT_BOUNCE,
00137   EASE_IN_OUT_BOUNCE,
00138   ANIMATION_LAST
00139 };
00140 
00141 } // namespace Clutter
00142 
00143 
00144 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00145 namespace Glib
00146 {
00147 
00148 template <>
00149 class Value<Clutter::AnimationMode> : public Glib::Value_Enum<Clutter::AnimationMode>
00150 {
00151 public:
00152   static GType value_type() G_GNUC_CONST;
00153 };
00154 
00155 } // namespace Glib
00156 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00157 
00158 
00159 namespace Clutter
00160 {
00161 
00165 enum RotateDirection
00166 {
00167   ROTATE_CW,
00168   ROTATE_CCW
00169 };
00170 
00171 } // namespace Clutter
00172 
00173 
00174 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00175 namespace Glib
00176 {
00177 
00178 template <>
00179 class Value<Clutter::RotateDirection> : public Glib::Value_Enum<Clutter::RotateDirection>
00180 {
00181 public:
00182   static GType value_type() G_GNUC_CONST;
00183 };
00184 
00185 } // namespace Glib
00186 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00187 
00188 
00189 namespace Clutter
00190 {
00191 
00195 enum RotateAxis
00196 {
00197   X_AXIS,
00198   Y_AXIS,
00199   Z_AXIS
00200 };
00201 
00202 } // namespace Clutter
00203 
00204 
00205 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00206 namespace Glib
00207 {
00208 
00209 template <>
00210 class Value<Clutter::RotateAxis> : public Glib::Value_Enum<Clutter::RotateAxis>
00211 {
00212 public:
00213   static GType value_type() G_GNUC_CONST;
00214 };
00215 
00216 } // namespace Glib
00217 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00218 
00219 
00220 namespace Clutter
00221 {
00222 
00226 enum Gravity
00227 {
00228   GRAVITY_NONE,
00229   GRAVITY_NORTH,
00230   GRAVITY_NORTH_EAST,
00231   GRAVITY_EAST,
00232   GRAVITY_SOUTH_EAST,
00233   GRAVITY_SOUTH,
00234   GRAVITY_SOUTH_WEST,
00235   GRAVITY_WEST,
00236   GRAVITY_NORTH_WEST,
00237   GRAVITY_CENTER
00238 };
00239 
00240 } // namespace Clutter
00241 
00242 
00243 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00244 namespace Glib
00245 {
00246 
00247 template <>
00248 class Value<Clutter::Gravity> : public Glib::Value_Enum<Clutter::Gravity>
00249 {
00250 public:
00251   static GType value_type() G_GNUC_CONST;
00252 };
00253 
00254 } // namespace Glib
00255 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00256 
00257 
00258 namespace Clutter
00259 {
00260 
00264 enum RequestMode
00265 {
00266   REQUEST_HEIGHT_FOR_WIDTH,
00267   REQUEST_WIDTH_FOR_HEIGHT
00268 };
00269 
00270 } // namespace Clutter
00271 
00272 
00273 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00274 namespace Glib
00275 {
00276 
00277 template <>
00278 class Value<Clutter::RequestMode> : public Glib::Value_Enum<Clutter::RequestMode>
00279 {
00280 public:
00281   static GType value_type() G_GNUC_CONST;
00282 };
00283 
00284 } // namespace Glib
00285 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00286 
00287 
00288 namespace Clutter
00289 {
00290 
00302 enum FontFlags
00303 {
00304   FONT_MIPMAPPING = 1 << 0,
00305   FONT_HINTING = 1 << 1
00306 };
00307 
00309 inline FontFlags operator|(FontFlags lhs, FontFlags rhs)
00310   { return static_cast<FontFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
00311 
00313 inline FontFlags operator&(FontFlags lhs, FontFlags rhs)
00314   { return static_cast<FontFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
00315 
00317 inline FontFlags operator^(FontFlags lhs, FontFlags rhs)
00318   { return static_cast<FontFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
00319 
00321 inline FontFlags operator~(FontFlags flags)
00322   { return static_cast<FontFlags>(~static_cast<unsigned>(flags)); }
00323 
00325 inline FontFlags& operator|=(FontFlags& lhs, FontFlags rhs)
00326   { return (lhs = static_cast<FontFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
00327 
00329 inline FontFlags& operator&=(FontFlags& lhs, FontFlags rhs)
00330   { return (lhs = static_cast<FontFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
00331 
00333 inline FontFlags& operator^=(FontFlags& lhs, FontFlags rhs)
00334   { return (lhs = static_cast<FontFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
00335 
00336 } // namespace Clutter
00337 
00338 
00339 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00340 namespace Glib
00341 {
00342 
00343 template <>
00344 class Value<Clutter::FontFlags> : public Glib::Value_Flags<Clutter::FontFlags>
00345 {
00346 public:
00347   static GType value_type() G_GNUC_CONST;
00348 };
00349 
00350 } // namespace Glib
00351 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00352 
00353 
00354 namespace Clutter
00355 {
00356 
00357 
00358 class Knot
00359 {
00360   public:
00361 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00362   typedef Knot CppObjectType;
00363   typedef ClutterKnot BaseObjectType;
00364 
00365   static GType get_type() G_GNUC_CONST;
00366 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00367 
00368   Knot();
00369 
00370   explicit Knot(const ClutterKnot* gobject); // always takes a copy
00371 
00373   ClutterKnot*       gobj()       { return &gobject_; }
00374 
00376   const ClutterKnot* gobj() const { return &gobject_; }
00377 
00378 protected:
00379   ClutterKnot gobject_;
00380 
00381 private:
00382   
00383 public:
00384   Knot(int x, int y);
00385 
00386    int get_x() const;
00387    void set_x(int x);
00388    int get_y() const;
00389    void set_y(int y);
00390   void set_xy(int x, int y);
00391 
00392 
00393 };
00394 
00395 class Vertex
00396 {
00397   public:
00398 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00399   typedef Vertex CppObjectType;
00400   typedef ClutterVertex BaseObjectType;
00401 
00402   static GType get_type() G_GNUC_CONST;
00403 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00404 
00405   Vertex();
00406 
00407   explicit Vertex(const ClutterVertex* gobject); // always takes a copy
00408 
00410   ClutterVertex*       gobj()       { return &gobject_; }
00411 
00413   const ClutterVertex* gobj() const { return &gobject_; }
00414 
00415 protected:
00416   ClutterVertex gobject_;
00417 
00418 private:
00419   
00420 public:
00421   Vertex(float x, float y, float z = 0);
00422 
00423    float get_x() const;
00424     void set_x(const float& value);
00425     float get_y() const;
00426     void set_y(const float& value);
00427     float get_z() const;
00428     void set_z(const float& value);
00429  
00430 
00431 };
00432 
00433 class Geometry
00434 {
00435   public:
00436 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00437   typedef Geometry CppObjectType;
00438   typedef ClutterGeometry BaseObjectType;
00439 
00440   static GType get_type() G_GNUC_CONST;
00441 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00442 
00443   Geometry();
00444 
00445   explicit Geometry(const ClutterGeometry* gobject); // always takes a copy
00446 
00448   ClutterGeometry*       gobj()       { return &gobject_; }
00449 
00451   const ClutterGeometry* gobj() const { return &gobject_; }
00452 
00453 protected:
00454   ClutterGeometry gobject_;
00455 
00456 private:
00457   
00458 public:
00459   Geometry(int x, int y, unsigned int width = 0, unsigned int height = 0);
00460 
00461    int get_x() const;
00462    void set_x(int x);
00463    int get_y() const;
00464    void set_y(int y);
00465   void set_xy(int x, int y);
00466 
00467    unsigned int get_width() const;
00468    void set_width(unsigned int width);
00469    unsigned int get_height() const;
00470    void set_height(unsigned int height);
00471   void set_size(unsigned int width, unsigned int height);
00472 
00473 
00474 };
00475 
00476 } // namespace Clutter
00477 
00478 
00479 namespace Clutter
00480 {
00481 
00487 bool operator==(const Knot& lhs, const Knot& rhs);
00488 
00494 bool operator!=(const Knot& lhs, const Knot& rhs);
00495 
00496 
00497 } // namespace Clutter
00498 
00499 
00500 namespace Glib
00501 {
00502 
00507 Clutter::Knot& wrap(ClutterKnot* object);
00508 
00513 const Clutter::Knot& wrap(const ClutterKnot* object);
00514 
00515 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00516 template <>
00517 class Value<Clutter::Knot> : public Glib::Value_Boxed<Clutter::Knot>
00518 {};
00519 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00520 
00521 } // namespace Glib
00522 
00523 
00524 namespace Glib
00525 {
00526 
00531 Clutter::Vertex& wrap(ClutterVertex* object);
00532 
00537 const Clutter::Vertex& wrap(const ClutterVertex* object);
00538 
00539 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00540 template <>
00541 class Value<Clutter::Vertex> : public Glib::Value_Boxed<Clutter::Vertex>
00542 {};
00543 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00544 
00545 } // namespace Glib
00546 
00547 
00548 namespace Glib
00549 {
00550 
00555 Clutter::Geometry& wrap(ClutterGeometry* object);
00556 
00561 const Clutter::Geometry& wrap(const ClutterGeometry* object);
00562 
00563 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00564 template <>
00565 class Value<Clutter::Geometry> : public Glib::Value_Boxed<Clutter::Geometry>
00566 {};
00567 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00568 
00569 } // namespace Glib
00570 
00571 
00572 #endif /* _CLUTTERMM_TYPES_H */
00573 

Generated on 26 Feb 2010 for cluttermm by  doxygen 1.6.1