+
    <i08  c                   s    ^ RI t^ RIHt ^ RIHt ^ RIHt . ROtR t	R t
R tR tR tR tR	 tR
 tR tR tRR ltR tR tR tR tR tR tR tR tR tR t ! R R]4      tR t R# )    N)allModifiersc                     \         hNZNotImplementedError)Zlevel   &2/usr/lib/python3.14/site-packages/pyatspi/utils.pysetCacheLevelr   4       !!    c                  r   r   r    r	   r   getCacheLevelr   7   r   r	   c                  r   r   r   r
   r	   r   
clearCacher   :   r   r	   c                  s    \        R 4       R# )z"Print cache function is deprecatedN)Zprintr
   r	   r   
printCacher   =   s    23r	   c                s    R# )a  
Gets the ID of an interface class or object in string format for use in
queryInterface.

@param obj: Class representing an AT-SPI interface or instance
@type obj: object
@return: IID for the interface
@rtype: string
@raise AttributeError: When the parameter does not provide typecode info

WARNING!! DEPRECATED!!

In current D-Bus version of pyatspi this simply returns a null string.
Z r
   Zobjr   r   getInterfaceIIDr   @   s     r	   c                s8    V P                   P                  R4      # )a  
Gets the human readable name of an interface class or object in string
format.

@param obj: Class representing an AT-SPI interface or instance
@type obj: class
@return: Name of the interface
@rtype: string
@raise AttributeError: When the parameter does not provide typecode info
zorg.a11y.atspi.)Z_dbus_interfaceZlstripr   r   r   getInterfaceNamer   Q   s     ""))*;<<r	   c                s"    V P                  4       # )a  
Gets a list of the names of all interfaces supported by this object. The
names are the short-hand interface names like "Accessible" and "Component",
not the full interface identifiers.

@param obj: Arbitrary object to query for all accessibility related
interfaces. Must provide a queryInterface method.
@type obj: object
@return: Set of supported interface names
@rtype: set
@raise AttributeError: If the object provide does not implement
queryInterface
)Zget_interfacesr   r   r   listInterfacesr   ^   s     !!##r	   c                s    V P                  4       R,           VP                  4       P                  RR4      ,           p\        \        W!4      # )aj  
Maps a string name to an AT-SPI constant. The rules for the mapping are as 
follows:
        - The prefix is captalized and has an _ appended to it.
        - All spaces in the suffix are mapped to the _ character. 
        - All alpha characters in the suffix are mapped to their uppercase.

The resulting name is used with getattr to look up a constant with that name
in the L{constants} module. If such a constant does not exist, the string
suffix is returned instead.

This method allows strings to be used to refer to roles, relations, etc.
without direct access to the constants. It also supports the future expansion
of roles, relations, etc. by allowing arbitrary strings which may or may not
map to the current standard set of roles, relations, etc., but may still
match some non-standard role, relation, etc. being reported by an
application.

@param prefix: Prefix of the constant name such as role, relation, state, 
        text, modifier, key
@type prefix: string
@param suffix: Name of the role, relation, etc. to use to lookup the constant
@type suffix: string
@return: The matching constant value
@rtype: object
Z_Z )ZupperreplaceZgetattrZ	constants)ZprefixZsuffixZname   && r   stringToConstr   n   s9    6 ||~c!&,,."8"8c"BBy$//r	   c                s@    \         P                  P                  V 4      # )a  
Converts a state value to a string based on the name of the state constant in
the L{constants} module that has the given value.

