media.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _CLUTTERMM_MEDIA_H
00004 #define _CLUTTERMM_MEDIA_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 Library General Public
00013  * License as published by the Free Software Foundation; either
00014  * version 2 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  * Library General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Library 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/interface.h>
00027 #include <glibmm/ustring.h>
00028 #include <clutter/clutter-media.h>
00029  
00030 
00031 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00032 typedef struct _ClutterMedia ClutterMedia;
00033 typedef struct _ClutterMediaClass ClutterMediaClass;
00034 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00035 
00036 
00037 namespace Clutter
00038 { class Media_Class; } // namespace Clutter
00039 namespace Clutter
00040 {
00041 
00042 
00043 class Media : public Glib::Interface
00044 {
00045   
00046 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00047 
00048 public:
00049   typedef Media CppObjectType;
00050   typedef Media_Class CppClassType;
00051   typedef ClutterMedia BaseObjectType;
00052   typedef ClutterMediaInterface BaseClassType;
00053 
00054 private:
00055   friend class Media_Class;
00056   static CppClassType media_class_;
00057 
00058   // noncopyable
00059   Media(const Media&);
00060   Media& operator=(const Media&);
00061 
00062 protected:
00063   Media(); // you must derive from this class
00064 
00071   explicit Media(const Glib::Interface_Class& interface_class);
00072 
00073 public:
00074   // This is public so that C++ wrapper instances can be
00075   // created for C instances of unwrapped types.
00076   // For instance, if an unexpected C type implements the C interface. 
00077   explicit Media(ClutterMedia* castitem);
00078 
00079 protected:
00080 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00081 
00082 public:
00083   virtual ~Media();
00084 
00085   static void add_interface(GType gtype_implementer);
00086 
00087 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00088   static GType get_type()      G_GNUC_CONST;
00089   static GType get_base_type() G_GNUC_CONST;
00090 #endif
00091 
00093   ClutterMedia*       gobj()       { return reinterpret_cast<ClutterMedia*>(gobject_); }
00094 
00096   const ClutterMedia* gobj() const { return reinterpret_cast<ClutterMedia*>(gobject_); }
00097 
00098 private:
00099 
00100 
00101 public:
00102 
00103   
00107   void set_uri(const Glib::ustring& uri);
00108   
00112   Glib::ustring get_uri() const;
00113   
00117   void set_playing(bool playing=true);
00118   
00122   bool get_playing() const;
00123   
00127   void set_position(int position);
00128   
00132   int get_position() const;
00133   
00137   void set_volume(double volume);
00138   
00142   double get_volume() const;
00143   
00147   int get_buffer_percent() const;
00148   
00152   void set_filename(const Glib::ustring& filename);
00153   
00157   bool get_can_seek() const;
00158   
00162   int get_duration() const;
00163 
00164 
00170   Glib::SignalProxy0< void > signal_eos();
00171 
00172   // TODO: figure out what to do with this GError parameter
00173   //_WRAP_SIGNAL(void error(GError* error), "error")
00174 
00175   #ifdef GLIBMM_PROPERTIES_ENABLED
00176 
00182   Glib::PropertyProxy_ReadOnly<int> property_buffer_percent() const;
00183 #endif //#GLIBMM_PROPERTIES_ENABLED
00184 
00185 
00186   #ifdef GLIBMM_PROPERTIES_ENABLED
00187 
00193   Glib::PropertyProxy_ReadOnly<bool> property_can_seek() const;
00194 #endif //#GLIBMM_PROPERTIES_ENABLED
00195 
00196 
00197   #ifdef GLIBMM_PROPERTIES_ENABLED
00198 
00204   Glib::PropertyProxy_ReadOnly<int> property_duration() const;
00205 #endif //#GLIBMM_PROPERTIES_ENABLED
00206 
00207 
00208   #ifdef GLIBMM_PROPERTIES_ENABLED
00209 
00215   Glib::PropertyProxy<bool> property_playing() ;
00216 #endif //#GLIBMM_PROPERTIES_ENABLED
00217 
00218 #ifdef GLIBMM_PROPERTIES_ENABLED
00219 
00225   Glib::PropertyProxy_ReadOnly<bool> property_playing() const;
00226 #endif //#GLIBMM_PROPERTIES_ENABLED
00227 
00228   #ifdef GLIBMM_PROPERTIES_ENABLED
00229 
00235   Glib::PropertyProxy<int> property_position() ;
00236 #endif //#GLIBMM_PROPERTIES_ENABLED
00237 
00238 #ifdef GLIBMM_PROPERTIES_ENABLED
00239 
00245   Glib::PropertyProxy_ReadOnly<int> property_position() const;
00246 #endif //#GLIBMM_PROPERTIES_ENABLED
00247 
00248   #ifdef GLIBMM_PROPERTIES_ENABLED
00249 
00255   Glib::PropertyProxy<Glib::ustring> property_uri() ;
00256 #endif //#GLIBMM_PROPERTIES_ENABLED
00257 
00258 #ifdef GLIBMM_PROPERTIES_ENABLED
00259 
00265   Glib::PropertyProxy_ReadOnly<Glib::ustring> property_uri() const;
00266 #endif //#GLIBMM_PROPERTIES_ENABLED
00267 
00268   #ifdef GLIBMM_PROPERTIES_ENABLED
00269 
00275   Glib::PropertyProxy<double> property_volume() ;
00276 #endif //#GLIBMM_PROPERTIES_ENABLED
00277 
00278 #ifdef GLIBMM_PROPERTIES_ENABLED
00279 
00285   Glib::PropertyProxy_ReadOnly<double> property_volume() const;
00286 #endif //#GLIBMM_PROPERTIES_ENABLED
00287 
00288 
00289 protected:
00290 
00291  
00292   #ifdef GLIBMM_VFUNCS_ENABLED
00293   virtual void set_uri_vfunc(const Glib::ustring& uri);
00294 #endif //GLIBMM_VFUNCS_ENABLED
00295 
00296 
00297   // Note: We cannot return a Glib::ustring here since the C API expects a
00298   // const gchar* as return value. const gchar* however means that the returned
00299   // value is not supposed to be freed by the caller. If we would want to return
00300   // Glib::ustring here, what should we pass to the underlying C API then?
00301   // ustring.c_str() doesn't work since the ustring destroys the data upon
00302   // destruction (which means, we would effectively return an invalid pointer).
00303   // We also can't copy the ustring's content since we would leak that copy
00304   // otherwise.
00305   #ifdef GLIBMM_VFUNCS_ENABLED
00306   virtual const char* get_uri_vfunc() const;
00307 #endif //GLIBMM_VFUNCS_ENABLED
00308 
00309   #ifdef GLIBMM_VFUNCS_ENABLED
00310   virtual void set_playing_vfunc(bool playing);
00311 #endif //GLIBMM_VFUNCS_ENABLED
00312 
00313   #ifdef GLIBMM_VFUNCS_ENABLED
00314   virtual bool get_playing_vfunc() const;
00315 #endif //GLIBMM_VFUNCS_ENABLED
00316 
00317   #ifdef GLIBMM_VFUNCS_ENABLED
00318   virtual void set_position_vfunc(int position);
00319 #endif //GLIBMM_VFUNCS_ENABLED
00320 
00321   #ifdef GLIBMM_VFUNCS_ENABLED
00322   virtual int get_position_vfunc() const;
00323 #endif //GLIBMM_VFUNCS_ENABLED
00324 
00325   #ifdef GLIBMM_VFUNCS_ENABLED
00326   virtual void set_volume_vfunc(double volume);
00327 #endif //GLIBMM_VFUNCS_ENABLED
00328 
00329   #ifdef GLIBMM_VFUNCS_ENABLED
00330   virtual double get_volume_vfunc() const;
00331 #endif //GLIBMM_VFUNCS_ENABLED
00332 
00333   #ifdef GLIBMM_VFUNCS_ENABLED
00334   virtual bool can_seek_vfunc() const;
00335 #endif //GLIBMM_VFUNCS_ENABLED
00336 
00337   #ifdef GLIBMM_VFUNCS_ENABLED
00338   virtual int get_buffer_percent_vfunc() const;
00339 #endif //GLIBMM_VFUNCS_ENABLED
00340 
00341   #ifdef GLIBMM_VFUNCS_ENABLED
00342   virtual int get_duration_vfunc() const;
00343 #endif //GLIBMM_VFUNCS_ENABLED
00344 
00345 
00346 public:
00347 
00348 public:
00349   //C++ methods used to invoke GTK+ virtual functions:
00350 #ifdef GLIBMM_VFUNCS_ENABLED
00351 #endif //GLIBMM_VFUNCS_ENABLED
00352 
00353 protected:
00354   //GTK+ Virtual Functions (override these to change behaviour):
00355 #ifdef GLIBMM_VFUNCS_ENABLED
00356 #endif //GLIBMM_VFUNCS_ENABLED
00357 
00358   //Default Signal Handlers::
00359 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00360   virtual void on_eos();
00361 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00362 
00363 
00364 };
00365 
00366 } // namespace Clutter
00367 //vim: ts=2,sw=2
00368 
00369 
00370 namespace Glib
00371 {
00380   Glib::RefPtr<Clutter::Media> wrap(ClutterMedia* object, bool take_copy = false);
00381 
00382 } // namespace Glib
00383 
00384 
00385 #endif /* _CLUTTERMM_MEDIA_H */
00386 

Generated on Tue Aug 12 00:05:40 2008 for cluttermm by  doxygen 1.5.4