~jderose/ubuntu/utopic/unity-settings-daemon/tune-syndaemon

« back to all changes in this revision

Viewing changes to plugins/mouse/gsd-timeline.h

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2014-02-07 11:44:36 UTC
  • Revision ID: package-import@ubuntu.com-20140207114436-7t5u3yvwc4ul7w3e
Tags: upstream-14.04.0
ImportĀ upstreamĀ versionĀ 14.04.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* gsdtimeline.c
 
2
 *
 
3
 * Copyright (C) 2008 Carlos Garnacho  <carlos@imendio.com>
 
4
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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.
 
18
 */
 
19
 
 
20
#ifndef __GSD_TIMELINE_H__
 
21
#define __GSD_TIMELINE_H__
 
22
 
 
23
#include <glib-object.h>
 
24
#include <gdk/gdk.h>
 
25
 
 
26
G_BEGIN_DECLS
 
27
 
 
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))
 
36
 
 
37
typedef enum {
 
38
  GSD_TIMELINE_DIRECTION_FORWARD,
 
39
  GSD_TIMELINE_DIRECTION_BACKWARD
 
40
} GsdTimelineDirection;
 
41
 
 
42
typedef enum {
 
43
  GSD_TIMELINE_PROGRESS_LINEAR,
 
44
  GSD_TIMELINE_PROGRESS_SINUSOIDAL,
 
45
  GSD_TIMELINE_PROGRESS_EXPONENTIAL
 
46
} GsdTimelineProgressType;
 
47
 
 
48
typedef struct GsdTimeline      GsdTimeline;
 
49
typedef struct GsdTimelineClass GsdTimelineClass;
 
50
 
 
51
struct GsdTimeline
 
52
{
 
53
  GObject parent_instance;
 
54
};
 
55
 
 
56
struct GsdTimelineClass
 
57
{
 
58
  GObjectClass parent_class;
 
59
 
 
60
  void (* started)           (GsdTimeline *timeline);
 
61
  void (* finished)          (GsdTimeline *timeline);
 
62
  void (* paused)            (GsdTimeline *timeline);
 
63
 
 
64
  void (* frame)             (GsdTimeline *timeline,
 
65
                              gdouble      progress);
 
66
 
 
67
  void (* __gsd_reserved1) (void);
 
68
  void (* __gsd_reserved2) (void);
 
69
  void (* __gsd_reserved3) (void);
 
70
  void (* __gsd_reserved4) (void);
 
71
};
 
72
 
 
73
typedef gdouble (*GsdTimelineProgressFunc) (gdouble progress);
 
74
 
 
75
 
 
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;
 
79
 
 
80
GsdTimeline            *gsd_timeline_new                (guint                    duration);
 
81
GsdTimeline            *gsd_timeline_new_for_screen     (guint                    duration,
 
82
                                                         GdkScreen               *screen);
 
83
 
 
84
void                    gsd_timeline_start              (GsdTimeline             *timeline);
 
85
void                    gsd_timeline_pause              (GsdTimeline             *timeline);
 
86
void                    gsd_timeline_rewind             (GsdTimeline             *timeline);
 
87
 
 
88
gboolean                gsd_timeline_is_running         (GsdTimeline             *timeline);
 
89
 
 
90
guint                   gsd_timeline_get_fps            (GsdTimeline             *timeline);
 
91
void                    gsd_timeline_set_fps            (GsdTimeline             *timeline,
 
92
                                                         guint                    fps);
 
93
 
 
94
gboolean                gsd_timeline_get_loop           (GsdTimeline             *timeline);
 
95
void                    gsd_timeline_set_loop           (GsdTimeline             *timeline,
 
96
                                                         gboolean                 loop);
 
97
 
 
98
guint                   gsd_timeline_get_duration       (GsdTimeline             *timeline);
 
99
void                    gsd_timeline_set_duration       (GsdTimeline             *timeline,
 
100
                                                         guint                    duration);
 
101
 
 
102
GdkScreen              *gsd_timeline_get_screen         (GsdTimeline             *timeline);
 
103
void                    gsd_timeline_set_screen         (GsdTimeline             *timeline,
 
104
                                                         GdkScreen               *screen);
 
105
 
 
106
GsdTimelineDirection    gsd_timeline_get_direction      (GsdTimeline             *timeline);
 
107
void                    gsd_timeline_set_direction      (GsdTimeline             *timeline,
 
108
                                                         GsdTimelineDirection     direction);
 
109
 
 
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);
 
114
 
 
115
void                    gsd_timeline_set_progress_func  (GsdTimeline             *timeline,
 
116
                                                         GsdTimelineProgressFunc  progress_func);
 
117
 
 
118
gdouble                 gsd_timeline_get_progress       (GsdTimeline             *timeline);
 
119
 
 
120
 
 
121
G_END_DECLS
 
122
 
 
123
#endif /* __GSD_TIMELINE_H__ */