]> Pileus Git - ~andy/gtk/blob - gtk/gtktimeline.h
Add optional colord support to the CUPS print module
[~andy/gtk] / gtk / gtktimeline.h
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 2007 Carlos Garnacho <carlos@imendio.com>
3  *
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.
8  *
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.
13  *
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.
18  */
19
20 #ifndef __GTK_TIMELINE_H__
21 #define __GTK_TIMELINE_H__
22
23 #include <glib-object.h>
24 #include <gtk/gtkenums.h>
25 #include <gdk/gdk.h>
26
27 G_BEGIN_DECLS
28
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))
35
36 typedef struct GtkTimeline      GtkTimeline;
37 typedef struct GtkTimelineClass GtkTimelineClass;
38
39 typedef enum {
40   GTK_TIMELINE_DIRECTION_FORWARD,
41   GTK_TIMELINE_DIRECTION_BACKWARD
42 } GtkTimelineDirection;
43
44 typedef enum {
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;
51
52 struct GtkTimeline
53 {
54   GObject parent_instance;
55   gpointer priv;
56 };
57
58 struct GtkTimelineClass
59 {
60   GObjectClass parent_class;
61
62   void (* started)           (GtkTimeline *timeline);
63   void (* finished)          (GtkTimeline *timeline);
64   void (* paused)            (GtkTimeline *timeline);
65
66   void (* frame)             (GtkTimeline *timeline,
67                               gdouble     progress);
68
69   void (* __gtk_reserved1) (void);
70   void (* __gtk_reserved2) (void);
71   void (* __gtk_reserved3) (void);
72   void (* __gtk_reserved4) (void);
73 };
74
75
76 GType                   _gtk_timeline_get_type          (void) G_GNUC_CONST;
77
78 GtkTimeline *           _gtk_timeline_new               (guint                    duration);
79 GtkTimeline *           _gtk_timeline_new_for_screen    (guint                    duration,
80                                                          GdkScreen               *screen);
81
82 void                    _gtk_timeline_start             (GtkTimeline             *timeline);
83 void                    _gtk_timeline_pause             (GtkTimeline             *timeline);
84 void                    _gtk_timeline_rewind            (GtkTimeline             *timeline);
85
86 gboolean                _gtk_timeline_is_running        (GtkTimeline             *timeline);
87
88 guint                   _gtk_timeline_get_fps           (GtkTimeline             *timeline);
89 void                    _gtk_timeline_set_fps           (GtkTimeline             *timeline,
90                                                          guint                    fps);
91
92 gboolean                _gtk_timeline_get_loop          (GtkTimeline             *timeline);
93 void                    _gtk_timeline_set_loop          (GtkTimeline             *timeline,
94                                                          gboolean                 loop);
95
96 guint                   _gtk_timeline_get_duration      (GtkTimeline             *timeline);
97 void                    _gtk_timeline_set_duration      (GtkTimeline             *timeline,
98                                                          guint                    duration);
99
100 GdkScreen *             _gtk_timeline_get_screen        (GtkTimeline             *timeline);
101 void                    _gtk_timeline_set_screen        (GtkTimeline             *timeline,
102                                                          GdkScreen               *screen);
103
104 GtkTimelineDirection    _gtk_timeline_get_direction     (GtkTimeline             *timeline);
105 void                    _gtk_timeline_set_direction     (GtkTimeline             *timeline,
106                                                          GtkTimelineDirection     direction);
107
108 gdouble                 _gtk_timeline_get_progress      (GtkTimeline             *timeline);
109
110 GtkTimelineProgressType _gtk_timeline_get_progress_type (GtkTimeline             *timeline);
111 void                    _gtk_timeline_set_progress_type (GtkTimeline             *timeline,
112                                                          GtkTimelineProgressType  progress_type);
113
114
115 G_END_DECLS
116
117 #endif /* __GTK_TIMELINE_H__ */