static void clutter_timeline_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { ClutterTimeline *timeline; ClutterTimelinePrivate *priv; timeline = CLUTTER_TIMELINE(object); priv = timeline->priv; switch (prop_id) { case PROP_LOOP: g_value_set_boolean (value, priv->loop); break; case PROP_DELAY: g_value_set_uint (value, priv->delay); break; case PROP_DURATION: g_value_set_uint (value, clutter_timeline_get_duration (timeline)); break; case PROP_DIRECTION: g_value_set_enum (value, priv->direction); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
void on_timeline_new_frame (ClutterTimeline *timeline, gint frame_msecs, App *app) { if (frame_msecs > clutter_timeline_get_duration (timeline)/2) clutter_text_set_text (CLUTTER_TEXT(app->label), ItemDetails[app->selected_index].title); }
/** * clutter_timeline_add_marker_at_time: * @timeline: a #ClutterTimeline * @marker_name: the unique name for this marker * @msecs: position of the marker in milliseconds * * Adds a named marker that will be hit when the timeline has been * running for @msecs milliseconds. Markers are unique string * identifiers for a given time. Once @timeline reaches * @msecs, it will emit a ::marker-reached signal for each marker * attached to that time. * * A marker can be removed with clutter_timeline_remove_marker(). The * timeline can be advanced to a marker using * clutter_timeline_advance_to_marker(). * * Since: 0.8 */ void clutter_timeline_add_marker_at_time (ClutterTimeline *timeline, const gchar *marker_name, guint msecs) { g_return_if_fail (CLUTTER_IS_TIMELINE (timeline)); g_return_if_fail (marker_name != NULL); g_return_if_fail (msecs <= clutter_timeline_get_duration (timeline)); clutter_timeline_add_marker_internal (timeline, marker_name, msecs); }
static gdouble clutter_alpha_easing_func (ClutterAlpha *alpha, gpointer data G_GNUC_UNUSED) { ClutterAlphaPrivate *priv = alpha->priv; ClutterTimeline *timeline = priv->timeline; gdouble t, d; if (G_UNLIKELY (priv->timeline == NULL)) return 0.0; t = clutter_timeline_get_elapsed_time (timeline); d = clutter_timeline_get_duration (timeline); return clutter_easing_for_mode (priv->mode, t, d); }
/** * clutter_timeline_clone: * @timeline: #ClutterTimeline to duplicate. * * Create a new #ClutterTimeline instance which has property values * matching that of supplied timeline. The cloned timeline will not * be started and will not be positioned to the current position of * @timeline: you will have to start it with clutter_timeline_start(). * * Return Value: a new #ClutterTimeline, cloned from @timeline * * Since: 0.4 */ ClutterTimeline * clutter_timeline_clone (ClutterTimeline *timeline) { ClutterTimeline *copy; g_return_val_if_fail (CLUTTER_IS_TIMELINE (timeline), NULL); copy = g_object_new (CLUTTER_TYPE_TIMELINE, "duration", clutter_timeline_get_duration (timeline), "loop", clutter_timeline_get_loop (timeline), "delay", clutter_timeline_get_delay (timeline), "direction", clutter_timeline_get_direction (timeline), NULL); return copy; }