[g-a-devel]Image Interface: -1 image size



Hello.

During experimenting with the AT-SPI I found something which
is kind of odd to me.  Maybe someone on this list can enlighten me
as to why this would happen, or if this is related to some yet
undiscovered bug in AT-SPI/ATK:

I found out that many objects on the desktop which implement
the image interface seem to return -1 -1 for their size,
and 0 for their position, yet, their state is visible.

Here is some minimal code to demonstrate it:

gspi> (define (bogus-images)
        (find (desktop 0)  ;; Recursively look for objects satisfying predicate
              (lambda (obj)
                (and (image? obj)     ;; Object implements the Image Interface
                     (visible? obj)   ;; Object has state VISIBLE
                     (< (caddr (image-extents obj)) 0)))))
gspi> (length (bogus-images))
9

;; So we have 9 objects implementing the image interface, but
;; with < 0 size, they look like this:

gspi> (map image-extents (bogus-images))
((0 0 -1 -1) (0 0 -1 -1) (0 0 -1 -1)
 (0 0 -1 -1) (0 0 -1 -1) (0 0 -1 -1)
 (0 0 -1 -1) (0 0 -1 -1) (0 0 -1 -1))

;; Yet, their component extents are valid:

gspi> (map get-extents (bogus-images))
((236 743 96 22) (141 743 95 22) (46 743 95 22)
 (169 0 24 24) (193 0 24 24) (4 191 200 30)
 (4 221 200 30) (4 281 200 30) (92 95 21 53))

;; Those kind of objects seem to be common to many apps:

gspi> (map find-application-name (bogus-images))
("gnome-panel" "gnome-panel" "gnome-panel"
 "gnome-panel" "gnome-panel" "gnopernicus"
 "gnopernicus" "gnopernicus" "gedit")


Does anyone know what is the reasoning behind those Image-Interface
implementing objects?

P.S.: A somewhat related question I have is why the Image
interface does not provide any functions for retrieving
a pixel representation of the actual image.  Is it expected
that image descriptions are always provided by the
Application programmer, and never dynamically added by the
assistive technologies?  At least under Windows, screen
readers have a image labeling feature which allows for adding
descriptions to certain icons on the fly.  I guess that
such a functionality would require the assistive technology
to actually retrieve the pixel content of an image.  Or is
it expected to do this via direct X Windows System calls?

-- 
CYa,
  Mario | Debian Developer <URL:http://debian.org/>
        | Get my public key via finger mlang db debian org
        | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]