2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2001, 2002 Sun Microsystems Inc.,
6 * Copyright 2001, 2002 Ximian, Inc.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
24 #include <cspi/spi-private.h>
27 * AccessibleImage_ref:
28 * @obj: a pointer to the #AccessibleImage implementor on which to operate.
30 * Increment the reference count for an #AccessibleImage object.
33 AccessibleImage_ref (AccessibleImage *obj)
35 cspi_object_ref (obj);
39 * AccessibleImage_unref:
40 * @obj: a pointer to the #AccessibleImage implementor on which to operate.
42 * Decrement the reference count for an #AccessibleImage object.
45 AccessibleImage_unref (AccessibleImage *obj)
47 cspi_object_unref (obj);
51 * AccessibleImage_getImageDescription:
52 * @obj: a pointer to the #AccessibleImage implementor on which to operate.
54 * Get the description of the image displayed in an #AccessibleImage object.
56 * Returns: a UTF-8 string describing the image.
59 AccessibleImage_getImageDescription (AccessibleImage *obj)
63 cspi_return_val_if_fail (obj != NULL, NULL);
66 Accessibility_Image__get_imageDescription (CSPI_OBJREF (obj),
69 cspi_return_val_if_ev ("getImageDescription", NULL);
75 * AccessibleImage_getImageSize:
76 * @obj: a pointer to the #AccessibleImage to query.
77 * @width: a pointer to a #long into which the x extents (width) will be returned.
78 * @height: a pointer to a #long into which the y extents (height) will be returned.
80 * Get the size of the image displayed in a specified #AccessibleImage object.
83 AccessibleImage_getImageSize (AccessibleImage *obj,
89 cspi_return_if_fail (obj != NULL);
91 Accessibility_Image_getImageSize (CSPI_OBJREF (obj),
94 if (!cspi_check_ev ("getImageSize"))
107 * AccessibleImage_getImagePosition:
108 * @obj: a pointer to the #AccessibleImage implementor to query.
109 * @x: a pointer to a #long into which the minimum x coordinate will be returned.
110 * @y: a pointer to a #long into which the minimum y coordinate will be returned.
111 * @ctype: the desired coordinate system into which to return the results,
112 * (e.g. SPI_COORD_TYPE_WINDOW, SPI_COORD_TYPE_SCREEN).
114 * Get the minimum x and y coordinates of the image displayed in a
115 * specified #AccessibleImage implementor.
118 AccessibleImage_getImagePosition (AccessibleImage *obj,
121 AccessibleCoordType ctype)
125 cspi_return_if_fail (obj != NULL);
127 Accessibility_Image_getImagePosition (CSPI_OBJREF (obj),
128 &cx, &cy, ctype, cspi_ev ());
130 if (!cspi_check_ev ("getImagePosition"))
143 * AccessibleImage_getImageExtents:
144 * @obj: a pointer to the #AccessibleImage implementor to query.
145 * @x: a pointer to a #long into which the minimum x coordinate will be returned.
146 * @y: a pointer to a #long into which the minimum y coordinate will be returned.
147 * @width: a pointer to a #long into which the image x extent will be returned.
148 * @height: a pointer to a #long into which the image y extent will be returned.
149 * @ctype: the desired coordinate system into which to return the results,
150 * (e.g. SPI_COORD_TYPE_WINDOW, SPI_COORD_TYPE_SCREEN).
152 * Get the bounding box of the image displayed in a
153 * specified #AccessibleImage implementor.
156 AccessibleImage_getImageExtents (AccessibleImage *obj,
161 AccessibleCoordType ctype)
163 Accessibility_BoundingBox bbox;
165 cspi_return_if_fail (obj != NULL);
167 bbox = Accessibility_Image_getImageExtents (CSPI_OBJREF (obj),
171 if (!cspi_check_ev ("getImageExtents"))
173 *x = *y = *width = *height = 0;
180 *height = bbox.height;
185 * AccessibleImage_getImageLocale:
186 * @obj: The #AccessibleImage being queried.
188 * Get the locale associated with an image and its textual representation.
190 * Returns: A POSIX LC_MESSAGES-style Locale value for image description and text.
193 AccessibleImage_getImageLocale (AccessibleImage *obj)
197 cspi_return_val_if_fail (obj != NULL, "C");
199 retval = Accessibility_Image__get_imageLocale (CSPI_OBJREF (obj), cspi_ev ());
201 cspi_return_val_if_ev ("getImageLocale", NULL);