]> Pileus Git - ~andy/gtk/blob - gtk/a11y/gtkscaleaccessible.c
GtkBubbleWindow: Use style border color to stroke the bubble shape
[~andy/gtk] / gtk / a11y / gtkscaleaccessible.c
1 /* GTK+ - accessibility implementations
2  * Copyright 2004 Sun Microsystems 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 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
18 #include "config.h"
19
20 #include <gtk/gtk.h>
21 #include "gtkscaleaccessible.h"
22
23 G_DEFINE_TYPE (GtkScaleAccessible, gtk_scale_accessible, GTK_TYPE_RANGE_ACCESSIBLE)
24
25 static const gchar *
26 gtk_scale_accessible_get_description (AtkObject *object)
27 {
28   GtkWidget *widget;
29   PangoLayout *layout;
30
31   widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (object));
32   if (widget == NULL)
33     return NULL;
34
35   layout = gtk_scale_get_layout (GTK_SCALE (widget));
36   if (layout)
37     return pango_layout_get_text (layout);
38
39   return ATK_OBJECT_CLASS (gtk_scale_accessible_parent_class)->get_description (object);
40 }
41
42 static void
43 gtk_scale_accessible_class_init (GtkScaleAccessibleClass *klass)
44 {
45   AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
46
47   class->get_description = gtk_scale_accessible_get_description;
48 }
49
50 static void
51 gtk_scale_accessible_init (GtkScaleAccessible *scale)
52 {
53 }