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, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
23 #include "gtkarrowaccessible.h"
26 static void atk_image_interface_init (AtkImageIface *iface);
28 G_DEFINE_TYPE_WITH_CODE (GtkArrowAccessible, _gtk_arrow_accessible, GTK_TYPE_WIDGET_ACCESSIBLE,
29 G_IMPLEMENT_INTERFACE (ATK_TYPE_IMAGE, atk_image_interface_init))
32 gtk_arrow_accessible_initialize (AtkObject *accessible,
35 ATK_OBJECT_CLASS (_gtk_arrow_accessible_parent_class)->initialize (accessible, data);
37 accessible->role = ATK_ROLE_ICON;
41 gtk_arrow_accessible_finalize (GObject *object)
43 GtkArrowAccessible *arrow = GTK_ARROW_ACCESSIBLE (object);
45 g_free (arrow->image_description);
47 G_OBJECT_CLASS (_gtk_arrow_accessible_parent_class)->finalize (object);
51 _gtk_arrow_accessible_class_init (GtkArrowAccessibleClass *klass)
53 GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
54 AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
56 atk_object_class->initialize = gtk_arrow_accessible_initialize;
58 gobject_class->finalize = gtk_arrow_accessible_finalize;
62 _gtk_arrow_accessible_init (GtkArrowAccessible *arrow)
64 arrow->image_description = NULL;
68 gtk_arrow_accessible_get_image_description (AtkImage *obj)
70 GtkArrowAccessible *arrow = GTK_ARROW_ACCESSIBLE (obj);
72 return arrow->image_description;
76 gtk_arrow_accessible_set_image_description (AtkImage *obj,
77 const gchar *description)
79 GtkArrowAccessible *arrow = GTK_ARROW_ACCESSIBLE (obj);
81 g_free (arrow->image_description);
82 arrow->image_description = g_strdup (description);
89 atk_image_interface_init (AtkImageIface *iface)
91 iface->get_image_description = gtk_arrow_accessible_get_image_description;
92 iface->set_image_description = gtk_arrow_accessible_set_image_description;