1 /* ATK - Accessibility Toolkit
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.
25 static GType type = 0;
28 static const GTypeInfo tinfo =
30 sizeof (AtkImageIface),
32 (GBaseFinalizeFunc) NULL,
36 type = g_type_register_static (G_TYPE_INTERFACE, "AtkImage", &tinfo, 0);
43 * atk_image_get_image_description:
44 * @image: a #GObject instance that implements AtkImageIface
46 * Get a textual description of this image.
48 * Returns: a string representing the image description
51 atk_image_get_image_description (AtkImage *obj)
55 g_return_val_if_fail (obj != NULL, NULL);
56 g_return_val_if_fail (ATK_IS_IMAGE (obj), NULL);
58 iface = ATK_IMAGE_GET_IFACE (obj);
60 if (iface->get_image_description)
62 return (iface->get_image_description) (obj);
71 * atk_image_get_image_size:
72 * @image: a #GObject instance that implements AtkImageIface
73 * @height: filled with the image height
74 * @width: filled with the image width
76 * Get the height, in pixels/screen coords, of this image.
79 atk_image_get_image_size (AtkImage *obj, int *height, int *width)
83 g_return_if_fail (obj != NULL);
84 g_return_if_fail (ATK_IS_IMAGE (obj));
86 iface = ATK_IMAGE_GET_IFACE (obj);
88 if (iface->get_image_size)
90 return (iface->get_image_size) (obj, height, width);
99 * atk_image_set_image_description:
100 * @image: a #GObject instance that implements AtkImageIface
101 * @description: a string description to set for @image
103 * Sets the textual description for this image.
105 * Returns: boolean TRUE, or FALSE if operation could
109 atk_image_set_image_description (AtkImage *obj,
110 const gchar *description)
112 AtkImageIface *iface;
114 g_return_val_if_fail (obj != NULL, FALSE);
115 g_return_val_if_fail (ATK_IS_IMAGE (obj), FALSE);
117 iface = ATK_IMAGE_GET_IFACE (obj);
119 if (iface->set_image_description)
121 return (iface->set_image_description) (obj, description);