1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 2007 Carlos Garnacho <carlos@imendio.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #ifndef __GTK_TIMELINE_H__
21 #define __GTK_TIMELINE_H__
23 #include <glib-object.h>
24 #include <gtk/gtkenums.h>
29 #define GTK_TYPE_TIMELINE (_gtk_timeline_get_type ())
30 #define GTK_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TIMELINE, GtkTimeline))
31 #define GTK_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TIMELINE, GtkTimelineClass))
32 #define GTK_IS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TIMELINE))
33 #define GTK_IS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TIMELINE))
34 #define GTK_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TIMELINE, GtkTimelineClass))
36 typedef struct GtkTimeline GtkTimeline;
37 typedef struct GtkTimelineClass GtkTimelineClass;
40 GTK_TIMELINE_DIRECTION_FORWARD,
41 GTK_TIMELINE_DIRECTION_BACKWARD
42 } GtkTimelineDirection;
45 GTK_TIMELINE_PROGRESS_LINEAR,
46 GTK_TIMELINE_PROGRESS_EASE,
47 GTK_TIMELINE_PROGRESS_EASE_IN,
48 GTK_TIMELINE_PROGRESS_EASE_OUT,
49 GTK_TIMELINE_PROGRESS_EASE_IN_OUT
50 } GtkTimelineProgressType;
54 GObject parent_instance;
58 struct GtkTimelineClass
60 GObjectClass parent_class;
62 void (* started) (GtkTimeline *timeline);
63 void (* finished) (GtkTimeline *timeline);
64 void (* paused) (GtkTimeline *timeline);
66 void (* frame) (GtkTimeline *timeline,
69 void (* __gtk_reserved1) (void);
70 void (* __gtk_reserved2) (void);
71 void (* __gtk_reserved3) (void);
72 void (* __gtk_reserved4) (void);
76 GType _gtk_timeline_get_type (void) G_GNUC_CONST;
78 GtkTimeline * _gtk_timeline_new (guint duration);
79 GtkTimeline * _gtk_timeline_new_for_screen (guint duration,
82 void _gtk_timeline_start (GtkTimeline *timeline);
83 void _gtk_timeline_pause (GtkTimeline *timeline);
84 void _gtk_timeline_rewind (GtkTimeline *timeline);
86 gboolean _gtk_timeline_is_running (GtkTimeline *timeline);
88 guint _gtk_timeline_get_fps (GtkTimeline *timeline);
89 void _gtk_timeline_set_fps (GtkTimeline *timeline,
92 gboolean _gtk_timeline_get_loop (GtkTimeline *timeline);
93 void _gtk_timeline_set_loop (GtkTimeline *timeline,
96 guint _gtk_timeline_get_duration (GtkTimeline *timeline);
97 void _gtk_timeline_set_duration (GtkTimeline *timeline,
100 GdkScreen * _gtk_timeline_get_screen (GtkTimeline *timeline);
101 void _gtk_timeline_set_screen (GtkTimeline *timeline,
104 GtkTimelineDirection _gtk_timeline_get_direction (GtkTimeline *timeline);
105 void _gtk_timeline_set_direction (GtkTimeline *timeline,
106 GtkTimelineDirection direction);
108 gdouble _gtk_timeline_get_progress (GtkTimeline *timeline);
110 GtkTimelineProgressType _gtk_timeline_get_progress_type (GtkTimeline *timeline);
111 void _gtk_timeline_set_progress_type (GtkTimeline *timeline,
112 GtkTimelineProgressType progress_type);
117 #endif /* __GTK_TIMELINE_H__ */