]> Pileus Git - ~andy/gtk/blob - gtk/a11y/gtkframeaccessible.c
Change FSF Address
[~andy/gtk] / gtk / a11y / gtkframeaccessible.c
1 /* GAIL - The GNOME Accessibility Implementation Library
2  * Copyright 2001 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 <string.h>
21 #include <gtk/gtk.h>
22 #include "gtkframeaccessible.h"
23
24
25 G_DEFINE_TYPE (GtkFrameAccessible, _gtk_frame_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE)
26
27 static void
28 gtk_frame_accessible_initialize (AtkObject *accessible,
29                                  gpointer   data)
30 {
31   ATK_OBJECT_CLASS (_gtk_frame_accessible_parent_class)->initialize (accessible, data);
32
33   accessible->role = ATK_ROLE_PANEL;
34 }
35
36 static const gchar *
37 gtk_frame_accessible_get_name (AtkObject *obj)
38 {
39   const gchar *name;
40   GtkWidget *widget;
41
42   widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
43   if (widget == NULL)
44       return NULL;
45
46   name = ATK_OBJECT_CLASS (_gtk_frame_accessible_parent_class)->get_name (obj);
47   if (name != NULL)
48     return name;
49
50   return gtk_frame_get_label (GTK_FRAME (widget));
51 }
52
53 static void
54 _gtk_frame_accessible_class_init (GtkFrameAccessibleClass *klass)
55 {
56   AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
57
58   class->initialize = gtk_frame_accessible_initialize;
59   class->get_name = gtk_frame_accessible_get_name;
60 }
61
62 static void
63 _gtk_frame_accessible_init (GtkFrameAccessible *frame)
64 {
65 }