timeline.h
Go to the documentation of this file.00001
00002
00003 #ifndef _CLUTTERMM_TIMELINE_H
00004 #define _CLUTTERMM_TIMELINE_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/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
00034
00035
00036 namespace Clutter
00037 { class Timeline_Class; }
00038 namespace Clutter
00039 {
00040
00046 enum TimelineDirection
00047 {
00048 TIMELINE_FORWARD,
00049 TIMELINE_BACKWARD
00050 };
00051
00052 }
00053
00054
00055 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00056 namespace Glib
00057 {
00058
00059 template <>
00060 class Value<Clutter::TimelineDirection> : public Glib::Value_Enum<Clutter::TimelineDirection>
00061 {
00062 public:
00063 static GType value_type() G_GNUC_CONST;
00064 };
00065
00066 }
00067 #endif
00068
00069
00070 namespace Clutter
00071 {
00072
00073
00074 class Timeline : public Glib::Object
00075 {
00076
00077 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00078
00079 public:
00080 typedef Timeline CppObjectType;
00081 typedef Timeline_Class CppClassType;
00082 typedef ClutterTimeline BaseObjectType;
00083 typedef ClutterTimelineClass BaseClassType;
00084
00085 private: friend class Timeline_Class;
00086 static CppClassType timeline_class_;
00087
00088 private:
00089
00090 Timeline(const Timeline&);
00091 Timeline& operator=(const Timeline&);
00092
00093 protected:
00094 explicit Timeline(const Glib::ConstructParams& construct_params);
00095 explicit Timeline(ClutterTimeline* castitem);
00096
00097 #endif
00098
00099 public:
00100 virtual ~Timeline();
00101
00102 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00103 static GType get_type() G_GNUC_CONST;
00104 static GType get_base_type() G_GNUC_CONST;
00105 #endif
00106
00108 ClutterTimeline* gobj() { return reinterpret_cast<ClutterTimeline*>(gobject_); }
00109
00111 const ClutterTimeline* gobj() const { return reinterpret_cast<ClutterTimeline*>(gobject_); }
00112
00114 ClutterTimeline* gobj_copy();
00115
00116 private:
00117
00118
00119 protected:
00120 explicit Timeline(guint num_frames, guint fps);
00121 explicit Timeline(guint duration);
00122 public:
00123
00124 static Glib::RefPtr<Timeline> create(guint n_frames, guint fps);
00125
00126
00127 static Glib::RefPtr<Timeline> create(guint msecs);
00128
00129
00130
00131
00132
00141 Glib::RefPtr<Timeline> clone() const;
00142
00143
00150 void set_duration(guint msecs);
00151
00158 guint get_duration() const;
00159
00163 void set_speed(guint fps);
00164
00168 guint get_speed() const;
00169
00172 void start();
00173
00176 void pause();
00177
00180 void stop();
00181
00186 void rewind();
00187
00191 void set_loop(bool loop = true);
00192
00196 bool get_loop() const;
00197
00201 void skip(guint n_frames);
00202
00206 void advance(guint frame_num);
00207
00211 int get_current_frame() const;
00212
00225 guint get_delta(guint& msecs) const;
00226 guint get_delta() const;
00227
00231 void set_n_frames(guint n_frames);
00232
00236 guint get_n_frames() const;
00237
00241 bool is_playing() const;
00242
00248 void set_delay(guint msecs);
00249
00255 guint get_delay() const;
00256
00262 double get_progress() const;
00263
00269 Fixed get_progressx() const;
00270
00277 void set_direction(TimelineDirection direction);
00278
00285 TimelineDirection get_direction() const;
00286
00287
00300 Glib::StringArrayHandle list_markers(gint frame_num) const;
00301
00310 void add_marker_at_time(const Glib::ustring& marker_name, guint msecs);
00311
00324 void add_marker_at_frame(const Glib::ustring& marker_name, guint frame_num);
00325
00332 bool has_marker(const Glib::ustring& marker_name);
00333
00339 void remove_marker(const Glib::ustring& marker_name);
00340
00346 void advance_to_marker(const Glib::ustring& marker_name);
00347
00348 #ifdef GLIBMM_PROPERTIES_ENABLED
00349
00355 Glib::PropertyProxy<guint> property_delay() ;
00356 #endif //#GLIBMM_PROPERTIES_ENABLED
00357
00358 #ifdef GLIBMM_PROPERTIES_ENABLED
00359
00365 Glib::PropertyProxy_ReadOnly<guint> property_delay() const;
00366 #endif //#GLIBMM_PROPERTIES_ENABLED
00367
00368 #ifdef GLIBMM_PROPERTIES_ENABLED
00369
00375 Glib::PropertyProxy<TimelineDirection> property_direction() ;
00376 #endif //#GLIBMM_PROPERTIES_ENABLED
00377
00378 #ifdef GLIBMM_PROPERTIES_ENABLED
00379
00385 Glib::PropertyProxy_ReadOnly<TimelineDirection> property_direction() const;
00386 #endif //#GLIBMM_PROPERTIES_ENABLED
00387
00388 #ifdef GLIBMM_PROPERTIES_ENABLED
00389
00395 Glib::PropertyProxy<guint> property_duration() ;
00396 #endif //#GLIBMM_PROPERTIES_ENABLED
00397
00398 #ifdef GLIBMM_PROPERTIES_ENABLED
00399
00405 Glib::PropertyProxy_ReadOnly<guint> property_duration() const;
00406 #endif //#GLIBMM_PROPERTIES_ENABLED
00407
00408 #ifdef GLIBMM_PROPERTIES_ENABLED
00409
00415 Glib::PropertyProxy<guint> property_fps() ;
00416 #endif //#GLIBMM_PROPERTIES_ENABLED
00417
00418 #ifdef GLIBMM_PROPERTIES_ENABLED
00419
00425 Glib::PropertyProxy_ReadOnly<guint> property_fps() const;
00426 #endif //#GLIBMM_PROPERTIES_ENABLED
00427
00428 #ifdef GLIBMM_PROPERTIES_ENABLED
00429
00435 Glib::PropertyProxy<bool> property_loop() ;
00436 #endif //#GLIBMM_PROPERTIES_ENABLED
00437
00438 #ifdef GLIBMM_PROPERTIES_ENABLED
00439
00445 Glib::PropertyProxy_ReadOnly<bool> property_loop() const;
00446 #endif //#GLIBMM_PROPERTIES_ENABLED
00447
00448 #ifdef GLIBMM_PROPERTIES_ENABLED
00449
00455 Glib::PropertyProxy<guint> property_num_frames() ;
00456 #endif //#GLIBMM_PROPERTIES_ENABLED
00457
00458 #ifdef GLIBMM_PROPERTIES_ENABLED
00459
00465 Glib::PropertyProxy_ReadOnly<guint> property_num_frames() const;
00466 #endif //#GLIBMM_PROPERTIES_ENABLED
00467
00468
00474 Glib::SignalProxy0< void > signal_completed();
00475
00476
00482 Glib::SignalProxy1< void,gint > signal_new_frame();
00483
00484
00490 Glib::SignalProxy0< void > signal_paused();
00491
00492
00498 Glib::SignalProxy0< void > signal_started();
00499
00500
00501
00502
00503
00504
00510 Glib::SignalProxy2< void,const Glib::ustring&,int > signal_marker_reached();
00511
00512
00513 public:
00514
00515 public:
00516
00517 #ifdef GLIBMM_VFUNCS_ENABLED
00518 #endif //GLIBMM_VFUNCS_ENABLED
00519
00520 protected:
00521
00522 #ifdef GLIBMM_VFUNCS_ENABLED
00523 #endif //GLIBMM_VFUNCS_ENABLED
00524
00525
00526 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00527 virtual void on_completed();
00528 virtual void on_new_frame(gint fram_num);
00529 virtual void on_paused();
00530 virtual void on_started();
00531 virtual void on_marker_reached(const Glib::ustring& marker_name, int frame_num);
00532 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00533
00534
00535 };
00536
00537 }
00538
00539
00540 namespace Glib
00541 {
00550 Glib::RefPtr<Clutter::Timeline> wrap(ClutterTimeline* object, bool take_copy = false);
00551 }
00552
00553
00554 #endif
00555