shader.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _CLUTTERMM_SHADER_H
00004 #define _CLUTTERMM_SHADER_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 Lesser General Public
00013  * License as published by the Free Software Foundation; either
00014  * version 2.1 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  * Lesser General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Lesser 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 <glibmm/object.h>
00027 #include <clutter/clutter.h>
00028  
00029 
00030 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00031 typedef struct _ClutterShader ClutterShader;
00032 typedef struct _ClutterShaderClass ClutterShaderClass;
00033 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00034 
00035 
00036 namespace Clutter
00037 { class Shader_Class; } // namespace Clutter
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   // noncopyable
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 /* DOXYGEN_SHOULD_SKIP_THIS */
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 
00098   void set_vertex_source(const std::string& source_code);
00099   
00100 
00108   std::string get_vertex_source() const;
00109 
00110     //TODO: Documentation:
00115   void set_fragment_source(const std::string& source_code);
00116   
00117 
00125   std::string get_fragment_source() const;
00126 
00127   
00135 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00136   bool compile();
00137 #else
00138   bool compile(std::auto_ptr<Glib::Error>& error);
00139 #endif //GLIBMM_EXCEPTIONS_ENABLED
00140 
00141   
00148   bool is_compiled() const;
00149   
00154   void release();
00155   
00165   void set_is_enabled(bool enabled = true);
00166   
00172   bool get_is_enabled() const;
00173   
00182   void set_uniform(const Glib::ustring& name, const Glib::ValueBase& value);
00183   
00189   CoglHandle get_cogl_program() const;
00190   
00196   CoglHandle get_cogl_vertex_shader() const;
00197   
00203   CoglHandle get_cogl_fragment_shader() const;
00204 
00205   #ifdef GLIBMM_PROPERTIES_ENABLED
00206 
00212   Glib::PropertyProxy_ReadOnly<bool> property_compiled() const;
00213 #endif //#GLIBMM_PROPERTIES_ENABLED
00214 
00215 
00216   #ifdef GLIBMM_PROPERTIES_ENABLED
00217 
00223   Glib::PropertyProxy<bool> property_enabled() ;
00224 #endif //#GLIBMM_PROPERTIES_ENABLED
00225 
00226 #ifdef GLIBMM_PROPERTIES_ENABLED
00227 
00233   Glib::PropertyProxy_ReadOnly<bool> property_enabled() const;
00234 #endif //#GLIBMM_PROPERTIES_ENABLED
00235 
00236   #ifdef GLIBMM_PROPERTIES_ENABLED
00237 
00243   Glib::PropertyProxy<std::string> property_fragment_source() ;
00244 #endif //#GLIBMM_PROPERTIES_ENABLED
00245 
00246 #ifdef GLIBMM_PROPERTIES_ENABLED
00247 
00253   Glib::PropertyProxy_ReadOnly<std::string> property_fragment_source() const;
00254 #endif //#GLIBMM_PROPERTIES_ENABLED
00255 
00256   #ifdef GLIBMM_PROPERTIES_ENABLED
00257 
00263   Glib::PropertyProxy<std::string> property_vertex_source() ;
00264 #endif //#GLIBMM_PROPERTIES_ENABLED
00265 
00266 #ifdef GLIBMM_PROPERTIES_ENABLED
00267 
00273   Glib::PropertyProxy_ReadOnly<std::string> property_vertex_source() const;
00274 #endif //#GLIBMM_PROPERTIES_ENABLED
00275 
00276 
00277 public:
00278 
00279 public:
00280   //C++ methods used to invoke GTK+ virtual functions:
00281 #ifdef GLIBMM_VFUNCS_ENABLED
00282 #endif //GLIBMM_VFUNCS_ENABLED
00283 
00284 protected:
00285   //GTK+ Virtual Functions (override these to change behaviour):
00286 #ifdef GLIBMM_VFUNCS_ENABLED
00287 #endif //GLIBMM_VFUNCS_ENABLED
00288 
00289   //Default Signal Handlers::
00290 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00291 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00292 
00293 
00294 };
00295 
00296 } // namespace Clutter
00297 // vim:ts=2,sw=2
00298 
00299 
00300 namespace Glib
00301 {
00310   Glib::RefPtr<Clutter::Shader> wrap(ClutterShader* object, bool take_copy = false);
00311 }
00312 
00313 
00314 #endif /* _CLUTTERMM_SHADER_H */
00315 

Generated on 7 Sep 2009 for cluttermm by  doxygen 1.6.1