]> www.fi.muni.cz Git - evince.git/blob - libview/ev-timeline.h
534e48ad49086f30c9cd73083be164e210c741e4
[evince.git] / libview / ev-timeline.h
1 /* ev-timeline.h
2  *  this file is part of evince, a gnome document viewer
3  *
4  * Copyright (C) 2007 Carlos Garnacho <carlos@imendio.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22 #ifndef __EV_TIMELINE_H__
23 #define __EV_TIMELINE_H__
24
25 #include <glib-object.h>
26
27 G_BEGIN_DECLS
28
29 #define EV_TYPE_TIMELINE                 (ev_timeline_get_type ())
30 #define EV_TIMELINE(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_TIMELINE, EvTimeline))
31 #define EV_TIMELINE_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass),  EV_TYPE_TIMELINE, EvTimelineClass))
32 #define EV_IS_TIMELINE(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_TIMELINE))
33 #define EV_IS_TIMELINE_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass),  EV_TYPE_TIMELINE))
34 #define EV_TIMELINE_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj),  EV_TYPE_TIMELINE, EvTimelineClass))
35
36 typedef struct EvTimeline      EvTimeline;
37 typedef struct EvTimelineClass EvTimelineClass;
38
39 struct EvTimeline {
40         GObject parent_instance;
41 };
42
43 struct EvTimelineClass {
44         GObjectClass parent_class;
45
46         /* vmethods */
47         void (* start)             (EvTimeline *timeline);
48
49         /* signals */
50         void (* started)           (EvTimeline *timeline);
51         void (* finished)          (EvTimeline *timeline);
52         void (* paused)            (EvTimeline *timeline);
53
54         void (* frame)             (EvTimeline *timeline,
55                                     gdouble     progress);
56 };
57
58
59 GType                 ev_timeline_get_type           (void) G_GNUC_CONST;
60
61 EvTimeline           *ev_timeline_new                (guint                    duration);
62
63 void                  ev_timeline_start              (EvTimeline             *timeline);
64 void                  ev_timeline_pause              (EvTimeline             *timeline);
65 void                  ev_timeline_rewind             (EvTimeline             *timeline);
66
67 gboolean              ev_timeline_is_running         (EvTimeline             *timeline);
68
69 guint                 ev_timeline_get_fps            (EvTimeline             *timeline);
70 void                  ev_timeline_set_fps            (EvTimeline             *timeline,
71                                                       guint                   fps);
72
73 gboolean              ev_timeline_get_loop           (EvTimeline             *timeline);
74 void                  ev_timeline_set_loop           (EvTimeline             *timeline,
75                                                       gboolean                loop);
76
77 guint                 ev_timeline_get_duration       (EvTimeline             *timeline);
78 void                  ev_timeline_set_duration       (EvTimeline             *timeline,
79                                                       guint                   duration);
80
81 gdouble               ev_timeline_get_progress       (EvTimeline             *timeline);
82
83
84 G_END_DECLS
85
86 #endif /* __EV_TIMELINE_H__ */