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
00199 void set_alpha(const Glib::RefPtr<Alpha>& alpha);
00200
00201
00202
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
00237 #ifdef GLIBMM_VFUNCS_ENABLED
00238 #endif //GLIBMM_VFUNCS_ENABLED
00239
00240 protected:
00241
00242 #ifdef GLIBMM_VFUNCS_ENABLED
00243 #endif //GLIBMM_VFUNCS_ENABLED
00244
00245
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 }
00255
00256
00257
00258 namespace Glib
00259 {
00268 Glib::RefPtr<Clutter::Behaviour> wrap(ClutterBehaviour* object, bool take_copy = false);
00269 }
00270
00271
00272 #endif
00273