1 /* GAIL - The GNOME Accessibility Implementation Library
2 * Copyright 2001 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/>.
21 #include "gtkarrowaccessible.h"
24 static void atk_image_interface_init (AtkImageIface *iface);
26 G_DEFINE_TYPE_WITH_CODE (GtkArrowAccessible, _gtk_arrow_accessible, GTK_TYPE_WIDGET_ACCESSIBLE,
27 G_IMPLEMENT_INTERFACE (ATK_TYPE_IMAGE, atk_image_interface_init))
30 gtk_arrow_accessible_initialize (AtkObject *accessible,
33 ATK_OBJECT_CLASS (_gtk_arrow_accessible_parent_class)->initialize (accessible, data);
35 accessible->role = ATK_ROLE_ICON;
39 gtk_arrow_accessible_finalize (GObject *object)
41 GtkArrowAccessible *arrow = GTK_ARROW_ACCESSIBLE (object);
43 g_free (arrow->image_description);
45 G_OBJECT_CLASS (_gtk_arrow_accessible_parent_class)->finalize (object);
49 _gtk_arrow_accessible_class_init (GtkArrowAccessibleClass *klass)
51 GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
52 AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
54 atk_object_class->initialize = gtk_arrow_accessible_initialize;
56 gobject_class->finalize = gtk_arrow_accessible_finalize;
60 _gtk_arrow_accessible_init (GtkArrowAccessible *arrow)
62 arrow->image_description = NULL;
66 gtk_arrow_accessible_get_image_description (AtkImage *obj)
68 GtkArrowAccessible *arrow = GTK_ARROW_ACCESSIBLE (obj);
70 return arrow->image_description;
74 gtk_arrow_accessible_set_image_description (AtkImage *obj,
75 const gchar *description)
77 GtkArrowAccessible *arrow = GTK_ARROW_ACCESSIBLE (obj);
79 g_free (arrow->image_description);
80 arrow->image_description = g_strdup (description);
87 atk_image_interface_init (AtkImageIface *iface)
89 iface->get_image_description = gtk_arrow_accessible_get_image_description;
90 iface->set_image_description = gtk_arrow_accessible_set_image_description;