00001
00002
00003 #ifndef _CLUTTERMM_SHADER_H
00004 #define _CLUTTERMM_SHADER_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/object.h>
00027 #include <clutter/clutter-shader.h>
00028
00029
00030 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00031 typedef struct _ClutterShader ClutterShader;
00032 typedef struct _ClutterShaderClass ClutterShaderClass;
00033 #endif
00034
00035
00036 namespace Clutter
00037 { class Shader_Class; }
00038 namespace Clutter
00039 {
00040
00041
00042 class Shader : public Glib::Object
00043 {
00044
00045 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00046
00047 public:
00048 typedef Shader CppObjectType;
00049 typedef Shader_Class CppClassType;
00050 typedef ClutterShader BaseObjectType;
00051 typedef ClutterShaderClass BaseClassType;
00052
00053 private: friend class Shader_Class;
00054 static CppClassType shader_class_;
00055
00056 private:
00057
00058 Shader(const Shader&);
00059 Shader& operator=(const Shader&);
00060
00061 protected:
00062 explicit Shader(const Glib::ConstructParams& construct_params);
00063 explicit Shader(ClutterShader* castitem);
00064
00065 #endif
00066
00067 public:
00068 virtual ~Shader();
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 ClutterShader* gobj() { return reinterpret_cast<ClutterShader*>(gobject_); }
00077
00079 const ClutterShader* gobj() const { return reinterpret_cast<ClutterShader*>(gobject_); }
00080
00082 ClutterShader* gobj_copy();
00083
00084 private:
00085
00086
00087 protected:
00088 Shader();
00089
00090 public:
00091
00092 static Glib::RefPtr<Shader> create();
00093
00094
00095
00096 void set_vertex_source(const std::string& source_code);
00097
00098
00106 std::string get_vertex_source() const;
00107
00108
00109 void set_fragment_source(const std::string& source_code);
00110
00111
00119 std::string get_fragment_source() const;
00120
00121
00127 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00128 bool bind();
00129 #else
00130 bool bind(std::auto_ptr<Glib::Error>& error);
00131 #endif //GLIBMM_EXCEPTIONS_ENABLED
00132
00133
00138 void release();
00139
00145 bool is_bound() const;
00146
00152 void set_is_enabled(bool enabled = true);
00153
00159 bool get_is_enabled() const;
00160
00161 #ifdef GLIBMM_PROPERTIES_ENABLED
00162
00168 Glib::PropertyProxy_ReadOnly<bool> property_bound() const;
00169 #endif //#GLIBMM_PROPERTIES_ENABLED
00170
00171
00172 #ifdef GLIBMM_PROPERTIES_ENABLED
00173
00179 Glib::PropertyProxy<bool> property_enabled() ;
00180 #endif //#GLIBMM_PROPERTIES_ENABLED
00181
00182 #ifdef GLIBMM_PROPERTIES_ENABLED
00183
00189 Glib::PropertyProxy_ReadOnly<bool> property_enabled() const;
00190 #endif //#GLIBMM_PROPERTIES_ENABLED
00191
00192 #ifdef GLIBMM_PROPERTIES_ENABLED
00193
00199 Glib::PropertyProxy<std::string> property_fragment_source() ;
00200 #endif //#GLIBMM_PROPERTIES_ENABLED
00201
00202 #ifdef GLIBMM_PROPERTIES_ENABLED
00203
00209 Glib::PropertyProxy_ReadOnly<std::string> property_fragment_source() const;
00210 #endif //#GLIBMM_PROPERTIES_ENABLED
00211
00212 #ifdef GLIBMM_PROPERTIES_ENABLED
00213
00219 Glib::PropertyProxy<std::string> property_vertex_source() ;
00220 #endif //#GLIBMM_PROPERTIES_ENABLED
00221
00222 #ifdef GLIBMM_PROPERTIES_ENABLED
00223
00229 Glib::PropertyProxy_ReadOnly<std::string> property_vertex_source() const;
00230 #endif //#GLIBMM_PROPERTIES_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 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00248
00249
00250 };
00251
00252 }
00253
00254
00255
00256 namespace Glib
00257 {
00266 Glib::RefPtr<Clutter::Shader> wrap(ClutterShader* object, bool take_copy = false);
00267 }
00268
00269
00270 #endif
00271