3
* Copyright (C) 2008 Carlos Garnacho <carlos@imendio.com>
5
* This program is free software; you can redistribute it and/or modify it
6
* under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
20
#ifndef __GSD_TIMELINE_H__
21
#define __GSD_TIMELINE_H__
23
#include <glib-object.h>
28
#define GSD_TYPE_TIMELINE_DIRECTION (gsd_timeline_direction_get_type ())
29
#define GSD_TYPE_TIMELINE_PROGRESS_TYPE (gsd_timeline_progress_type_get_type ())
30
#define GSD_TYPE_TIMELINE (gsd_timeline_get_type ())
31
#define GSD_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSD_TYPE_TIMELINE, GsdTimeline))
32
#define GSD_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSD_TYPE_TIMELINE, GsdTimelineClass))
33
#define GSD_IS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSD_TYPE_TIMELINE))
34
#define GSD_IS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSD_TYPE_TIMELINE))
35
#define GSD_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSD_TYPE_TIMELINE, GsdTimelineClass))
38
GSD_TIMELINE_DIRECTION_FORWARD,
39
GSD_TIMELINE_DIRECTION_BACKWARD
40
} GsdTimelineDirection;
43
GSD_TIMELINE_PROGRESS_LINEAR,
44
GSD_TIMELINE_PROGRESS_SINUSOIDAL,
45
GSD_TIMELINE_PROGRESS_EXPONENTIAL
46
} GsdTimelineProgressType;
48
typedef struct GsdTimeline GsdTimeline;
49
typedef struct GsdTimelineClass GsdTimelineClass;
53
GObject parent_instance;
56
struct GsdTimelineClass
58
GObjectClass parent_class;
60
void (* started) (GsdTimeline *timeline);
61
void (* finished) (GsdTimeline *timeline);
62
void (* paused) (GsdTimeline *timeline);
64
void (* frame) (GsdTimeline *timeline,
67
void (* __gsd_reserved1) (void);
68
void (* __gsd_reserved2) (void);
69
void (* __gsd_reserved3) (void);
70
void (* __gsd_reserved4) (void);
73
typedef gdouble (*GsdTimelineProgressFunc) (gdouble progress);
76
GType gsd_timeline_get_type (void) G_GNUC_CONST;
77
GType gsd_timeline_direction_get_type (void) G_GNUC_CONST;
78
GType gsd_timeline_progress_type_get_type (void) G_GNUC_CONST;
80
GsdTimeline *gsd_timeline_new (guint duration);
81
GsdTimeline *gsd_timeline_new_for_screen (guint duration,
84
void gsd_timeline_start (GsdTimeline *timeline);
85
void gsd_timeline_pause (GsdTimeline *timeline);
86
void gsd_timeline_rewind (GsdTimeline *timeline);
88
gboolean gsd_timeline_is_running (GsdTimeline *timeline);
90
guint gsd_timeline_get_fps (GsdTimeline *timeline);
91
void gsd_timeline_set_fps (GsdTimeline *timeline,
94
gboolean gsd_timeline_get_loop (GsdTimeline *timeline);
95
void gsd_timeline_set_loop (GsdTimeline *timeline,
98
guint gsd_timeline_get_duration (GsdTimeline *timeline);
99
void gsd_timeline_set_duration (GsdTimeline *timeline,
102
GdkScreen *gsd_timeline_get_screen (GsdTimeline *timeline);
103
void gsd_timeline_set_screen (GsdTimeline *timeline,
106
GsdTimelineDirection gsd_timeline_get_direction (GsdTimeline *timeline);
107
void gsd_timeline_set_direction (GsdTimeline *timeline,
108
GsdTimelineDirection direction);
110
GsdTimelineProgressType gsd_timeline_get_progress_type (GsdTimeline *timeline);
111
void gsd_timeline_set_progress_type (GsdTimeline *timeline,
112
GsdTimelineProgressType type);
113
void gsd_timeline_get_progress_func (GsdTimeline *timeline);
115
void gsd_timeline_set_progress_func (GsdTimeline *timeline,
116
GsdTimelineProgressFunc progress_func);
118
gdouble gsd_timeline_get_progress (GsdTimeline *timeline);
123
#endif /* __GSD_TIMELINE_H__ */