// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _CLUTTERMM_MEDIA_H
#define _CLUTTERMM_MEDIA_H


#include <glibmm.h>


/* Copyright (C) 2007 The cluttermm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <glibmm/interface.h>
#include <glibmm/ustring.h>
#include <clutter/clutter.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _ClutterMedia ClutterMedia;
typedef struct _ClutterMediaClass ClutterMediaClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Clutter
{ class Media_Class; } // namespace Clutter
namespace Clutter
{


class Media : public Glib::Interface
{
  
#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
  typedef Media CppObjectType;
  typedef Media_Class CppClassType;
  typedef ClutterMedia BaseObjectType;
  typedef ClutterMediaIface BaseClassType;

private:
  friend class Media_Class;
  static CppClassType media_class_;

  // noncopyable
  Media(const Media&);
  Media& operator=(const Media&);

protected:
  Media(); // you must derive from this class

  /** Called by constructors of derived classes. Provide the result of 
   * the Class init() function to ensure that it is properly 
   * initialized.
   * 
   * @param interface_class The Class object for the derived type.
   */
  explicit Media(const Glib::Interface_Class& interface_class);

public:
  // This is public so that C++ wrapper instances can be
  // created for C instances of unwrapped types.
  // For instance, if an unexpected C type implements the C interface. 
  explicit Media(ClutterMedia* castitem);

protected:
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:
  virtual ~Media();

  static void add_interface(GType gtype_implementer);

#ifndef DOXYGEN_SHOULD_SKIP_THIS
  static GType get_type()      G_GNUC_CONST;
  static GType get_base_type() G_GNUC_CONST;
#endif

  ///Provides access to the underlying C GObject.
  ClutterMedia*       gobj()       { return reinterpret_cast<ClutterMedia*>(gobject_); }

  ///Provides access to the underlying C GObject.  
  const ClutterMedia* gobj() const { return reinterpret_cast<ClutterMedia*>(gobject_); }

private:


public:

  
  /** Sets the URI of @a media to @a uri.
   * 
   * @newin{0,2}
   * @param uri The URI of the media stream.
   */
  void set_uri(const Glib::ustring& uri);
  
  /** Retrieves the URI from @a media.
   * 
   * @newin{0,2}
   * @return The URI of the media stream. Use Glib::free()
   * to free the returned string.
   */
  Glib::ustring get_uri() const;
  
  /** Starts or stops playing of @a media.
   * 
   * @newin{0,2}
   * @param playing <tt>true</tt> to start playing.
   */
  void set_playing(bool playing=true);
  
  /** Retrieves the playing status of @a media.
   * 
   * @newin{0,2}
   * @return <tt>true</tt> if playing, <tt>false</tt> if stopped.
   */
  bool get_playing() const;
  
  /** Sets the playback progress of @a media. The @a progress is
   * a normalized value between 0.0 (begin) and 1.0 (end).
   * 
   * @newin{1,0}
   * @param progress The progress of the playback, between 0.0 and 1.0.
   */
  void set_progress(double progress);
  
  /** Retrieves the playback progress of @a media.
   * 
   * @newin{1,0}
   * @return The playback progress, between 0.0 and 1.0.
   */
  double get_progress() const;
  
  /** Sets the location of a subtitle file to display while playing @a media.
   * 
   * @newin{1,2}
   * @param uri The URI of a subtitle file.
   */
  void set_subtitle_uri(const gchar  *uri);
  
  /** Retrieves the URI of the subtitle file in use.
   * 
   * @newin{1,2}
   * @return The URI of the subtitle file. Use Glib::free()
   * to free the returned string.
   */
  std::string get_subtitle_uri() const;
  
  /** Sets the font used by the subtitle renderer. The @a font_name string must be
   * either <tt>0</tt>, which means that the default font name of the underlying
   * implementation will be used; or must follow the grammar recognized by
   * pango_font_description_from_string() like:
   * 
   * |[
   * clutter_media_set_subtitle_font_name (media, "Sans 24pt");
   * ]|
   * 
   * @newin{1,2}
   * @param font_name A font name, or <tt>0</tt> to set the default font name.
   */
  void set_subtitle_font_name(const std::string& font_name);
  
  /** Retrieves the font name currently used.
   * 
   * @newin{1,2}
   * @return A string containing the font name. Use Glib::free()
   * to free the returned string.
   */
  std::string get_subtitle_font_name() const;
  
  /** Sets the playback volume of @a media to @a volume.
   * 
   * @newin{1,0}
   * @param volume The volume as a double between 0.0 and 1.0.
   */
  void set_audio_volume(double volume);
  
  /** Retrieves the playback volume of @a media.
   * 
   * @newin{1,0}
   * @return The playback volume between 0.0 and 1.0.
   */
  double get_audio_volume() const;
  
  /** Retrieves the amount of the stream that is buffered.
   * 
   * @newin{1,0}
   * @return The fill level, between 0.0 and 1.0.
   */
  double get_buffer_percent() const;
  
  /** Sets the source of @a media using a file path.
   * 
   * @newin{0,2}
   * @param filename A filename.
   */
  void set_filename(const Glib::ustring& filename);
  
  /** Retrieves whether @a media is seekable or not.
   * 
   * @newin{0,2}
   * @return <tt>true</tt> if @a media can seek, <tt>false</tt> otherwise.
   */
  bool get_can_seek() const;
  
  /** Retrieves the duration of the media stream that @a media represents.
   * 
   * @newin{0,2}
   * @return The duration of the media stream, in seconds.
   */
  double get_duration() const;

  
  /**
   * @par Prototype:
   * <tt>void on_my_%eos()</tt>
   */

  Glib::SignalProxy0< void > signal_eos();

  // TODO: figure out what to do with this GError parameter
  //_WRAP_SIGNAL(void error(GError* error), "error")

  #ifdef GLIBMM_PROPERTIES_ENABLED
