stage.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _CLUTTERMM_STAGE_H
00004 #define _CLUTTERMM_STAGE_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 <cluttermm/group.h>
00027 #include <cluttermm/color.h>
00028 #include <clutter/clutter.h> // For ClutterPerspective
00029  
00030 
00031 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00032 typedef struct _ClutterStage ClutterStage;
00033 typedef struct _ClutterStageClass ClutterStageClass;
00034 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00035 
00036 
00037 namespace Clutter
00038 { class Stage_Class; } // namespace Clutter
00039 namespace Clutter
00040 {
00041 
00042 typedef ClutterFog Fog;
00043 
00044 class Perspective
00045 {
00046   public:
00047 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00048   typedef Perspective CppObjectType;
00049   typedef ClutterPerspective BaseObjectType;
00050 
00051   static GType get_type() G_GNUC_CONST;
00052 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00053 
00054   Perspective();
00055 
00056   explicit Perspective(const ClutterPerspective* gobject); // always takes a copy
00057 
00059   ClutterPerspective*       gobj()       { return &gobject_; }
00060 
00062   const ClutterPerspective* gobj() const { return &gobject_; }
00063 
00064 protected:
00065   ClutterPerspective gobject_;
00066 
00067 private:
00068   
00069 public:
00070   Perspective(Fixed fovy, Fixed aspect, Fixed z_near, Fixed z_far);
00071 
00072    Fixed get_fovy() const;
00073     void set_fovy(const Fixed& value);
00074     Fixed get_aspect() const;
00075     void set_aspect(const Fixed& value);
00076     Fixed get_z_near() const;
00077     void set_z_near(const Fixed& value);
00078     Fixed get_z_far() const;
00079     void set_z_far(const Fixed& value);
00080  
00081 
00082 };
00083 
00084 
00085 class Stage :
00086   public Group
00087 {
00088   
00089 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00090 
00091 public:
00092   typedef Stage CppObjectType;
00093   typedef Stage_Class CppClassType;
00094   typedef ClutterStage BaseObjectType;
00095   typedef ClutterStageClass BaseClassType;
00096 
00097 private:  friend class Stage_Class;
00098   static CppClassType stage_class_;
00099 
00100 private:
00101   // noncopyable
00102   Stage(const Stage&);
00103   Stage& operator=(const Stage&);
00104 
00105 protected:
00106   explicit Stage(const Glib::ConstructParams& construct_params);
00107   explicit Stage(ClutterStage* castitem);
00108 
00109 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00110 
00111 public:
00112   virtual ~Stage();
00113 
00114 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00115   static GType get_type()      G_GNUC_CONST;
00116   static GType get_base_type() G_GNUC_CONST;
00117 #endif
00118 
00120   ClutterStage*       gobj()       { return reinterpret_cast<ClutterStage*>(gobject_); }
00121 
00123   const ClutterStage* gobj() const { return reinterpret_cast<ClutterStage*>(gobject_); }
00124 
00126   ClutterStage* gobj_copy();
00127 
00128 private:
00129 
00130 
00131 protected:
00132   Stage();
00133 
00134 public:
00135  
00136 
00141   static Glib::RefPtr<Stage> get_default();
00142   
00146   void set_color(const Color& color);
00147   
00152   Color get_color() const;
00153 
00154  
00159   void set_perspectivex(const Perspective& perspective);
00160   
00166   Perspective get_perspectivex() const;
00167 
00168   
00180   void set_perspective(float fovy, float aspect, float z_near, float z_far);
00181   
00192   void get_perspective(float& fovy, float& aspect, float& z_near, float& z_far);
00193   
00199   void fullscreen();
00200   
00207   void unfullscreen();
00208   
00211   void show_cursor();
00212   
00217   void hide_cursor();
00218   
00226   Glib::ustring get_title() const;
00227   
00233   void set_title(const Glib::ustring& title);
00234   
00241   void set_user_resizable(bool value);
00242   
00248   bool get_user_resizable() const;
00249 
00250   
00257   Glib::RefPtr<Actor> get_actor_at_pos(int x, int y);
00258   
00265   Glib::RefPtr<const Actor> get_actor_at_pos(int x, int y) const;
00266 
00267   
00273   Glib::RefPtr<Actor> get_key_focus();
00274   
00280   Glib::RefPtr<const Actor> get_key_focus() const;
00281 
00282   
00290   void set_key_focus(const Glib::RefPtr<Actor>& actor);
00291   void set_key_focus();
00292 
00293   // TODO: Should we rather wrap this as std::string, or
00294   // as std::vector<unsigned char>, or Glib::ArrayHandle<guchar>?
00295   
00308   guchar* read_pixels(int x, int y, int width, int height) const;
00309   
00315   bool get_use_fog() const;
00316   
00329   void set_use_fog(bool fog = true);
00330   
00344   void set_fog(double density, double z_near, double z_far);
00345   
00354   void get_fog(double& density, double& z_near, double& z_far) const;
00355  
00356 
00363   void set_fogx(const Fog& fog);
00364   
00371   void get_fogx(Fog& fog) const;
00372   
00379   double get_resolution() const;
00380   
00386   Fixed get_resolutionx() const;
00387   
00388   
00398   void stage_event(Event* event);
00399   
00406   bool is_default() const;
00407   
00414   void ensure_current();
00415 
00416   
00422   Glib::SignalProxy0< void > signal_fullscreen();
00423 
00424   
00430   Glib::SignalProxy0< void > signal_unfullscreen();
00431 
00432   
00438   Glib::SignalProxy0< void > signal_activate();
00439 
00440   
00446   Glib::SignalProxy0< void > signal_deactivate();
00447 
00448 
00449   #ifdef GLIBMM_PROPERTIES_ENABLED
00450 
00456   Glib::PropertyProxy<Color> property_color() ;
00457 #endif //#GLIBMM_PROPERTIES_ENABLED
00458 
00459 #ifdef GLIBMM_PROPERTIES_ENABLED
00460 
00466   Glib::PropertyProxy_ReadOnly<Color> property_color() const;
00467 #endif //#GLIBMM_PROPERTIES_ENABLED
00468 
00469   #ifdef GLIBMM_PROPERTIES_ENABLED
00470 
00476   Glib::PropertyProxy<bool> property_cursor_visible() ;
00477 #endif //#GLIBMM_PROPERTIES_ENABLED
00478 
00479 #ifdef GLIBMM_PROPERTIES_ENABLED
00480 
00486   Glib::PropertyProxy_ReadOnly<bool> property_cursor_visible() const;
00487 #endif //#GLIBMM_PROPERTIES_ENABLED
00488 
00489   #ifdef GLIBMM_PROPERTIES_ENABLED
00490 
00496   Glib::PropertyProxy<bool> property_fullscreen() ;
00497 #endif //#GLIBMM_PROPERTIES_ENABLED
00498 
00499 #ifdef GLIBMM_PROPERTIES_ENABLED
00500 
00506   Glib::PropertyProxy_ReadOnly<bool> property_fullscreen() const;
00507 #endif //#GLIBMM_PROPERTIES_ENABLED
00508 
00509   #ifdef GLIBMM_PROPERTIES_ENABLED
00510 
00516   Glib::PropertyProxy<bool> property_offscreen() ;
00517 #endif //#GLIBMM_PROPERTIES_ENABLED
00518 
00519 #ifdef GLIBMM_PROPERTIES_ENABLED
00520 
00526   Glib::PropertyProxy_ReadOnly<bool> property_offscreen() const;
00527 #endif //#GLIBMM_PROPERTIES_ENABLED
00528 
00529   #ifdef GLIBMM_PROPERTIES_ENABLED
00530 
00536   Glib::PropertyProxy<Glib::ustring> property_title() ;
00537 #endif //#GLIBMM_PROPERTIES_ENABLED
00538 
00539 #ifdef GLIBMM_PROPERTIES_ENABLED
00540 
00546   Glib::PropertyProxy_ReadOnly<Glib::ustring> property_title() const;
00547 #endif //#GLIBMM_PROPERTIES_ENABLED
00548 
00549   #ifdef GLIBMM_PROPERTIES_ENABLED
00550 
00556   Glib::PropertyProxy<bool> property_use_fog() ;
00557 #endif //#GLIBMM_PROPERTIES_ENABLED
00558 
00559 #ifdef GLIBMM_PROPERTIES_ENABLED
00560 
00566   Glib::PropertyProxy_ReadOnly<bool> property_use_fog() const;
00567 #endif //#GLIBMM_PROPERTIES_ENABLED
00568 
00569   #ifdef GLIBMM_PROPERTIES_ENABLED
00570 
00576   Glib::PropertyProxy<bool> property_user_resizable() ;
00577 #endif //#GLIBMM_PROPERTIES_ENABLED
00578 
00579 #ifdef GLIBMM_PROPERTIES_ENABLED
00580 
00586   Glib::PropertyProxy_ReadOnly<bool> property_user_resizable() const;
00587 #endif //#GLIBMM_PROPERTIES_ENABLED
00588 
00589 
00590 protected:
00591   // From the Clutter Docs:
00592   // Applications should call clutter_actor_queue_redraw and not this function.
00593   //_WRAP_METHOD(void queue_redraw(), clutter_stage_queue_redraw)
00594   
00595 
00596 public:
00597 
00598 public:
00599   //C++ methods used to invoke GTK+ virtual functions:
00600 #ifdef GLIBMM_VFUNCS_ENABLED
00601 #endif //GLIBMM_VFUNCS_ENABLED
00602 
00603 protected:
00604   //GTK+ Virtual Functions (override these to change behaviour):
00605 #ifdef GLIBMM_VFUNCS_ENABLED
00606 #endif //GLIBMM_VFUNCS_ENABLED
00607 
00608   //Default Signal Handlers::
00609 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00610   virtual void on_fullscreen();
00611   virtual void on_unfullscreen();
00612   virtual void on_activate();
00613   virtual void on_deactivate();
00614 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00615 
00616 
00617 };
00618 
00619 } // namespace Clutter
00620 
00621 //vim: ts=2,sw=2
00622 
00623 
00624 namespace Glib
00625 {
00626 
00631 Clutter::Perspective& wrap(ClutterPerspective* object);
00632 
00637 const Clutter::Perspective& wrap(const ClutterPerspective* object);
00638 
00639 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00640 template <>
00641 class Value<Clutter::Perspective> : public Glib::Value_Boxed<Clutter::Perspective>
00642 {};
00643 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00644 
00645 } // namespace Glib
00646 
00647 
00648 namespace Glib
00649 {
00658   Glib::RefPtr<Clutter::Stage> wrap(ClutterStage* object, bool take_copy = false);
00659 }
00660 
00661 
00662 #endif /* _CLUTTERMM_STAGE_H */
00663 

Generated on Tue Feb 24 03:44:23 2009 for cluttermm by  doxygen 1.5.8