2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2001 Sun Microsystems Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
23 #include <cspi/spi-private.h>
26 * AccessibleImage_ref:
27 * @obj: a pointer to the #AccessibleImage implementor on which to operate.
29 * Increment the reference count for an #AccessibleImage object.
32 AccessibleImage_ref (AccessibleImage *obj)
34 cspi_object_ref (obj);
38 * AccessibleImage_unref:
39 * @obj: a pointer to the #AccessibleImage implementor on which to operate.
41 * Decrement the reference count for an #AccessibleImage object.
44 AccessibleImage_unref (AccessibleImage *obj)
46 cspi_object_unref (obj);
50 * AccessibleImage_getImageDescription:
51 * @obj: a pointer to the #AccessibleImage implementor on which to operate.
53 * Get the description of the image displayed in an #AccessibleImage object.
55 * Returns: a UTF-8 string describing the image.
58 AccessibleImage_getImageDescription (AccessibleImage *obj)
62 cspi_return_val_if_fail (obj != NULL, NULL);
65 Accessibility_Image__get_imageDescription (CSPI_OBJREF (obj),
68 cspi_return_val_if_ev ("getImageDescription", NULL);
74 * AccessibleImage_getImageSize:
75 * @obj: a pointer to the #AccessibleImage to query.
76 * @width: a pointer to a #long into which the x extents (width) will be returned.
77 * @height: a pointer to a #long into which the y extents (height) will be returned.
79 * Get the size of the image displayed in a specified #AccessibleImage object.
82 AccessibleImage_getImageSize (AccessibleImage *obj,
88 cspi_return_if_fail (obj != NULL);
90 Accessibility_Image_getImageSize (CSPI_OBJREF (obj),
93 if (!cspi_check_ev ("getImageSize"))
106 * AccessibleImage_getImagePosition:
107 * @obj: a pointer to the #AccessibleImage implementor to query.
108 * @x: a pointer to a #long into which the minimum x coordinate will be returned.
109 * @y: a pointer to a #long into which the minimum y coordinate will be returned.
110 * @ctype: the desired coordinate system into which to return the results,
111 * (e.g. SPI_COORD_TYPE_WINDOW, SPI_COORD_TYPE_SCREEN).
113 * Get the minimum x and y coordinates of the image displayed in a
114 * specified #AccessibleImage implementor.
117 AccessibleImage_getImagePosition (AccessibleImage *obj,
120 AccessibleCoordType ctype)
124 cspi_return_if_fail (obj != NULL);
126 Accessibility_Image_getImagePosition (CSPI_OBJREF (obj),
127 &cx, &cy, ctype, cspi_ev ());
129 if (!cspi_check_ev ("getImagePosition"))
142 * AccessibleImage_getImageExtents:
143 * @obj: a pointer to the #AccessibleImage implementor to query.
144 * @x: a pointer to a #long into which the minimum x coordinate will be returned.
145 * @y: a pointer to a #long into which the minimum y coordinate will be returned.
146 * @width: a pointer to a #long into which the image x extent will be returned.
147 * @height: a pointer to a #long into which the image y extent will be returned.
148 * @ctype: the desired coordinate system into which to return the results,
149 * (e.g. SPI_COORD_TYPE_WINDOW, SPI_COORD_TYPE_SCREEN).
151 * Get the bounding box of the image displayed in a
152 * specified #AccessibleImage implementor.
155 AccessibleImage_getImageExtents (AccessibleImage *obj,
160 AccessibleCoordType ctype)
162 Accessibility_BoundingBox bbox;
164 cspi_return_if_fail (obj != NULL);
166 bbox = Accessibility_Image_getImageExtents (CSPI_OBJREF (obj),
170 if (!cspi_check_ev ("getImageExtents"))
172 *x = *y = *width = *height = 0;
179 *height = bbox.height;