X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=atspi%2Fatspi-image.c;h=4fd5ae717a118e0e3af900f7326bac61c52f1625;hb=3785cfb93aa4a29b70ffdd39686f14d2c8e26b0b;hp=10e9d1da58b46bfc0fc84a934285b342b60b6f7b;hpb=3f65b7902ce9f63a33c76bdc093e02ffa742a50a;p=platform%2Fupstream%2Fat-spi2-core.git diff --git a/atspi/atspi-image.c b/atspi/atspi-image.c index 10e9d1d..4fd5ae7 100644 --- a/atspi/atspi-image.c +++ b/atspi/atspi-image.c @@ -4,21 +4,22 @@ * * Copyright 2001, 2002 Sun Microsystems Inc., * Copyright 2001, 2002 Ximian, Inc. + * Copyright 2010, 2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" @@ -27,18 +28,18 @@ * atspi_image_get_image_description: * @obj: a pointer to the #AtspiImage implementor on which to operate. * - * Get the description of the image displayed in an #AtspiImage object. + * Gets the description of the image displayed in an #AtspiImage object. * * Returns: a UTF-8 string describing the image. **/ gchar * atspi_image_get_image_description (AtspiImage *obj, GError **error) { - char *retval; + char *retval = NULL; g_return_val_if_fail (obj != NULL, NULL); - _atspi_dbus_get_property (obj, atspi_interface_image, "Description", error, "s", &retval); + _atspi_dbus_get_property (obj, atspi_interface_image, "ImageDescription", error, "s", &retval); return retval; } @@ -47,7 +48,13 @@ atspi_image_get_image_description (AtspiImage *obj, GError **error) * atspi_image_get_image_size: * @obj: a pointer to the #AtspiImage to query. * - * Get the size of the image displayed in a specified #AtspiImage object. + * Gets the size of the image displayed in a specified #AtspiImage object. + * The returned values are meaningful only if the Image has both + * STATE_VISIBLE and STATE_SHOWING. + * + * Returns: a pointer to an #AtspiPoint where x corresponds to + * the image's width and y corresponds to the image's height. + * **/ AtspiPoint * atspi_image_get_image_size (AtspiImage *obj, GError **error) @@ -71,8 +78,14 @@ atspi_image_get_image_size (AtspiImage *obj, GError **error) * @ctype: the desired coordinate system into which to return the results, * (e.g. ATSPI_COORD_TYPE_WINDOW, ATSPI_COORD_TYPE_SCREEN). * - * Get the minimum x and y coordinates of the image displayed in a + * Gets the minimum x and y coordinates of the image displayed in a * specified #AtspiImage implementor. + * The returned values are meaningful only if the Image has both + * STATE_VISIBLE and STATE_SHOWING. + * + * Returns: a pointer to an #AtspiPoint where x and y correspond to the + * minimum coordinates of the displayed image. + * **/ AtspiPoint * atspi_image_get_image_position (AtspiImage *obj, @@ -80,7 +93,7 @@ atspi_image_get_image_position (AtspiImage *obj, GError **error) { dbus_int32_t d_x, d_y; - dbus_uint16_t d_ctype = ctype; + dbus_uint32_t d_ctype = ctype; AtspiPoint ret; ret.x = ret.y = 0; @@ -101,8 +114,13 @@ atspi_image_get_image_position (AtspiImage *obj, * @ctype: the desired coordinate system into which to return the results, * (e.g. ATSPI_COORD_TYPE_WINDOW, ATSPI_COORD_TYPE_SCREEN). * - * Get the bounding box of the image displayed in a + * Gets the bounding box of the image displayed in a * specified #AtspiImage implementor. + * The returned values are meaningful only if the Image has both + * STATE_VISIBLE and STATE_SHOWING. + * + * Returns: a pointer to an #AtspiRect corresponding to the image's bounding box. The minimum x and y coordinates, + * width, and height are specified. **/ AtspiRect * atspi_image_get_image_extents (AtspiImage *obj, @@ -122,11 +140,11 @@ atspi_image_get_image_extents (AtspiImage *obj, /** * atspi_image_get_image_locale: - * @obj: The #AtspiImage being queried. + * @obj: a pointer to the #AtspiImage to query. * - * Get the locale associated with an image and its textual representation. + * Gets the locale associated with an image and its textual representation. * - * Returns: A POSIX LC_MESSAGES-style Locale value for image description and text. + * Returns: A POSIX LC_MESSAGES-style locale value for image description and text. **/ gchar * atspi_image_get_image_locale (AtspiImage *obj, GError **error) @@ -135,7 +153,7 @@ atspi_image_get_image_locale (AtspiImage *obj, GError **error) g_return_val_if_fail (obj != NULL, g_strdup ("C")); - _atspi_dbus_call (obj, atspi_interface_image, "GetImageLocale", error, "=>s", &retval); + _atspi_dbus_get_property (obj, atspi_interface_image, "ImageLocale", error, "s", &retval); return retval; }