3
WY                 @   s,   d dl mZ d dlT dgZG dd dZdS )    )Atspi)*Imagec               @   s`   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d ZdZ	e
ee	dZdd ZdZe
eedZdS )r   aE  
        An interface implemented by objects which render image data or
        pictorial information to the screen. When onscreen components
        include graphical information that is not purely intended to
        enhance "3d effect" or visual layout, but which conveys some
        semantic or informational content to the sighted user, they should
        implement Image, and that semantic content should be conveyed
        textually to the extent possible via the image description, as
        well as the Accessible::name and Accessible::description properties.
        c             C   s
   || _ d S )N)obj)selfr    r   //usr/lib/python3/dist-packages/pyatspi/image.py__init__%   s    zImage.__init__c             C   s   t tjj| j|S )a  
                Obtain a bounding box which entirely contains the image contents,
                as displayed on screen. The bounds returned do not account for
                any viewport clipping or the fact that the image may be partially
                or wholly obscured by other onscreen content. 
                @param : coordType
                If 0, the returned bounding box position is returned relative
                to the screen; if 1, the bounding box position is returned relative
                to the containing window. 
                @return a BoundingBox enclosing the image's onscreen representation.
                )ZgetBoundingBoxr   r   Zget_image_extentsr   )r   Z	coordTyper   r   r   getImageExtents(   s    zImage.getImageExtentsc             C   s   t tjj| j|S )a`  
                Get the coordinates of the current image position on screen.
                @param : x
                Back-filled with the x coordinate of the onscreen image (i.e.
                the minimum x coordinate) 
                @param : y
                Back-filled with the y coordinate of the onscreen image (i.e.
                the minimum y coordinate) 
                @param : coordType
                If 0, the returned x and y coordinates are returned relative
                to the screen; if 1, they are returned relative to the containing
                window.
                )pointToListr   r   Zget_image_positionr   )r   Z
coord_typer   r   r   getImagePosition6   s    zImage.getImagePositionc             C   s   t tjj| jS )a^  
                Obtain the width and height of the current onscreen view of the
                image. The extents returned do not account for any viewport clipping
                or the fact that the image may be partially or wholly obscured
                by other onscreen content. 
                @param : width
                Back-filled with the x extents of the onscreen image (i.e. the
                image width in pixels) 
                @param : height
                Back-filled with the y extents of the onscreen image (i.e. the
                image height in pixels)
                )r   r   r   Zget_image_sizer   )r   r   r   r   getImageSizeF   s    zImage.getImageSizec             C   s   t jj| jS )N)r   r   Zget_image_descriptionr   )r   r   r   r   get_imageDescriptionU   s    zImage.get_imageDescriptionz
                A UTF-8 string providing a textual description of what is visually
                depicted in the image.
                )fgetdocc             C   s   t jj| jS )N)r   r   Zget_image_localr   )r   r   r   r   get_imageLocale^   s    zImage.get_imageLocalez
                A string corresponding to the POSIX LC_MESSAGES locale used by
                the imageDescription.
                N)__name__
__module____qualname____doc__r	   r
   r   r   r   Z_imageDescriptionDocpropertyZimageDescriptionr   Z_imageLocaleDocZimageLocaler   r   r   r   r      s   
N)Zgi.repositoryr   Zpyatspi.utils__all__r   r   r   r   r   <module>   s   