1 /* GTK+ - accessibility implementations
2 * Copyright 2001, 2002, 2003 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, see <http://www.gnu.org/licenses/>.
20 #include "gtklockbuttonaccessibleprivate.h"
22 #include "gtk/gtklockbuttonprivate.h"
23 #include "gtk/gtkwidgetprivate.h"
25 G_DEFINE_TYPE (GtkLockButtonAccessible, gtk_lock_button_accessible, GTK_TYPE_BUTTON_ACCESSIBLE)
28 gtk_lock_button_accessible_get_name (AtkObject *obj)
30 GtkLockButton *lockbutton;
32 lockbutton = GTK_LOCK_BUTTON (gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)));
33 if (lockbutton == NULL)
36 return _gtk_lock_button_get_current_text (lockbutton);
40 gtk_lock_button_accessible_class_init (GtkLockButtonAccessibleClass *klass)
42 AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
44 atk_object_class->get_name = gtk_lock_button_accessible_get_name;
48 gtk_lock_button_accessible_init (GtkLockButtonAccessible *lockbutton)
53 _gtk_lock_button_accessible_name_changed (GtkLockButton *lockbutton)
57 obj = _gtk_widget_peek_accessible (GTK_WIDGET (lockbutton));
61 g_object_notify (G_OBJECT (obj), "accessible-name");