3
õW÷Y	  ã               @   s6   d dl mZ d dlT d dlT dgZG dd„ deƒZdS )é    )ÚAtspi)Ú*Ú	Hypertextc               @   s(   e Zd ZdZdd„ Zdd„ Zdd„ ZdS )	r   a]  
        An interface used for objects which implement linking between
        multiple resource or content locations, or multiple 'markers'
        within a single document. A Hypertext instance is associated
        with one or more Hyperlinks, which are associated with particular
        offsets within the Hypertext's included content.
        c             C   s   t jj| j|ƒS )a  
                Get one of the Hyperlinks associated with this Hypertext object,
                by index.
                @param : linkIndex
                an integer from 0 to getNLinks() - 1. 
                @return the Hyperlink in this Hypertext object.
                )r   r   Zget_linkÚobj)ÚselfÚindex© r   ú3/usr/lib/python3/dist-packages/pyatspi/hypertext.pyÚgetLink#   s    zHypertext.getLinkc             C   s   t jj| j|ƒS )aê  
                Get the hyperlink index, if any, associated with a particular
                character offset in the Hypertext object. For Hypertext implementors
                without textual content, all hyperlinks are associated with character
                offset '0'.
                @return the index of the Hyperlink associated with character
                offset characterIndex, or -1 if no Hyperlink is associated with
                that character offset.
                )r   r   Zget_link_indexr   )r   Zcharacter_indexr   r   r	   ÚgetLinkIndex-   s    
zHypertext.getLinkIndexc             C   s   t jj| jƒS )zá
                Query the hypertext object for the number of Hyperlinks it contains.
                @return the number of Hyperlinks associated with this Hypertext
                object, as a long integer.
                )r   r   Zget_n_linksr   )r   r   r   r	   Ú	getNLinks9   s    zHypertext.getNLinksN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   r   r   r   r   r	   r      s   
N)Zgi.repositoryr   Zpyatspi.utilsZpyatspi.interfaceÚ__all__Z	interfacer   r   r   r   r	   Ú<module>   s   