behaviour.h
Go to the documentation of this file.00001
00002
00003 #ifndef _CLUTTERMM_BEHAVIOUR_H
00004 #define _CLUTTERMM_BEHAVIOUR_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
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
00034
00035
00036 namespace Clutter
00037 { class Behaviour_Class; }
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
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
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
00092
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
00202 void set_alpha(const Glib::RefPtr<Alpha>& alpha);
00203
00204
00205
00209 typedef sigc::slot<void, const Glib::RefPtr<Behaviour>&, const Glib::RefPtr<Actor>&> SlotForEach;
00210
00211 void actors_foreach(const SlotForEach& slot);
00212
00213
00219 Glib::SignalProxy1< void,const Glib::RefPtr<Actor>& > signal_applied();
00220
00221
00227 Glib::SignalProxy1< void,const Glib::RefPtr<Actor>& > signal_removed();
00228
00229
00230 protected:
00231 #ifdef GLIBMM_VFUNCS_ENABLED
00232 virtual void alpha_notify_vfunc(double alpha_value);
00233 #endif //GLIBMM_VFUNCS_ENABLED
00234
00235
00236 public:
00237
00238 public:
00239
00240 #ifdef GLIBMM_VFUNCS_ENABLED
00241 #endif //GLIBMM_VFUNCS_ENABLED
00242
00243 protected:
00244
00245 #ifdef GLIBMM_VFUNCS_ENABLED
00246 #endif //GLIBMM_VFUNCS_ENABLED
00247
00248
00249 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00250 virtual void on_applied(const Glib::RefPtr<Actor>& actor);
00251 virtual void on_removed(const Glib::RefPtr<Actor>& actor);
00252 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00253
00254
00255 };
00256
00257 }
00258
00259
00260
00261 namespace Glib
00262 {
00271 Glib::RefPtr<Clutter::Behaviour> wrap(ClutterBehaviour* object, bool take_copy = false);
00272 }
00273
00274
00275 #endif
00276