]> Pileus Git - ~andy/gtk/blob - gtk/gtkstyleanimation.c
gtk: Fix warnings for some uses of GtkLinkButton
[~andy/gtk] / gtk / gtkstyleanimation.c
1 /*
2  * Copyright © 2012 Red Hat Inc.
3  *
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.
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  * Lesser General Public License for more details.
13  *
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/>.
16  *
17  * Authors: Benjamin Otte <otte@gnome.org>
18  */
19
20 #include "config.h"
21
22 #include "gtkstyleanimationprivate.h"
23
24 G_DEFINE_ABSTRACT_TYPE (GtkStyleAnimation, _gtk_style_animation, G_TYPE_OBJECT)
25
26 static GtkBitmask *
27 gtk_style_animation_real_set_values (GtkStyleAnimation    *animation,
28                                      GtkBitmask           *changed,
29                                      gint64                for_time_us,
30                                      GtkCssComputedValues *values)
31 {
32   return changed;
33 }
34
35 static gboolean
36 gtk_style_animation_real_is_finished (GtkStyleAnimation *animation,
37                                       gint64             at_time_us)
38 {
39   return TRUE;
40 }
41
42 static void
43 _gtk_style_animation_class_init (GtkStyleAnimationClass *klass)
44 {
45   klass->set_values = gtk_style_animation_real_set_values;
46   klass->is_finished = gtk_style_animation_real_is_finished;
47 }
48
49 static void
50 _gtk_style_animation_init (GtkStyleAnimation *animation)
51 {
52 }
53
54 GtkBitmask *
55 _gtk_style_animation_set_values (GtkStyleAnimation    *animation,
56                                  GtkBitmask           *changed,
57                                  gint64                for_time_us,
58                                  GtkCssComputedValues *values)
59 {
60   GtkStyleAnimationClass *klass;
61
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);
64
65   klass = GTK_STYLE_ANIMATION_GET_CLASS (animation);
66
67   return klass->set_values (animation, changed, for_time_us, values);
68 }
69
70 gboolean
71 _gtk_style_animation_is_finished (GtkStyleAnimation *animation,
72                                   gint64             at_time_us)
73 {
74   GtkStyleAnimationClass *klass;
75
76   g_return_val_if_fail (GTK_IS_STYLE_ANIMATION (animation), TRUE);
77
78   klass = GTK_STYLE_ANIMATION_GET_CLASS (animation);
79
80   return klass->is_finished (animation, at_time_us);
81 }
82