@param value: An AT-SPI state
@type value: Accessibility.StateType
@return: Human readable, untranslated name of the state
@rtype: string
)stateZSTATE_VALUE_TO_NAMEgetZvaluer   r   stateToStringr      s     ((,,U33r	   c                sT    \         P                  P                  P                  V 4      # )a  
Converts a relation value to a string based on the name of the state constant
in the L{constants} module that has the given value.

@param value: An AT-SPI relation
@type value: Accessibility.RelationType
@return: Human readable, untranslated name of the relation
@rtype: string
)pyatspiZAccessibilityZRELATION_VALUE_TO_NAMEr   r   r   r   relationToStringr      s!     $$;;??FFr	   c                s    V'       d   \        W4      # V  F  p \        W4      pVf   K  Vu # 	  R#   \         d    Rp Li ; i)a~  
Searches for a descendant node satisfying the given predicate starting at 
this node. The search is performed in depth-first order by default or
in breadth first order if breadth_first is True. For example,

my_win = findDescendant(lambda x: x.name == 'My Window')

will search all descendants of x until one is located with the name 'My
Window' or all nodes are exausted. Calls L{_findDescendantDepth} or
L{_findDescendantBreadth} to start the recursive search.

@param acc: Root accessible of the search
@type acc: Accessibility.Accessible
@param pred: Search predicate returning True if accessible matches the 
                search criteria or False otherwise
@type pred: callable
@param breadth_first: Search breadth first (True) or depth first (False)?
@type breadth_first: boolean
@return: Accessible matching the criteria or None if not found
@rtype: Accessibility.Accessible or None
N)_findDescendantBreadth_findDescendantDepth	Exception)accpredZbreadth_firstchildrets   &&&  r   findDescendantr"      sL    , -c88E#23= ?3J  ! #"#s   3AAc                s    V  F  p V! V4      '       d   Vu # K  	  V  F  p \        W!4      pVf   K  Vu # 	  R#   \          d     KG  i ; i  \          d    Rp L/i ; i)a  
Internal function for locating one descendant. Called by L{findDescendant} to
start the search.

@param acc: Root accessible of the search
@type acc: Accessibility.Accessible
@param pred: Search predicate returning True if accessible matches the 
                search criteria or False otherwise
@type pred: callable
@return: Matching node or None to keep searching
@rtype: Accessibility.Accessible or None
N)r   r   r   r   r    r!      &&  r   r   r      sq     E;;u; 
 E#4UA ?3J  ! 
 ! #"#s    <AA
AAAc                s     V! V 4      '       d   V #  V  F  p \        W!4      pVf   K  Vu # 	  R#   \          d     L,i ; i  \          d    Rp L.i ; i)a  
Internal function for locating one descendant. Called by L{findDescendant} to
start the search.

@param acc: Root accessible of the search
@type acc: Accessibility.Accessible
@param pred: Search predicate returning True if accessible matches the 
        search criteria or False otherwise
@type pred: callable
@return: Matching node or None to keep searching
@rtype: Accessibility.Accessible or None
N)r   r   r#   r$   r   r   r      se    	99Sj9 E#25? ?3J   		
 ! #"#s#   2 2 AA A AAc                s"    . p\        WV4       V# )a<  
Searches for all descendant nodes satisfying the given predicate starting at 
this node. Does an in-order traversal. For example,

pred = lambda x: x.getRole() == pyatspi.ROLE_PUSH_BUTTON
buttons = pyatspi.findAllDescendants(node, pred)

will locate all push button descendants of node.

@param acc: Root accessible of the search
@type acc: Accessibility.Accessible
@param pred: Search predicate returning True if accessible matches the 
                search criteria or False otherwise
@type pred: callable
@return: All nodes matching the search criteria
@rtype: list
)_findAllDescendants)r   r   matchesr   r   findAllDescendantsr'      s    $ Cw/r	   c                s    V  F/  p V! V4      '       d   VP                  V4       \        Y1T4       K1  	  R#   \         d     Li ; i)z
Internal method for collecting all descendants. Reuses the same matches
list so a new one does not need to be built on each recursive step.
N)appendr   r%   )r   r   r&   r    s   &&& r   r%   r%     sG    
 E;;u(= $E9  ! s   8AAc                s    V f   R# ^ pV^d8  dN   V P                   f   R#  V! V P                   4      '       d   V P                   #  V P                   p V^,           pKT  R#   \         d     L&i ; i)a  
Searches for an ancestor satisfying the given predicate. Note that the
AT-SPI hierarchy is not always doubly linked. Node A may consider node B its
child, but B is not guaranteed to have node A as its parent (i.e. its parent
may be set to None). This means some searches may never make it all the way
up the hierarchy to the desktop level.

@param acc: Starting accessible object
@type acc: Accessibility.Accessible
@param pred: Search predicate returning True if accessible matches the 
        search criteria or False otherwise
@type pred: callable
@return: Node matching the criteria or None if not found
@rtype: Accessibility.Accessible
N)parentr   )r   r   triesr   r   findAncestorr+     sp      ;ck::%#

++CJJ->+ jj	 ! s   A A A-,A-c                s    . p^ pV^d8  dX   V P                   f   VP                  4        V#  VP                  V P                  4       4       T P                   p T^,           pK^  \
        h  \         d    \
        hi ; i)a-  
