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 Library General Public
00013  * License as published by the Free Software Foundation; either
00014  * version 2 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  * Library General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Library 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 <gdkmm/pixbuf.h>
00029 #include <clutter/clutter-stage.h> // TODO: Remove this when we have a wrapper for ClutterPerspective.
00030  
00031 
00032 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00033 typedef struct _ClutterStage ClutterStage;
00034 typedef struct _ClutterStageClass ClutterStageClass;
00035 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00036 
00037 
00038 namespace Clutter
00039 { class Stage_Class; } // namespace Clutter
00040 namespace Clutter
00041 {
00042 
00043 typedef ClutterFog Fog;
00044 
00045 
00046 class Stage :
00047   public Group
00048 {
00049   
00050 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00051 
00052 public:
00053   typedef Stage CppObjectType;
00054   typedef Stage_Class CppClassType;
00055   typedef ClutterStage BaseObjectType;
00056   typedef ClutterStageClass BaseClassType;
00057 
00058 private:  friend class Stage_Class;
00059   static CppClassType stage_class_;
00060 
00061 private:
00062   // noncopyable
00063   Stage(const Stage&);
00064   Stage& operator=(const Stage&);
00065 
00066 protected:
00067   explicit Stage(const Glib::ConstructParams& construct_params);
00068   explicit Stage(ClutterStage* castitem);
00069 
00070 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00071 
00072 public:
00073   virtual ~Stage();
00074 
00075 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00076   static GType get_type()      G_GNUC_CONST;
00077   static GType get_base_type() G_GNUC_CONST;
00078 #endif
00079 
00081   ClutterStage*       gobj()       { return reinterpret_cast<ClutterStage*>(gobject_); }
00082 
00084   const ClutterStage* gobj() const { return reinterpret_cast<ClutterStage*>(gobject_); }
00085 
00087   ClutterStage* gobj_copy();
00088 
00089 private:
00090 
00091 
00092 protected:
00093   Stage();
00094 
00095 public:
00096  
00097 
00102   static Glib::RefPtr<Stage> get_default();
00103   
00107   void set_color(const Color& color);
00108   
00113   Color get_color() const;
00114   
00115 
00116   // TODO: wrap ClutterPerspective
00117   
00121   void set_perspectivex(ClutterPerspective* perspective);
00122   // TODO: return the perspective by value
00123   
00127   void get_perspectivex(ClutterPerspective* perspective) const;
00128 
00129   
00141   void set_perspective(float fovy, float aspect, float z_near, float z_far);
00142   
00153   void get_perspective(float& fovy, float& aspect, float& z_near, float& z_far);
00154   
00160   void fullscreen();
00161   
00168   void unfullscreen();
00169   
00172   void show_cursor();
00173   
00178   void hide_cursor();
00179   
00187   Glib::ustring get_title() const;
00188   
00194   void set_title(const Glib::ustring& title);
00195   
00202   void set_user_resizable(bool value);
00203   
00209   bool get_user_resizable() const;
00210 
00211   
00218   Glib::RefPtr<Actor> get_actor_at_pos(int x, int y);
00219   
00226   Glib::RefPtr<const Actor> get_actor_at_pos(int x, int y) const;
00227 
00228   
00234   Glib::RefPtr<Actor> get_key_focus();
00235   
00241   Glib::RefPtr<const Actor> get_key_focus() const;
00242 
00243   //TODO: actor can be NULL.
00244   
00252   void set_key_focus(const Glib::RefPtr<Actor>& actor);
00253 
00254   
00264   Glib::RefPtr<Gdk::Pixbuf> snapshot(int x, int y, int width, int height) const;
00265   
00271   bool get_use_fog() const;
00272   
00285   void set_use_fog(bool fog = true);
00286   
00300   void set_fog(double density, double z_near, double z_far);
00301   
00310   void get_fog(double& density, double& z_near, double& z_far) const;
00311  
00312 
00319   void set_fogx(const Fog& fog);
00320   
00327   void get_fogx(Fog& fog) const;
00328   
00335   double get_resolution() const;
00336   
00342   Fixed get_resolutionx() const;
00343   
00344   
00353   void stage_event(Event* event);;
00354 
00355   
00361   Glib::SignalProxy0< void > signal_fullscreen();
00362 
00363   
00369   Glib::SignalProxy0< void > signal_unfullscreen();
00370 
00371   
00377   Glib::SignalProxy0< void > signal_activate();
00378 
00379   
00385   Glib::SignalProxy0< void > signal_deactivate();
00386 
00387 
00388 protected:
00389   #ifdef GLIBMM_VFUNCS_ENABLED
00390   virtual void set_fullscreen_vfunc(bool fullscreen);
00391 #endif //GLIBMM_VFUNCS_ENABLED
00392 
00393   #ifdef GLIBMM_VFUNCS_ENABLED
00394   virtual void set_cursor_visible_vfunc(bool visible);
00395 #endif //GLIBMM_VFUNCS_ENABLED
00396 
00397   #ifdef GLIBMM_VFUNCS_ENABLED
00398   virtual Glib::RefPtr<Gdk::Pixbuf> draw_to_pixbuf_vfunc(int x, int y, int width, int height);
00399 #endif //GLIBMM_VFUNCS_ENABLED
00400 
00401 
00402   #ifdef GLIBMM_VFUNCS_ENABLED
00403   virtual void set_title_vfunc(const Glib::ustring& title);
00404 #endif //GLIBMM_VFUNCS_ENABLED
00405 
00406   #ifdef GLIBMM_VFUNCS_ENABLED
00407   virtual void set_user_resize_vfunc(bool value);
00408 #endif //GLIBMM_VFUNCS_ENABLED
00409 
00410 
00411 public:
00412 
00413 public:
00414   //C++ methods used to invoke GTK+ virtual functions:
00415 #ifdef GLIBMM_VFUNCS_ENABLED
00416 #endif //GLIBMM_VFUNCS_ENABLED
00417 
00418 protected:
00419   //GTK+ Virtual Functions (override these to change behaviour):
00420 #ifdef GLIBMM_VFUNCS_ENABLED
00421 #endif //GLIBMM_VFUNCS_ENABLED
00422 
00423   //Default Signal Handlers::
00424 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00425   virtual void on_fullscreen();
00426   virtual void on_unfullscreen();
00427   virtual void on_activate();
00428   virtual void on_deactivate();
00429 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00430 
00431 
00432 };
00433 
00434 } // namespace Clutter
00435 
00436 //vim: ts=2,sw=2
00437 
00438 
00439 namespace Glib
00440 {
00449   Glib::RefPtr<Clutter::Stage> wrap(ClutterStage* object, bool take_copy = false);
00450 }
00451 
00452 
00453 #endif /* _CLUTTERMM_STAGE_H */
00454 

Generated on Fri Jun 6 02:16:47 2008 for cluttermm by  doxygen 1.5.5