2 * Copyright © 2012 Red Hat Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 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 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 * Authors: Benjamin Otte <otte@gnome.org>
22 #include "gtkstyleanimationprivate.h"
24 G_DEFINE_ABSTRACT_TYPE (GtkStyleAnimation, _gtk_style_animation, G_TYPE_OBJECT)
27 gtk_style_animation_real_set_values (GtkStyleAnimation *animation,
30 GtkCssComputedValues *values)
36 gtk_style_animation_real_is_finished (GtkStyleAnimation *animation,
43 _gtk_style_animation_class_init (GtkStyleAnimationClass *klass)
45 klass->set_values = gtk_style_animation_real_set_values;
46 klass->is_finished = gtk_style_animation_real_is_finished;
50 _gtk_style_animation_init (GtkStyleAnimation *animation)
55 _gtk_style_animation_set_values (GtkStyleAnimation *animation,
58 GtkCssComputedValues *values)
60 GtkStyleAnimationClass *klass;
62 g_return_val_if_fail (GTK_IS_STYLE_ANIMATION (animation), changed);
63 g_return_val_if_fail (GTK_IS_CSS_COMPUTED_VALUES (values), changed);
65 klass = GTK_STYLE_ANIMATION_GET_CLASS (animation);
67 return klass->set_values (animation, changed, for_time_us, values);
71 _gtk_style_animation_is_finished (GtkStyleAnimation *animation,
74 GtkStyleAnimationClass *klass;
76 g_return_val_if_fail (GTK_IS_STYLE_ANIMATION (animation), TRUE);
78 klass = GTK_STYLE_ANIMATION_GET_CLASS (animation);
80 return klass->is_finished (animation, at_time_us);