+2001-08-07 Brian Cameron <brian.cameron@sun.com>
+ * atk/atkimage.[ch] docs/atk-sections.txt
+ docs/tmpl/atkimage.sgml
+ Updated AtkImage get_position to get_image_position
+ so the naming is consistant. Now get_image_position
+ and get_image_size return -1 for x/y/height/width
+ if AtkImage implementations of these functions is
+ not found.
+
2001-07-31 Padraig O'Briain <padraig.obriain@sun.com>
* atk/atkobject.c
* @width: filled with the image width
*
* Get the height and width in pixels for the specified image.
+ * The values of @height and @width are returned as -1 if the
+ * values cannot be obtained.
**/
void
atk_image_get_image_size (AtkImage *image, int *height, int *width)
iface = ATK_IMAGE_GET_IFACE (image);
if (iface->get_image_size)
+ {
iface->get_image_size (image, height, width);
+ }
+ else
+ {
+ *height = -1;
+ *width = -1;
+ }
}
/**
}
/**
- * atk_image_get_position:
+ * atk_image_get_image_position:
* @image: a #GObject instance that implements AtkImageIface
* @x: address of #gint to put x coordinate position
* @y: address of #gint to put y coordinate position
* or to the components top level window
*
* Gets the position of the image in the form of a point specifying the
- * images top-left corner
+ * images top-left corner. The values of @x and @y are returned as -1
+ * if the values cannot be obtained.
**/
void
-atk_image_get_position (AtkImage *image,
+atk_image_get_image_position (AtkImage *image,
gint *x,
gint *y,
AtkCoordType coord_type)
iface = ATK_IMAGE_GET_IFACE (image);
- if (iface->get_position)
- (iface->get_position) (image, x, y, coord_type);
+ if (iface->get_image_position)
+ {
+ (iface->get_image_position) (image, x, y, coord_type);
+ }
+ else
+ {
+ *x = -1;
+ *y = -1;
+ }
}
struct _AtkImageIface
{
GTypeInterface parent;
- void ( *get_position) (AtkImage *image,
+ void ( *get_image_position) (AtkImage *image,
gint *x,
gint *y,
AtkCoordType coord_type);
gboolean atk_image_set_image_description (AtkImage *image,
const gchar *description);
-void atk_image_get_position (AtkImage *image,
+void atk_image_get_image_position (AtkImage *image,
gint *x,
gint *y,
AtkCoordType coord_type);