Gets the path from the application ancestor to the given accessible in
terms of its child index at each level.

@param acc: Target accessible
@type acc: Accessibility.Accessible
@return: Path to the target
@rtype: list of integer
@raise LookupError: When the application accessible cannot be reached
)r)   Zreverser(   ZgetIndexInParentr   ZLookupError)r   Zpathr*   s   &  r   getPathr,   9  sx     ck::%#*C$8$8$:; jj		 ! *))*s   A) )A;c                 s2    V P                   V P                  3# r   )xy)Zpointr   r   pointToListr/   R  s    	%''r	   c                 s^    V P                   V P                  V P                  V P                  3# r   r-   r.   widthheightZrectr   r   
rectToListr4   U  s!    	T[[11r	   c                 s    \        4       pV  F^  pVP                  R ^4      w  r4VP                  R R4      pVP                  V4      '       d   W,          R ,           V,           W&   KZ  WAV&   K`  	  V# ):z\:)ZdictZsplitr   Z__contains__)listr!   ZitemZkeyvals   &    r   attributeListToHashr8   X  sf    fD!ZZQ/
kk#u-##C(("x#~3CH"H  
r	   c                 sr    V P                  4        Uu. uF  qR ,           W,          ,           NK  	  up# u upi )r5   )Zkeys)Zhr-   s   & r   hashToAttributeListr9   c  s*    ()11C!$111s   4c                   s   a  ] tR tRt o R tR tR tR tR t]	! ]]R7      t
R tR	 t]	! ]]R7      tR
 tR t]	! ]]R7      tR tR t]	! ]]R7      tRtV tR# )BoundingBoxif  c                s2    \         P                  WW#V34      # r   )r6   __new__)Zclsr-   r.   r1   r2      &&&&&r   r;   ZBoundingBox.__new__g  s    ||CQv)>??r	   c                s6    \         P                  WW#V34       R # r   )r6   __init__)selfr-   r.   r1   r2   r<   r   r=   ZBoundingBox.__init__i  s    d&$9:r	   c                sl    R V P                   V P                  V P                  V P                  3,          # )z(%d, %d, %d, %d)r0   r>   r   r   __str__ZBoundingBox.__str__l  s&    *dffdffdjj$++-VVWr	   c                s    V ^ ,          # )r    r
   r?   r   r   _get_xZBoundingBox._get_xo      Awr	   c                s    W^ &   R# )r    Nr
   r>   r7      &&r   _set_xZBoundingBox._set_xq  	    Qr	   )ZfgetZfsetc                s    V ^,          # )   r
   r?   r   r   _get_yZBoundingBox._get_yt  rB   r	   c                s    W^&   R# )rG   Nr
   rC   rD   r   _set_yZBoundingBox._set_yv  rF   r	   c                s    V ^,          # )   r
   r?   r   r   
_get_widthZBoundingBox._get_widthy  rB   r	   c                s    W^&   R# )rJ   Nr
   rC   rD   r   
_set_widthZBoundingBox._set_width{  rF   r	   c                s    V ^,          # )   r
   r?   r   r   _get_heightZBoundingBox._get_height~  rB   r	   c                s    W^&   R# )rM   Nr
   rC   rD   r   _set_heightZBoundingBox._set_height  rF   r	   r
   N)Z__name__Z
__module__Z__qualname__Z__firstlineno__r;   r=   r@   rA   rE   Zpropertyr-   rH   rI   r.   rK   rL   r1   rN   rO   r2   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r:   r:   f  sn     	@	;	X		&v.		&v.		jz:		{=r	   r:   c                 sn    \        V P                  V P                  V P                  V P                  4      # r   )r:   r-   r.   r1   r2   r3   r   r   getBoundingBoxrP     s#    DFFDFFDJJDDr	   )r   r   r   r   r   r   r   r   r   r   r   r"   r'   r+   r,   r/   r4   r8   r9   rP   )F)!Zpyatspi.Accessibilityr   Zpyatspi.deviceeventr   Zpyatspi.stater   Zpyatspi.registryZregistryZ__all__r   r   r   r   r   r   r   r   r   r   r"   r   r   r'   r%   r+   r,   r/   r4   r8   r9   r6   r:   rP   r
   r	   r   <module>rQ      s   ,  ,  #."""4"=$ 0<
4
G/@/2/0,
:B22	2>$ ><Er	   