]> www.fi.muni.cz Git - evince.git/blob - libview/ev-timeline.h
Merge branch 'unmessify-my-pdfs' - bgo#627443 - Add an 'Open containing folder' command
[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., 51 Franklin Street, Fifth Floor, 
19  * Boston, MA 02110-1301, USA.
20  */
21
22 #if !defined (EVINCE_COMPILATION)
23 #error "This is a private header."
24 #endif
25
26 #ifndef __EV_TIMELINE_H__
27 #define __EV_TIMELINE_H__
28
29 #include <glib-object.h>
30
31 G_BEGIN_DECLS
32
33 #define EV_TYPE_TIMELINE                 (ev_timeline_get_type ())
34 #define EV_TIMELINE(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_TIMELINE, EvTimeline))
35 #define EV_TIMELINE_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass),  EV_TYPE_TIMELINE, EvTimelineClass))
36 #define EV_IS_TIMELINE(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_TIMELINE))
37 #define EV_IS_TIMELINE_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass),  EV_TYPE_TIMELINE))
38 #define EV_TIMELINE_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj),  EV_TYPE_TIMELINE, EvTimelineClass))
39
40 typedef struct EvTimeline      EvTimeline;
41 typedef struct EvTimelineClass EvTimelineClass;
42
43 struct EvTimeline {
44         GObject parent_instance;
45 };
46
47 struct EvTimelineClass {
48         GObjectClass parent_class;
49
50         /* vmethods */
51         void (* start)             (EvTimeline *timeline);
52
53         /* signals */
54         void (* started)           (EvTimeline *timeline);
55         void (* finished)          (EvTimeline *timeline);
56         void (* paused)            (EvTimeline *timeline);
57
58         void (* frame)             (EvTimeline *timeline,
59                                     gdouble     progress);
60 };
61
62
63 GType                 ev_timeline_get_type           (void) G_GNUC_CONST;
64
65 EvTimeline           *ev_timeline_new                (guint                    duration);
66
67 void                  ev_timeline_start              (EvTimeline             *timeline);
68 void                  ev_timeline_pause              (EvTimeline             *timeline);
69 void                  ev_timeline_rewind             (EvTimeline             *timeline);
70
71 gboolean              ev_timeline_is_running         (EvTimeline             *timeline);
72
73 guint                 ev_timeline_get_fps            (EvTimeline             *timeline);
74 void                  ev_timeline_set_fps            (EvTimeline             *timeline,
75                                                       guint                   fps);
76
77 gboolean              ev_timeline_get_loop           (EvTimeline             *timeline);
78 void                  ev_timeline_set_loop           (EvTimeline             *timeline,
79                                                       gboolean                loop);
80
81 guint                 ev_timeline_get_duration       (EvTimeline             *timeline);
82 void                  ev_timeline_set_duration       (EvTimeline             *timeline,
83                                                       guint                   duration);
84
85 gdouble               ev_timeline_get_progress       (EvTimeline             *timeline);
86
87
88 G_END_DECLS
89
90 #endif /* __EV_TIMELINE_H__ */