/** The fill level of the buffer.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<double> property_buffer_fill() const;
#endif //#GLIBMM_PROPERTIES_ENABLED


  #ifdef GLIBMM_PROPERTIES_ENABLED
/** Whether the current stream is seekable.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<bool> property_can_seek() const;
#endif //#GLIBMM_PROPERTIES_ENABLED


  #ifdef GLIBMM_PROPERTIES_ENABLED
/** The duration of the stream, in seconds.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<guint> property_duration() const;
#endif //#GLIBMM_PROPERTIES_ENABLED


  #ifdef GLIBMM_PROPERTIES_ENABLED
/** Wheter the actor is playing.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy<bool> property_playing() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** Wheter the actor is playing.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<bool> property_playing() const;
#endif //#GLIBMM_PROPERTIES_ENABLED

  #ifdef GLIBMM_PROPERTIES_ENABLED
/** Current progress of the playback.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy<double> property_progress() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** Current progress of the playback.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<double> property_progress() const;
#endif //#GLIBMM_PROPERTIES_ENABLED

  #ifdef GLIBMM_PROPERTIES_ENABLED
/** URI of a media file.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy<Glib::ustring> property_uri() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** URI of a media file.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<Glib::ustring> property_uri() const;
#endif //#GLIBMM_PROPERTIES_ENABLED

  #ifdef GLIBMM_PROPERTIES_ENABLED
/** The volume of the audio.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy<double> property_audio_volume() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** The volume of the audio.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<double> property_audio_volume() const;
#endif //#GLIBMM_PROPERTIES_ENABLED

  #ifdef GLIBMM_PROPERTIES_ENABLED
/** The font used to display subtitles.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy<Glib::ustring> property_subtitle_font_name() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** The font used to display subtitles.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<Glib::ustring> property_subtitle_font_name() const;
#endif //#GLIBMM_PROPERTIES_ENABLED

  #ifdef GLIBMM_PROPERTIES_ENABLED
/** URI of a subtitle file.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy<Glib::ustring> property_subtitle_uri() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** URI of a subtitle file.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<Glib::ustring> property_subtitle_uri() const;
#endif //#GLIBMM_PROPERTIES_ENABLED


public:

public:
  //C++ methods used to invoke GTK+ virtual functions:

protected:
  //GTK+ Virtual Functions (override these to change behaviour):

  //Default Signal Handlers::
  virtual void on_eos();


};

} // namespace Clutter
//vim: ts=2,sw=2


namespace Glib
{
  /** A Glib::wrap() method for this object.
   * 
   * @param object The C instance.
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
   * @result A C++ instance that wraps this C instance.
   *
   * @relates Clutter::Media
   */
  Glib::RefPtr<Clutter::Media> wrap(ClutterMedia* object, bool take_copy = false);

} // namespace Glib


#endif /* _CLUTTERMM_MEDIA_H */

