1 /* GAIL - The GNOME Accessibility Implementation Library
2 * Copyright 2004 Sun Microsystems 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 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, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
23 #include "gailscale.h"
25 static const char * gail_scale_get_description (AtkObject *object);
27 G_DEFINE_TYPE (GailScale, gail_scale, GAIL_TYPE_RANGE)
30 gail_scale_class_init (GailScaleClass *klass)
32 AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
34 class->get_description = gail_scale_get_description;
38 gail_scale_init (GailScale *scale)
43 gail_scale_get_description (AtkObject *object)
48 widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (object));
50 /* State is defunct */
53 layout = gtk_scale_get_layout (GTK_SCALE (widget));
55 return pango_layout_get_text (layout);
57 return ATK_OBJECT_CLASS (gail_scale_parent_class)->get_description (object);