timeline.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _CLUTTERMM_TIMELINE_H
00004 #define _CLUTTERMM_TIMELINE_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/object.h>
00027 #include <cluttermm/types.h>
00028 
00029 
00030 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00031 typedef struct _ClutterTimeline ClutterTimeline;
00032 typedef struct _ClutterTimelineClass ClutterTimelineClass;
00033 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00034 
00035 
00036 namespace Clutter
00037 { class Timeline_Class; } // namespace Clutter
00038 namespace Clutter
00039 {
00040 
00046 enum TimelineDirection
00047 {
00048   TIMELINE_FORWARD,
00049   TIMELINE_BACKWARD
00050 };
00051 
00052 
00053 class Timeline : public Glib::Object
00054 {
00055   
00056 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00057 
00058 public:
00059   typedef Timeline CppObjectType;
00060   typedef Timeline_Class CppClassType;
00061   typedef ClutterTimeline BaseObjectType;
00062   typedef ClutterTimelineClass BaseClassType;
00063 
00064 private:  friend class Timeline_Class;
00065   static CppClassType timeline_class_;
00066 
00067 private:
00068   // noncopyable
00069   Timeline(const Timeline&);
00070   Timeline& operator=(const Timeline&);
00071 
00072 protected:
00073   explicit Timeline(const Glib::ConstructParams& construct_params);
00074   explicit Timeline(ClutterTimeline* castitem);
00075 
00076 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00077 
00078 public:
00079   virtual ~Timeline();
00080 
00081 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00082   static GType get_type()      G_GNUC_CONST;
00083   static GType get_base_type() G_GNUC_CONST;
00084 #endif
00085 
00087   ClutterTimeline*       gobj()       { return reinterpret_cast<ClutterTimeline*>(gobject_); }
00088 
00090   const ClutterTimeline* gobj() const { return reinterpret_cast<ClutterTimeline*>(gobject_); }
00091 
00093   ClutterTimeline* gobj_copy();
00094 
00095 private:
00096 
00097 
00098 protected:
00099   explicit Timeline(guint num_frames, guint fps);
00100   explicit Timeline(guint msecs);
00101 public:
00102   
00103   static Glib::RefPtr<Timeline> create(guint n_frames, guint fps);
00104 
00105   
00106   static Glib::RefPtr<Timeline> create(guint msecs);
00107 
00108   
00109   //We don't wrap this as a copy constructor because there is 
00110   //no way to use copy constructors with RefPtr:
00111   
00120   Glib::RefPtr<Timeline> clone() const;
00121 
00122   
00129   void set_duration(guint msecs);
00130   
00137   guint get_duration() const;
00138   
00142   void set_speed(guint fps);
00143   
00147   guint get_speed() const;
00148   
00151   void start();
00152   
00155   void pause();
00156   
00159   void stop();
00160   
00165   void rewind();
00166   
00170   void set_loop(bool loop = true);
00171   
00175   bool get_loop() const;
00176   
00180   void skip(guint n_frames);
00181   
00185   void advance(guint frame_num);
00186   
00190   int get_current_frame() const;
00191   
00204   guint get_delta(guint& msecs) const;
00205   guint get_delta() const;
00206   
00210   void set_n_frames(guint n_frames);
00211   
00215   guint get_n_frames() const;
00216   
00220   bool is_playing() const;
00221   
00227   void set_delay(guint msecs);
00228   
00234   guint get_delay() const;
00235   
00241   double get_progress() const;
00242   
00248   Fixed get_progressx() const;
00249   
00256   void set_direction(TimelineDirection direction);
00257   
00264   TimelineDirection get_direction() const;
00265 
00266   
00279   Glib::StringArrayHandle list_markers(gint frame_num) const;
00280   
00289   void add_marker_at_time(const Glib::ustring& marker_name, guint msecs);
00290   
00303   void add_marker_at_frame(const Glib::ustring& marker_name, guint frame_num);
00304   
00311   bool has_marker(const Glib::ustring& marker_name);
00312   
00318   void remove_marker(const Glib::ustring& marker_name);
00319   
00325   void advance_to_marker(const Glib::ustring& marker_name);
00326 
00327   #ifdef GLIBMM_PROPERTIES_ENABLED
00328 
00334   Glib::PropertyProxy<guint> property_delay() ;
00335 #endif //#GLIBMM_PROPERTIES_ENABLED
00336 
00337 #ifdef GLIBMM_PROPERTIES_ENABLED
00338 
00344   Glib::PropertyProxy_ReadOnly<guint> property_delay() const;
00345 #endif //#GLIBMM_PROPERTIES_ENABLED
00346 
00347   #ifdef GLIBMM_PROPERTIES_ENABLED
00348 
00354   Glib::PropertyProxy<TimelineDirection> property_direction() ;
00355 #endif //#GLIBMM_PROPERTIES_ENABLED
00356 
00357 #ifdef GLIBMM_PROPERTIES_ENABLED
00358 
00364   Glib::PropertyProxy_ReadOnly<TimelineDirection> property_direction() const;
00365 #endif //#GLIBMM_PROPERTIES_ENABLED
00366 
00367   #ifdef GLIBMM_PROPERTIES_ENABLED
00368 
00374   Glib::PropertyProxy<guint> property_duration() ;
00375 #endif //#GLIBMM_PROPERTIES_ENABLED
00376 
00377 #ifdef GLIBMM_PROPERTIES_ENABLED
00378 
00384   Glib::PropertyProxy_ReadOnly<guint> property_duration() const;
00385 #endif //#GLIBMM_PROPERTIES_ENABLED
00386 
00387   #ifdef GLIBMM_PROPERTIES_ENABLED
00388 
00394   Glib::PropertyProxy<guint> property_fps() ;
00395 #endif //#GLIBMM_PROPERTIES_ENABLED
00396 
00397 #ifdef GLIBMM_PROPERTIES_ENABLED
00398 
00404   Glib::PropertyProxy_ReadOnly<guint> property_fps() const;
00405 #endif //#GLIBMM_PROPERTIES_ENABLED
00406 
00407   #ifdef GLIBMM_PROPERTIES_ENABLED
00408 
00414   Glib::PropertyProxy<bool> property_loop() ;
00415 #endif //#GLIBMM_PROPERTIES_ENABLED
00416 
00417 #ifdef GLIBMM_PROPERTIES_ENABLED
00418 
00424   Glib::PropertyProxy_ReadOnly<bool> property_loop() const;
00425 #endif //#GLIBMM_PROPERTIES_ENABLED
00426 
00427   #ifdef GLIBMM_PROPERTIES_ENABLED
00428 
00434   Glib::PropertyProxy<guint> property_num_frames() ;
00435 #endif //#GLIBMM_PROPERTIES_ENABLED
00436 
00437 #ifdef GLIBMM_PROPERTIES_ENABLED
00438 
00444   Glib::PropertyProxy_ReadOnly<guint> property_num_frames() const;
00445 #endif //#GLIBMM_PROPERTIES_ENABLED
00446 
00447 
00453   Glib::SignalProxy0< void > signal_completed();
00454 
00455   
00461   Glib::SignalProxy1< void,gint > signal_new_frame();
00462 
00463   
00469   Glib::SignalProxy0< void > signal_paused();
00470 
00471   
00477   Glib::SignalProxy0< void > signal_started();
00478 
00479 
00480   // TODO: This signal is detailed, though I don't think we can wrap the
00481   // detail in Glibmm yet. armin.
00482  
00483 
00489   Glib::SignalProxy2< void,const Glib::ustring&,int > signal_marker_reached();
00490 
00491 
00492 public:
00493 
00494 public:
00495   //C++ methods used to invoke GTK+ virtual functions:
00496 #ifdef GLIBMM_VFUNCS_ENABLED
00497 #endif //GLIBMM_VFUNCS_ENABLED
00498 
00499 protected:
00500   //GTK+ Virtual Functions (override these to change behaviour):
00501 #ifdef GLIBMM_VFUNCS_ENABLED
00502 #endif //GLIBMM_VFUNCS_ENABLED
00503 
00504   //Default Signal Handlers::
00505 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00506   virtual void on_completed();
00507   virtual void on_new_frame(gint fram_num);
00508   virtual void on_paused();
00509   virtual void on_started();
00510   virtual void on_marker_reached(const Glib::ustring& marker_name, int frame_num);
00511 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00512 
00513 
00514 };
00515 
00516 } // namespace Clutter
00517 
00518 
00519 namespace Glib
00520 {
00529   Glib::RefPtr<Clutter::Timeline> wrap(ClutterTimeline* object, bool take_copy = false);
00530 }
00531 
00532 
00533 #endif /* _CLUTTERMM_TIMELINE_H */
00534 

Generated on Mon Sep 15 05:42:12 2008 for cluttermm by  doxygen 1.5.6