behaviour.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _CLUTTERMM_BEHAVIOUR_H
00004 #define _CLUTTERMM_BEHAVIOUR_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/alpha.h>
00027 #include <cluttermm/actor.h>
00028  
00029 
00030 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00031 typedef struct _ClutterBehaviour ClutterBehaviour;
00032 typedef struct _ClutterBehaviourClass ClutterBehaviourClass;
00033 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00034 
00035 
00036 namespace Clutter
00037 { class Behaviour_Class; } // namespace Clutter
00038 namespace Clutter
00039 {
00040 
00041 
00042 class Behaviour : public Glib::Object
00043 {
00044   
00045 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00046 
00047 public:
00048   typedef Behaviour CppObjectType;
00049   typedef Behaviour_Class CppClassType;
00050   typedef ClutterBehaviour BaseObjectType;
00051   typedef ClutterBehaviourClass BaseClassType;
00052 
00053 private:  friend class Behaviour_Class;
00054   static CppClassType behaviour_class_;
00055 
00056 private:
00057   // noncopyable
00058   Behaviour(const Behaviour&);
00059   Behaviour& operator=(const Behaviour&);
00060 
00061 protected:
00062   explicit Behaviour(const Glib::ConstructParams& construct_params);
00063   explicit Behaviour(ClutterBehaviour* castitem);
00064 
00065 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00066 
00067 public:
00068   virtual ~Behaviour();
00069 
00070 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00071   static GType get_type()      G_GNUC_CONST;
00072   static GType get_base_type() G_GNUC_CONST;
00073 #endif
00074 
00076   ClutterBehaviour*       gobj()       { return reinterpret_cast<ClutterBehaviour*>(gobject_); }
00077 
00079   const ClutterBehaviour* gobj() const { return reinterpret_cast<ClutterBehaviour*>(gobject_); }
00080 
00082   ClutterBehaviour* gobj_copy();
00083 
00084 private:
00085 
00086 
00087 protected:
00088   Behaviour();
00089 
00090 public:
00091   //There is no create() because this is an abstract base class.
00092   //_WRAP_CREATE()
00093 
00094   
00101   void apply(const Glib::RefPtr<Actor>& actor);
00102   
00109   void remove(const Glib::RefPtr<Actor>& actor);
00110   
00115   void remove_all();
00116   
00123   bool is_applied(const Glib::RefPtr<Actor>& actor);
00124 
00125  
00134   Glib::SListHandle<Glib::RefPtr<Actor> > get_actors();
00135   
00144   Glib::SListHandle<Glib::RefPtr<const Actor> > get_actors() const;
00145 
00146   
00152   int get_n_actors() const;
00153 
00154   
00161   Glib::RefPtr<Actor> get_nth_actor(int index);
00162   
00169   Glib::RefPtr<const Actor> get_nth_actor(int index) const;
00170 
00171   
00178   Glib::RefPtr<Alpha> get_alpha();
00179   
00186   Glib::RefPtr<const Alpha> get_alpha() const;
00187 
00188   
00199   void set_alpha(const Glib::RefPtr<Alpha>& alpha);
00200 
00201   // TODO: does this need the 'behaviour' argument, or could that be
00202   // approximated with an Object-oriented 'this' pointer?
00206   typedef sigc::slot<void, const Glib::RefPtr<Behaviour>&, const Glib::RefPtr<Actor>&> SlotForEach;
00207 
00208   void actors_foreach(const SlotForEach& slot);
00209   
00210 
00216   Glib::SignalProxy1< void,const Glib::RefPtr<Actor>& > signal_applied();
00217 
00218   
00224   Glib::SignalProxy1< void,const Glib::RefPtr<Actor>& > signal_removed();
00225 
00226 
00227 protected:
00228   #ifdef GLIBMM_VFUNCS_ENABLED
00229   virtual void alpha_notify_vfunc(guint32 alpha_value);
00230 #endif //GLIBMM_VFUNCS_ENABLED
00231 
00232 
00233 public:
00234 
00235 public:
00236   //C++ methods used to invoke GTK+ virtual functions:
00237 #ifdef GLIBMM_VFUNCS_ENABLED
00238 #endif //GLIBMM_VFUNCS_ENABLED
00239 
00240 protected:
00241   //GTK+ Virtual Functions (override these to change behaviour):
00242 #ifdef GLIBMM_VFUNCS_ENABLED
00243 #endif //GLIBMM_VFUNCS_ENABLED
00244 
00245   //Default Signal Handlers::
00246 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00247   virtual void on_applied(const Glib::RefPtr<Actor>& actor);
00248   virtual void on_removed(const Glib::RefPtr<Actor>& actor);
00249 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00250 
00251 
00252 };
00253 
00254 } // namespace Clutter
00255 // vim:ts=2,sw=2
00256 
00257 
00258 namespace Glib
00259 {
00268   Glib::RefPtr<Clutter::Behaviour> wrap(ClutterBehaviour* object, bool take_copy = false);
00269 }
00270 
00271 
00272 #endif /* _CLUTTERMM_BEHAVIOUR_H */
00273 

Generated on Mon Sep 15 05:39:59 2008 for cluttermm by  doxygen 1.5.6