3
WY                 @   s   d dl mZ d dlT d dlT d dlT ddddddd	d
ddddddgZG dd deZed ZedZ	G dd deZ
e
dZe
dZe
d Ze
dZe
dZe
dZe
dZe
dZe
dZG dd deZdS )    )Atspi)*	CoordType	XY_SCREEN	XY_WINDOWComponentLayer	ComponentLAYER_BACKGROUNDLAYER_CANVASLAYER_INVALIDLAYER_LAST_DEFINED	LAYER_MDILAYER_OVERLAYLAYER_POPUPLAYER_WIDGETLAYER_WINDOWc               @   s   e Zd ZdddZdS )r   r   r   )r      N)__name__
__module____qualname___enum_lookup r   r   3/usr/lib/python3/dist-packages/pyatspi/component.pyr   (   s   r   c            
   @   s$   e Zd Zddddddddd	d
	ZdS )r   r   r	   r
   r   r   r   r   r   r   )	r   r                        N)r   r   r   r   r   r   r   r   r   3   s   r   r   r   r   r   r   r   c               @   sX   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d Zdd Z	dd Z
dd Zdd ZdS )r   as  
        The Component interface is implemented by objects which occupy
        on-screen space, e.g. objects which have onscreen visual representations.
        The methods in Component allow clients to identify where the
        objects lie in the onscreen coordinate system, their relative
        size, stacking order, and position. It also provides a mechanism
        whereby keyboard focus may be transferred to specific user interface
        elements programmatically. This is a 2D API, coordinates of 3D
        objects are projected into the 2-dimensional screen view for
        purposes of this interface.
        c             C   s   t jj| j|||S )z
                @return True if the specified point lies within the Component's
                bounding box, False otherwise.
                )r   r   containsobj)selfxy
coord_typer   r   r   r    Y   s    zComponent.containsc             C   s   t jj| j|||S )z
                @return the Accessible child whose bounding box contains the
                specified point.
                )r   r   Zget_accessible_at_pointr!   )r"   r#   r$   r%   r   r   r   getAccessibleAtPoint`   s    zComponent.getAccessibleAtPointc             C   s   t jj| jS )aL  
                Obtain the alpha value of the component. An alpha value of 1.0
                or greater indicates that the object is fully opaque, and an
                alpha value of 0.0 indicates that the object is fully transparent.
                Negative alpha values have no defined meaning at this time.
                )r   r   Z	get_alphar!   )r"   r   r   r   getAlphag   s    zComponent.getAlphac             C   s   t tjj| j|S )a,  
                Obtain the Component's bounding box, in pixels, relative to the
                specified coordinate system. 
                @param coord_type
                @return a BoundingBox which entirely contains the object's onscreen
                visual representation.
                )ZgetBoundingBoxr   r   Zget_extentsr!   )r"   r%   r   r   r   
getExtentsp   s    zComponent.getExtentsc             C   s   t jj| jS )zZ
                @return the ComponentLayer in which this object resides.
                )r   r   Z	get_layerr!   )r"   r   r   r   getLayerz   s    zComponent.getLayerc             C   s   t jj| jS )a  
                Obtain the relative stacking order (i.e. 'Z' order) of an object.
                Larger values indicate that an object is on "top" of the stack,
                therefore objects with smaller MDIZOrder may be obscured by objects
                with a larger MDIZOrder, but not vice-versa. 
                @return an integer indicating the object's place in the stacking
                order.
                )r   r   Zget_mdi_z_orderr!   )r"   r   r   r   getMDIZOrder   s    	zComponent.getMDIZOrderc             C   s   t tjj| j|S )a  
                Obtain the position of the current component in the coordinate
                system specified by coord_type. 
                @param : coord_type
                @param : x
                an out parameter which will be back-filled with the returned
                x coordinate. 
                @param : y
                an out parameter which will be back-filled with the returned
                y coordinate.
                )pointToListr   r   Zget_positionr!   )r"   r%   r   r   r   getPosition   s    zComponent.getPositionc             C   s   t tjj| jS )a  
                Obtain the size, in the coordinate system specified by coord_type,
                of the rectangular area which fully contains the object's visual
                representation, without accounting for viewport clipping. 
                @param : width
                the object's horizontal extents in the specified coordinate system.
                @param : height
                the object's vertical extents in the specified coordinate system.
                )r+   r   r   Zget_sizer!   )r"   r   r   r   getSize   s    
zComponent.getSizec             C   s   t jj| jS )z
                Request that the object obtain keyboard focus.
                @return True if keyboard focus was successfully transferred to
                the Component.
                )r   r   Z
grab_focusr!   )r"   r   r   r   	grabFocus   s    zComponent.grabFocusN)r   r   r   __doc__r    r&   r'   r(   r)   r*   r,   r-   r.   r   r   r   r   r   L   s   	
N)Zgi.repositoryr   Zpyatspi.atspienumZpyatspi.utilsZpyatspi.interface__all__Z	AtspiEnumr   r   r   r   r	   r
   r   r   r   r   r   r   r   Z	interfacer   r   r   r   r   <module>   s>   