00001
00002
00003 #ifndef _CLUTTERMM_SCRIPTABLE_H
00004 #define _CLUTTERMM_SCRIPTABLE_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 <glibmm/interface.h>
00027 #include <glibmm/ustring.h>
00028 #include <cluttermm/script.h>
00029 #include <clutter/clutter-scriptable.h>
00030
00031
00032 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00033 typedef struct _ClutterScriptable ClutterScriptable;
00034 typedef struct _ClutterScriptableClass ClutterScriptableClass;
00035 #endif
00036
00037
00038 namespace Clutter
00039 { class Scriptable_Class; }
00040 namespace Clutter
00041 {
00042
00043
00044 class Scriptable : public Glib::Interface
00045 {
00046
00047 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00048
00049 public:
00050 typedef Scriptable CppObjectType;
00051 typedef Scriptable_Class CppClassType;
00052 typedef ClutterScriptable BaseObjectType;
00053 typedef ClutterScriptableIface BaseClassType;
00054
00055 private:
00056 friend class Scriptable_Class;
00057 static CppClassType scriptable_class_;
00058
00059
00060 Scriptable(const Scriptable&);
00061 Scriptable& operator=(const Scriptable&);
00062
00063 protected:
00064 Scriptable();
00065
00072 explicit Scriptable(const Glib::Interface_Class& interface_class);
00073
00074 public:
00075
00076
00077
00078 explicit Scriptable(ClutterScriptable* castitem);
00079
00080 protected:
00081 #endif
00082
00083 public:
00084 virtual ~Scriptable();
00085
00086 static void add_interface(GType gtype_implementer);
00087
00088 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00089 static GType get_type() G_GNUC_CONST;
00090 static GType get_base_type() G_GNUC_CONST;
00091 #endif
00092
00094 ClutterScriptable* gobj() { return reinterpret_cast<ClutterScriptable*>(gobject_); }
00095
00097 const ClutterScriptable* gobj() const { return reinterpret_cast<ClutterScriptable*>(gobject_); }
00098
00099 private:
00100
00101
00102 public:
00103
00114 void set_id(const std::string& id);
00115
00122 std::string get_id() const;
00123
00124
00125
00126
00137 bool parse_custom_node(const Glib::RefPtr<Script>& script, Glib::ValueBase& value, const Glib::ustring& name, JsonNode* node);
00138
00147 void set_custom_property(const Glib::RefPtr<Script>& script, const Glib::ustring& name, const Glib::ValueBase& value);
00148
00149 protected:
00150
00151 #ifdef GLIBMM_VFUNCS_ENABLED
00152 virtual void set_id_vfunc(const std::string& id);
00153 #endif //GLIBMM_VFUNCS_ENABLED
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164 #ifdef GLIBMM_VFUNCS_ENABLED
00165 virtual const char* get_id_vfunc() const;
00166 #endif //GLIBMM_VFUNCS_ENABLED
00167
00168
00169 #ifdef GLIBMM_VFUNCS_ENABLED
00170 virtual void set_custom_property_vfunc(const Glib::RefPtr<Script>& script, const Glib::ustring& name, const Glib::ValueBase& value);
00171 #endif //GLIBMM_VFUNCS_ENABLED
00172
00173
00174
00175
00176
00177 public:
00178
00179 public:
00180
00181 #ifdef GLIBMM_VFUNCS_ENABLED
00182 #endif //GLIBMM_VFUNCS_ENABLED
00183
00184 protected:
00185
00186 #ifdef GLIBMM_VFUNCS_ENABLED
00187 #endif //GLIBMM_VFUNCS_ENABLED
00188
00189
00190 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00191 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00192
00193
00194 };
00195
00196 }
00197
00198
00199
00200 namespace Glib
00201 {
00210 Glib::RefPtr<Clutter::Scriptable> wrap(ClutterScriptable* object, bool take_copy = false);
00211
00212 }
00213
00214
00215 #endif
00216