Updated AtkImage get_position to get_image_position
authorBrian Cameron <bcameron@src.gnome.org>
Tue, 7 Aug 2001 15:26:38 +0000 (15:26 +0000)
committerBrian Cameron <bcameron@src.gnome.org>
Tue, 7 Aug 2001 15:26:38 +0000 (15:26 +0000)
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.

ChangeLog
atk/atkimage.c
atk/atkimage.h
docs/atk-sections.txt
docs/tmpl/atk-unused.sgml
docs/tmpl/atkimage.sgml

index 7c5b4ad..3d066f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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
index 8e9b7d4..5a3000a 100755 (executable)
@@ -73,6 +73,8 @@ atk_image_get_image_description (AtkImage *image)
  * @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)
@@ -84,7 +86,14 @@ 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;
+  }
 }
 
 /**
@@ -118,7 +127,7 @@ atk_image_set_image_description (AtkImage        *image,
 }
 
 /**
- * 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
@@ -126,10 +135,11 @@ atk_image_set_image_description (AtkImage        *image,
  * 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)
@@ -140,8 +150,15 @@ atk_image_get_position (AtkImage *image,
 
   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;
+  }
 }
 
 
index 132c34c..4e02c90 100755 (executable)
@@ -47,7 +47,7 @@ typedef struct _AtkImageIface AtkImageIface;
 struct _AtkImageIface
 {
   GTypeInterface parent;
-  void                 ( *get_position)          (AtkImage              *image,
+  void                 ( *get_image_position)    (AtkImage              *image,
                                                    gint                  *x,
                                                   gint                  *y,
                                                   AtkCoordType          coord_type);
@@ -69,7 +69,7 @@ void     atk_image_get_image_size        (AtkImage           *image,
 
 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);
index 63a850a..ea07113 100644 (file)
@@ -99,7 +99,7 @@ atk_hypertext_get_type
 <TITLE>AtkImage</TITLE>
 AtkImage
 AtkImageIface
-atk_image_get_position
+atk_image_get_image_position
 atk_image_get_image_description
 atk_image_set_image_description
 atk_image_get_image_size
index 5f40b42..880b955 100644 (file)
@@ -89,6 +89,16 @@ atk
 @image: 
 @Returns: 
 
+<!-- ##### FUNCTION atk_image_get_position ##### -->
+<para>
+
+</para>
+
+@image: 
+@x: 
+@y: 
+@coord_type: 
+
 <!-- ##### FUNCTION atk_image_get_storage_type ##### -->
 <para>
 
index f564a85..4a0bb76 100644 (file)
@@ -28,12 +28,12 @@ an assistive technology to get descriptive information about images.
 </para>
 
 @parent: 
-@get_position: 
+@get_image_position: 
 @get_image_description: 
 @get_image_size: 
 @set_image_description: 
 
-<!-- ##### FUNCTION atk_image_get_position ##### -->
+<!-- ##### FUNCTION atk_image_get_image_position ##### -->
 <para>
 
 </para>