media.h
Go to the documentation of this file.00001
00002
00003 #ifndef _CLUTTERMM_MEDIA_H
00004 #define _CLUTTERMM_MEDIA_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 <clutter/clutter.h>
00029
00030
00031 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00032 typedef struct _ClutterMedia ClutterMedia;
00033 typedef struct _ClutterMediaClass ClutterMediaClass;
00034 #endif
00035
00036
00037 namespace Clutter
00038 { class Media_Class; }
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 ClutterMediaIface BaseClassType;
00053
00054 private:
00055 friend class Media_Class;
00056 static CppClassType media_class_;
00057
00058
00059 Media(const Media&);
00060 Media& operator=(const Media&);
00061
00062 protected:
00063 Media();
00064
00071 explicit Media(const Glib::Interface_Class& interface_class);
00072
00073 public:
00074
00075
00076
00077 explicit Media(ClutterMedia* castitem);
00078
00079 protected:
00080 #endif
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
00109 void set_uri(const Glib::ustring& uri);
00110
00117 Glib::ustring get_uri() const;
00118
00124 void set_playing(bool playing=true);
00125
00131 bool get_playing() const;
00132
00139 void set_progress(double progress);
00140
00146 double get_progress() const;
00147
00153 void set_audio_volume(double volume);
00154
00160 double get_audio_volume() const;
00161
00167 double get_buffer_percent() const;
00168
00174 void set_filename(const Glib::ustring& filename);
00175
00181 bool get_can_seek() const;
00182
00188 double get_duration() const;
00189
00190
00196 Glib::SignalProxy0< void > signal_eos();
00197
00198
00199
00200
00201 #ifdef GLIBMM_PROPERTIES_ENABLED
00202
00208 Glib::PropertyProxy_ReadOnly<double> property_buffer_fill() const;
00209 #endif //#GLIBMM_PROPERTIES_ENABLED
00210
00211
00212 #ifdef GLIBMM_PROPERTIES_ENABLED
00213
00219 Glib::PropertyProxy_ReadOnly<bool> property_can_seek() const;
00220 #endif //#GLIBMM_PROPERTIES_ENABLED
00221
00222
00223 #ifdef GLIBMM_PROPERTIES_ENABLED
00224
00230 Glib::PropertyProxy_ReadOnly<guint> property_duration() const;
00231 #endif //#GLIBMM_PROPERTIES_ENABLED
00232
00233
00234 #ifdef GLIBMM_PROPERTIES_ENABLED
00235
00241 Glib::PropertyProxy<bool> property_playing() ;
00242 #endif //#GLIBMM_PROPERTIES_ENABLED
00243
00244 #ifdef GLIBMM_PROPERTIES_ENABLED
00245
00251 Glib::PropertyProxy_ReadOnly<bool> property_playing() const;
00252 #endif //#GLIBMM_PROPERTIES_ENABLED
00253
00254 #ifdef GLIBMM_PROPERTIES_ENABLED
00255
00261 Glib::PropertyProxy<double> property_progress() ;
00262 #endif //#GLIBMM_PROPERTIES_ENABLED
00263
00264 #ifdef GLIBMM_PROPERTIES_ENABLED
00265
00271 Glib::PropertyProxy_ReadOnly<double> property_progress() const;
00272 #endif //#GLIBMM_PROPERTIES_ENABLED
00273
00274 #ifdef GLIBMM_PROPERTIES_ENABLED
00275
00281 Glib::PropertyProxy<Glib::ustring> property_uri() ;
00282 #endif //#GLIBMM_PROPERTIES_ENABLED
00283
00284 #ifdef GLIBMM_PROPERTIES_ENABLED
00285
00291 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_uri() const;
00292 #endif //#GLIBMM_PROPERTIES_ENABLED
00293
00294 #ifdef GLIBMM_PROPERTIES_ENABLED
00295
00301 Glib::PropertyProxy<double> property_audio_volume() ;
00302 #endif //#GLIBMM_PROPERTIES_ENABLED
00303
00304 #ifdef GLIBMM_PROPERTIES_ENABLED
00305
00311 Glib::PropertyProxy_ReadOnly<double> property_audio_volume() const;
00312 #endif //#GLIBMM_PROPERTIES_ENABLED
00313
00314
00315 public:
00316
00317 public:
00318
00319 #ifdef GLIBMM_VFUNCS_ENABLED
00320 #endif //GLIBMM_VFUNCS_ENABLED
00321
00322 protected:
00323
00324 #ifdef GLIBMM_VFUNCS_ENABLED
00325 #endif //GLIBMM_VFUNCS_ENABLED
00326
00327
00328 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00329 virtual void on_eos();
00330 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00331
00332
00333 };
00334
00335 }
00336
00337
00338
00339 namespace Glib
00340 {
00349 Glib::RefPtr<Clutter::Media> wrap(ClutterMedia* object, bool take_copy = false);
00350
00351 }
00352
00353
00354 #endif
00355