summaryrefslogtreecommitdiff
path: root/clutter/clutter-timeline.h
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2012-02-17 16:06:28 +0000
committerEmmanuele Bassi <ebassi@linux.intel.com>2012-02-23 11:23:15 +0000
commit7ec975ed3d60c8861dc0a89e873ed928628f5270 (patch)
tree1a6af182ee919eab5a57ecd16e393ded84762e45 /clutter/clutter-timeline.h
parent59bd20a94b1644887117e4b96e446567def32a0f (diff)
downloadclutter-7ec975ed3d60c8861dc0a89e873ed928628f5270.tar.gz
timeline: Add progress functions
The whole progress computation should not be done using a separate class: it should be part of the Timeline class.
Diffstat (limited to 'clutter/clutter-timeline.h')
-rw-r--r--clutter/clutter-timeline.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/clutter/clutter-timeline.h b/clutter/clutter-timeline.h
index 0a2018736..b910dc709 100644
--- a/clutter/clutter-timeline.h
+++ b/clutter/clutter-timeline.h
@@ -43,6 +43,24 @@ typedef struct _ClutterTimelineClass ClutterTimelineClass;
typedef struct _ClutterTimelinePrivate ClutterTimelinePrivate;
/**
+ * ClutterTimelineProgressFunc:
+ * @timeline: a #ClutterTimeline
+ * @elapsed: the elapsed time, in milliseconds
+ * @total: the total duration of the timeline, in milliseconds,
+ * @user_data: data passed to the function
+ *
+ * A function for defining a custom progress.
+ *
+ * Return value: the progress, as a floating point value between -1.0 and 2.0.
+ *
+ * Since: 1.10
+ */
+typedef gdouble (* ClutterTimelineProgressFunc) (ClutterTimeline *timeline,
+ gdouble elapsed,
+ gdouble total,
+ gpointer user_data);
+
+/**
* ClutterTimeline:
*
* The #ClutterTimeline structure contains only private data
@@ -53,7 +71,8 @@ typedef struct _ClutterTimelinePrivate ClutterTimelinePrivate;
struct _ClutterTimeline
{
/*< private >*/
- GObject parent;
+ GObject parent_instance;
+
ClutterTimelinePrivate *priv;
};
@@ -138,6 +157,14 @@ gboolean clutter_timeline_has_marker (Clutter
void clutter_timeline_advance_to_marker (ClutterTimeline *timeline,
const gchar *marker_name);
+void clutter_timeline_set_progress_func (ClutterTimeline *timeline,
+ ClutterTimelineProgressFunc func,
+ gpointer data,
+ GDestroyNotify notify);
+void clutter_timeline_set_progress_mode (ClutterTimeline *timeline,
+ ClutterAnimationMode mode);
+ClutterAnimationMode clutter_timeline_get_progress_mode (ClutterTimeline *timeline);
+
G_END_DECLS
#endif /* _CLUTTER_TIMELINE_H__ */