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.
20 /* Superseded by atkimage.c */
26 static GType type = 0;
29 static const GTypeInfo tinfo =
31 sizeof (AtkImageIface),
37 type = g_type_register_static (G_TYPE_INTERFACE, "AtkImage", &tinfo, 0);
44 * atk_image_get_storage_type:
45 * @value: a GObject instance that implements AtkImageIface
46 * @return: a AtkStorageType representing the image storage type, or 0
47 * if value does not implement this interface.
49 * WARNING: callers should not rely on %NULL or on a zero value for
50 * indication of whether AtkImageIface is implemented, they should
51 * use type checking/interface checking macros or the
52 * atk_get_accessible_image() convenience method.
55 atk_image_get_storage_type (AtkImage *obj)
59 g_return_val_if_fail (obj != NULL, 0);
60 g_return_val_if_fail (ATK_IS_IMAGE (obj), 0);
62 iface = ATK_IMAGE_GET_IFACE (obj);
64 if (iface->get_storage_type)
65 return (iface->get_storage_type) (obj);
71 * atk_image_get_image_description:
72 * @value: a GObject instance that implements AtkImageIface
73 * @return: a gchar* representing the image description, or NULL
74 * if value does not implement this interface.
76 * WARNING: callers should not rely on %NULL or on a zero value for
77 * indication of whether AtkImageIface is implemented, they should
78 * use type checking/interface checking macros or the
79 * atk_get_accessible_image() convenience method.
82 atk_image_get_image_description (AtkImage *obj)
86 g_return_val_if_fail (obj != NULL, NULL);
87 g_return_val_if_fail (ATK_IS_IMAGE (obj), NULL);
89 iface = ATK_IMAGE_GET_IFACE (obj);
91 if (iface->get_image_description)
92 return (iface->get_image_description) (obj);
98 * atk_image_get_image_height:
99 * @value: a GObject instance that implements AtkImageIface
100 * @return: a gint representing the image height, or 0
101 * if value does not implement this interface.
103 * WARNING: callers should not rely on %NULL or on a zero value for
104 * indication of whether AtkImageIface is implemented, they should
105 * use type checking/interface checking macros or the
106 * atk_get_accessible_image() convenience method.
109 atk_image_get_image_height (AtkImage *obj)
111 AtkImageIface *iface;
113 g_return_val_if_fail (obj != NULL, 0);
114 g_return_val_if_fail (ATK_IS_IMAGE (obj), 0);
116 iface = ATK_IMAGE_GET_IFACE (obj);
118 if (iface->get_image_height)
119 return (iface->get_image_height) (obj);
125 * atk_image_get_image_width:
126 * @value: a GObject instance that implements AtkImageIface
127 * @return: a gint representing the image width, or 0
128 * if value does not implement this interface.
130 * WARNING: callers should not rely on %NULL or on a zero value for
131 * indication of whether AtkImageIface is implemented, they should
132 * use type checking/interface checking macros or the
133 * atk_get_accessible_image() convenience method.
136 atk_image_get_image_width (AtkImage *obj)
138 AtkImageIface *iface;
140 g_return_val_if_fail (obj != NULL, 0);
141 g_return_val_if_fail (ATK_IS_IMAGE (obj), 0);
143 iface = ATK_IMAGE_GET_IFACE (obj);
145 if (iface->get_image_width)
146 return (iface->get_image_width) (obj);
152 * atk_image_set_image_description:
153 * @value: a GObject instance that implements AtkImageIface
157 atk_image_set_image_description (AtkImage *obj,
158 const gchar *description)
160 AtkImageIface *iface;
162 g_return_if_fail (obj != NULL);
163 g_return_if_fail (ATK_IS_IMAGE (obj));
165 iface = ATK_IMAGE_GET_IFACE (obj);
167 if (iface->set_image_description)
168 (iface->set_image_description) (obj, description);