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 
00047 enum PickMode
00048 {
00049   PICK_NONE,
00050   PICK_REACTIVE,
00051   PICK_ALL
00052 };
00053 
00054 } // namespace Clutter
00055 
00056 
00057 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00058 namespace Glib
00059 {
00060 
00061 template <>
00062 class Value<Clutter::PickMode> : public Glib::Value_Enum<Clutter::PickMode>
00063 {
00064 public:
00065   static GType value_type() G_GNUC_CONST;
00066 };
00067 
00068 } // namespace Glib
00069 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00070 
00071 
00072 namespace Clutter
00073 {
00074 
00075 
00076 typedef ClutterFog Fog;
00077 
00078 class Perspective
00079 {
00080   public:
00081 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00082   typedef Perspective CppObjectType;
00083   typedef ClutterPerspective BaseObjectType;
00084 
00085   static GType get_type() G_GNUC_CONST;
00086 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00087 
00088   Perspective();
00089 
00090   explicit Perspective(const ClutterPerspective* gobject); // always takes a copy
00091 
00093   ClutterPerspective*       gobj()       { return &gobject_; }
00094 
00096   const ClutterPerspective* gobj() const { return &gobject_; }
00097 
00098 protected:
00099   ClutterPerspective gobject_;
00100 
00101 private:
00102   
00103 public:
00104   Perspective(Cogl::Fixed fovy, Cogl::Fixed aspect, Cogl::Fixed z_near, Cogl::Fixed z_far);
00105 
00106    Cogl::Fixed get_fovy() const;
00107     void set_fovy(const Cogl::Fixed& value);
00108     Cogl::Fixed get_aspect() const;
00109     void set_aspect(const Cogl::Fixed& value);
00110     Cogl::Fixed get_z_near() const;
00111     void set_z_near(const Cogl::Fixed& value);
00112     Cogl::Fixed get_z_far() const;
00113     void set_z_far(const Cogl::Fixed& value);
00114  
00115 
00116 };
00117 
00118 
00119 class Stage :
00120   public Group
00121 {
00122   
00123 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00124 
00125 public:
00126   typedef Stage CppObjectType;
00127   typedef Stage_Class CppClassType;
00128   typedef ClutterStage BaseObjectType;
00129   typedef ClutterStageClass BaseClassType;
00130 
00131 private:  friend class Stage_Class;
00132   static CppClassType stage_class_;
00133 
00134 private:
00135   // noncopyable
00136   Stage(const Stage&);
00137   Stage& operator=(const Stage&);
00138 
00139 protected:
00140   explicit Stage(const Glib::ConstructParams& construct_params);
00141   explicit Stage(ClutterStage* castitem);
00142 
00143 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00144 
00145 public:
00146   virtual ~Stage();
00147 
00148 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00149   static GType get_type()      G_GNUC_CONST;
00150   static GType get_base_type() G_GNUC_CONST;
00151 #endif
00152 
00154   ClutterStage*       gobj()       { return reinterpret_cast<ClutterStage*>(gobject_); }
00155 
00157   const ClutterStage* gobj() const { return reinterpret_cast<ClutterStage*>(gobject_); }
00158 
00160   ClutterStage* gobj_copy();
00161 
00162 private:
00163 
00164 
00165 protected:
00166   Stage();
00167 
00168 public:
00169  
00170 
00175   static Glib::RefPtr<Stage> get_default();
00176   
00180   void set_color(const Color& color);
00181   
00186   Color get_color() const;
00187 
00188  
00192   void set_perspective(const Perspective& prespective);
00193   
00197   void get_perspective(Perspective& prespective);
00198   //gtkmmproc error: clutter_stage_fullscreen : method defs lookup failed (1)
00199   //gtkmmproc error: clutter_stage_unfullscreen : method defs lookup failed (1)
00200   
00203   void show_cursor();
00204   
00209   void hide_cursor();
00210   
00218   Glib::ustring get_title() const;
00219   
00225   void set_title(const Glib::ustring& title);
00226   
00233   void set_user_resizable(bool value);
00234   
00240   bool get_user_resizable() const;
00241 
00242   
00254   Glib::RefPtr<Actor> get_actor_at_pos(PickMode pick_mode, int x, int y);
00255   
00267   Glib::RefPtr<const Actor> get_actor_at_pos(PickMode pick_mode, int x, int y) const;
00268 
00269   
00275   Glib::RefPtr<Actor> get_key_focus();
00276   
00282   Glib::RefPtr<const Actor> get_key_focus() const;
00283 
00284   
00292   void set_key_focus(const Glib::RefPtr<Actor>& actor);
00293   void set_key_focus();
00294 
00295   // TODO: Should we rather wrap this as std::string, or
00296   // as std::vector<unsigned char>, or Glib::ArrayHandle<guchar>?
00297   
00313   guchar* read_pixels(int x, int y, int width, int height) const;
00314   
00320   bool get_use_fog() const;
00321   
00334   void set_use_fog(bool fog = true);
00335  
00336 
00359   void set_fog(const Fog& fog);
00360   
00366   void get_fog(Fog& fog) const;
00367   
00368   
00378   void stage_event(Event* event);
00379   
00386   bool is_default() const;
00387   
00394   void ensure_current();
00395   
00407   void ensure_viewport();
00408 
00409   
00415   Glib::SignalProxy0< void > signal_fullscreen();
00416 
00417   
00423   Glib::SignalProxy0< void > signal_unfullscreen();
00424 
00425   
00431   Glib::SignalProxy0< void > signal_activate();
00432 
00433   
00439   Glib::SignalProxy0< void > signal_deactivate();
00440 
00441 
00442   #ifdef GLIBMM_PROPERTIES_ENABLED
00443 
00449   Glib::PropertyProxy<Color> property_color() ;
00450 #endif //#GLIBMM_PROPERTIES_ENABLED
00451 
00452 #ifdef GLIBMM_PROPERTIES_ENABLED
00453 
00459   Glib::PropertyProxy_ReadOnly<Color> property_color() const;
00460 #endif //#GLIBMM_PROPERTIES_ENABLED
00461 
00462   #ifdef GLIBMM_PROPERTIES_ENABLED
00463 
00469   Glib::PropertyProxy<bool> property_cursor_visible() ;
00470 #endif //#GLIBMM_PROPERTIES_ENABLED
00471 
00472 #ifdef GLIBMM_PROPERTIES_ENABLED
00473 
00479   Glib::PropertyProxy_ReadOnly<bool> property_cursor_visible() const;
00480 #endif //#GLIBMM_PROPERTIES_ENABLED
00481 
00482   #ifdef GLIBMM_PROPERTIES_ENABLED
00483 
00489   Glib::PropertyProxy<bool> property_fullscreen() ;
00490 #endif //#GLIBMM_PROPERTIES_ENABLED
00491 
00492 #ifdef GLIBMM_PROPERTIES_ENABLED
00493 
00499   Glib::PropertyProxy_ReadOnly<bool> property_fullscreen() const;
00500 #endif //#GLIBMM_PROPERTIES_ENABLED
00501 
00502   #ifdef GLIBMM_PROPERTIES_ENABLED
00503 
00509   Glib::PropertyProxy<bool> property_offscreen() ;
00510 #endif //#GLIBMM_PROPERTIES_ENABLED
00511 
00512 #ifdef GLIBMM_PROPERTIES_ENABLED
00513 
00519   Glib::PropertyProxy_ReadOnly<bool> property_offscreen() const;
00520 #endif //#GLIBMM_PROPERTIES_ENABLED
00521 
00522   #ifdef GLIBMM_PROPERTIES_ENABLED
00523 
00529   Glib::PropertyProxy<Glib::ustring> property_title() ;
00530 #endif //#GLIBMM_PROPERTIES_ENABLED
00531 
00532 #ifdef GLIBMM_PROPERTIES_ENABLED
00533 
00539   Glib::PropertyProxy_ReadOnly<Glib::ustring> property_title() const;
00540 #endif //#GLIBMM_PROPERTIES_ENABLED
00541 
00542   #ifdef GLIBMM_PROPERTIES_ENABLED
00543 
00549   Glib::PropertyProxy<bool> property_use_fog() ;
00550 #endif //#GLIBMM_PROPERTIES_ENABLED
00551 
00552 #ifdef GLIBMM_PROPERTIES_ENABLED
00553 
00559   Glib::PropertyProxy_ReadOnly<bool> property_use_fog() const;
00560 #endif //#GLIBMM_PROPERTIES_ENABLED
00561 
00562   #ifdef GLIBMM_PROPERTIES_ENABLED
00563 
00569   Glib::PropertyProxy<bool> property_user_resizable() ;
00570 #endif //#GLIBMM_PROPERTIES_ENABLED
00571 
00572 #ifdef GLIBMM_PROPERTIES_ENABLED
00573 
00579   Glib::PropertyProxy_ReadOnly<bool> property_user_resizable() const;
00580 #endif //#GLIBMM_PROPERTIES_ENABLED
00581 
00582 
00583 protected:
00584   // From the Clutter Docs:
00585   // Applications should call clutter_actor_queue_redraw and not this function.
00586   //_WRAP_METHOD(void queue_redraw(), clutter_stage_queue_redraw)
00587   
00588 
00589 public:
00590 
00591 public:
00592   //C++ methods used to invoke GTK+ virtual functions:
00593 #ifdef GLIBMM_VFUNCS_ENABLED
00594 #endif //GLIBMM_VFUNCS_ENABLED
00595 
00596 protected:
00597   //GTK+ Virtual Functions (override these to change behaviour):
00598 #ifdef GLIBMM_VFUNCS_ENABLED
00599 #endif //GLIBMM_VFUNCS_ENABLED
00600 
00601   //Default Signal Handlers::
00602 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00603   virtual void on_fullscreen();
00604   virtual void on_unfullscreen();
00605   virtual void on_activate();
00606   virtual void on_deactivate();
00607 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00608 
00609 
00610 };
00611 
00612 } // namespace Clutter
00613 
00614 //vim: ts=2,sw=2
00615 
00616 
00617 namespace Glib
00618 {
00619 
00624 Clutter::Perspective& wrap(ClutterPerspective* object);
00625 
00630 const Clutter::Perspective& wrap(const ClutterPerspective* object);
00631 
00632 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00633 template <>
00634 class Value<Clutter::Perspective> : public Glib::Value_Boxed<Clutter::Perspective>
00635 {};
00636 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00637 
00638 } // namespace Glib
00639 
00640 
00641 namespace Glib
00642 {
00651   Glib::RefPtr<Clutter::Stage> wrap(ClutterStage* object, bool take_copy = false);
00652 }
00653 
00654 
00655 #endif /* _CLUTTERMM_STAGE_H */
00656 

Generated on 7 Sep 2009 for cluttermm by  doxygen 1.6.1