diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-08-20 11:32:31 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-08-20 11:32:31 +0000 |
commit | f525d2a51a232ec23ec9177acb531b200be563d9 (patch) | |
tree | a1e5944740bdf165b96f9e4376e1b4e2ebb2e96b /atk | |
parent | 71ecedd9f1d12ad74f660a7b2827e5574ca7e510 (diff) | |
parent | ba14b9fcac523e6cc76bebea0656b6625a1c36f9 (diff) | |
download | at-spi2-core-f525d2a51a232ec23ec9177acb531b200be563d9.tar.gz |
Merge branch 'initialized2' into 'master'
Make sure returned values are initialized
See merge request GNOME/atk!24
Diffstat (limited to 'atk')
-rw-r--r-- | atk/atkimage.c | 6 | ||||
-rw-r--r-- | atk/atktext.c | 11 |
2 files changed, 13 insertions, 4 deletions
diff --git a/atk/atkimage.c b/atk/atkimage.c index 50801509..3a7bdc78 100644 --- a/atk/atkimage.c +++ b/atk/atkimage.c @@ -97,6 +97,9 @@ atk_image_get_image_description (AtkImage *image) * Get the width and height in pixels for the specified image. * The values of @width and @height are returned as -1 if the * values cannot be obtained (for instance, if the object is not onscreen). + * + * If the size can not be obtained (e.g. missing support), x and y are set + * to -1. **/ void atk_image_get_image_size (AtkImage *image, @@ -171,6 +174,9 @@ atk_image_set_image_description (AtkImage *image, * * Gets the position of the image in the form of a point specifying the * images top-left corner. + * + * If the position can not be obtained (e.g. missing support), x and y are set + * to -1. **/ void atk_image_get_image_position (AtkImage *image, diff --git a/atk/atktext.c b/atk/atktext.c index 8f2e4980..fec90b02 100644 --- a/atk/atktext.c +++ b/atk/atktext.c @@ -665,6 +665,9 @@ atk_text_get_caret_offset (AtkText *text) * @height: (out) (optional): Pointer for the height of the bounding box * @coords: specify whether coordinates are relative to the screen or widget window * + * If the extent can not be obtained (e.g. missing support), all of x, y, width, + * height are set to -1. + * * Get the bounding box containing the glyph representing the character at * a particular text offset. **/ @@ -700,10 +703,10 @@ atk_text_get_character_extents (AtkText *text, else real_height = &local_height; - *real_x = 0; - *real_y = 0; - *real_width = 0; - *real_height = 0; + *real_x = -1; + *real_y = -1; + *real_width = -1; + *real_height = -1; if (offset < 0) return; |