+
    Qi>  c                   s
   R t RtRtRtRtRt^ RIt^ RIt^ RIt^ RI	H
t
Ht ^ RIt]P                  ! RR	4       ]P                  ! R
R4       ^ RIHt ^ RIHt ^ RIHt ^RIHt ^RIHt  ! R R4      t]P-                  4        R# )=Utilities for obtaining information about accessible objects.z$Id$z
$Revision$z$Date$zCopyright (c) 2023 Igalia, S.L.ZLGPLN)Callable	GeneratorAtspiz2.0Gtkz3.0)r   )GLib)r   )debug)keynamesc                   s
	  a  ] tR t^2t o Rt/ t/ t]P                  ! 4       t	]
V 3R lR l4       t]
RV 3R lR ll4       t]
RV 3R lR ll4       t]
V 3R lR	 l4       t]
V 3R
 lR l4       t]
V 3R lR l4       t]
V 3R lR l4       t]
V 3R lR l4       t]
V 3R lR l4       t]
V 3R lR l4       t]
V 3R lR l4       t]
V 3R lR l4       t]
V 3R lR l4       t]
V 3R lR l4       t]
V 3R lR l4       t]
V 3R  lR! l4       t]
V 3R" lR# l4       t]
V 3R$ lR% l4       t]
V 3R& lR' l4       t]
V 3R( lR) l4       t]
V 3R* lR+ l4       t]
V 3R, lR- l4       t ]
V 3R. lR/ l4       t!]
V 3R0 lR1 l4       t"]
V 3R2 lR3 l4       t#]
V 3R4 lR5 l4       t$]
V 3R6 lR7 l4       t%]
V 3R8 lR9 l4       t&]
V 3R: lR; l4       t']
V 3R< lR= l4       t(]
V 3R> lR? l4       t)]
V 3R@ lRA l4       t*]
V 3RB lRC l4       t+]
RV 3RD lRE ll4       t,]
V 3RF lRG l4       t-]
V 3RH lRI l4       t.]
V 3RJ lRK l4       t/]
V 3RL lRM l4       t0]
V 3RN lRO l4       t1]
V 3RP lRQ l4       t2]
V 3RR lRS l4       t3]
RV 3RU lRV ll4       t4]
V 3RW lRX l4       t5]
RV 3RY lRZ ll4       t6]
RV 3R[ lR\ ll4       t7]
V 3R] lR^ l4       t8]
V 3R_ lR` l4       t9]
V 3Ra lRb l4       t:]
V 3Rc lRd l4       t;]
V 3Re lRf l4       t<]
V 3Rg lRh l4       t=]
V 3Ri lRj l4       t>]
V 3Rk lRl l4       t?]
RV 3Rm lRn ll4       t@]
V 3Ro lRp l4       tA]
V 3Rq lRr l4       tB]
V 3Rs lRt l4       tC]
V 3Ru lRv l4       tD]
RV 3Rw lRx ll4       tE]
V 3Ry lRz l4       tF]
V 3R{ lR| l4       tG]
RV 3R} lR~ ll4       tH]
RV 3R lR ll4       tI]
V 3R lR l4       tJ]
V 3R lR l4       tK]
V 3R lR l4       tL]
V 3R lR l4       tM]
V 3R lR l4       tN]
V 3R lR l4       tO]
V 3R lR l4       tP]
V 3R lR l4       tQ]
V 3R lR l4       tR]
V 3R lR l4       tS]
V 3R lR l4       tT]
V 3R lR l4       tU]
V 3R lR l4       tV]
V 3R lR l4       tW]
V 3R lR l4       tXV 3R ltYRtZV t[RT# )AXObjectr    c                   < V ^8  d   QhRR/#    returnN Zformat__classdict__   "3/usr/lib/python3.14/site-packages/orca/ax_object.py__annotate__AXObject.__annotate__;   s     / / /    c                 s\     \         P                  ! ^<4       \        P                  4        K-  )z*Clears any data we have cached for objects)timeZsleepr   _clear_all_dictionariesr   r   r   _clear_stored_dataZAXObject._clear_stored_data:   s     JJrN,,.r   c                $   < V ^8  d   QhRS[ RR/# r   reasonr   Nstrr   r   r   r   r   C   s     / / /T /r   c                s`   R pV '       d   VRV  2,          p\         P                  ! \         P                  VR4       \        P                  ;_uu_ 4        \        P
                  P                  4        \        P                  P                  4        RRR4       R#   + '       g   i     R# ; i)zAXObject: Clearing local cache.	 Reason: TN)r   print_message
LEVEL_INFOr   _lock
KNOWN_DEADZclearOBJECT_ATTRIBUTES)r   msg   & r   r   Z AXObject._clear_all_dictionariesB   sl    /Yvh''CE,,c48^^^%%'&&,,. ^^^s   =BB-	c                r   r   r   r   r   r   r   r   N   s     1 1 1T 1r   c                s0    \         P                  V 4       R# )z*Clears all cached information immediately.N)r   r   )r      &r   clear_cache_nowZAXObject.clear_cache_nowM   s     	((0r   c                r	   r
   r   r   r   r   r   r   T   s       r   c                 s~    \         P                  ! \        P                  R7      p RV n        V P                  4        R# )z3Starts thread to periodically clear cached details.)ZtargetTN)	threadingZThreadr   r   Zdaemonstart)Zthreads    r   start_cache_clearing_threadZ$AXObject.start_cache_clearing_threadS   s*     !!)D)DEr   c                :   < V ^8  d   QhRS[ P                  RS[/# r   objr   r   
Accessibler   r   r   r   r   r   \   s!      e.. 3 r   c                sV    \         P                  P                  V 4      p\         P                  P                  V4      ;'       g    RpVP                  4       #   \        P
                   d:   pRXRT 2.p\        P                  ! \        P                  TR4        Rp?R# Rp?ii ; i)z5Returns the toolkit name of obj as a lowercase string z0AXObject: Exception calling _get_toolkit_name_on: TN)
r   r.   get_applicationget_toolkit_namer   GErrorr   print_tokensr   lower)r,   appnameerrortokens   &    r   r2   ZAXObject.get_toolkit_name[   s    	""2237C##44S9??RD zz| {{ 	H#QSTYSZ|\Fu//>	s   AA A B(/.B##B(c                r*   r+   r   r.   boolr   r   r   r   r   j   s!      e&& 4 r   c                s   \         P                  V 4      \        P                  P                  8X  d   \         P                  \         P                  V 4      4      \        P                  P                  8X  dI   \         P                  V 4      R8X  d/   RV R.p\        P                  ! \        P                  VRR4       R# R# )z<Hack to ignore certain objects. All entries must have a bug.Zgecko	AXObject:z"is bogus. See mozilla bug 1879750.TF)r   get_roler   RoleZSECTION
get_parentFRAMEr2   r   r4   r   )r,   r9   r$   r   is_bogusZAXObject.is_bogusi   s     S!UZZ%7%77  !4!4S!9:ejj>N>NN((-8!3(LMFu//tDr   c                r*   r+   r;   r   r   r   r   r   {   s!      !1!1 d r   c                s   V f   R# \         P                  V 4      pVP                  R4      '       g   R# Rp\         P                  V 4      pV'       dP   V'       gH   \         P	                  V4      \
        P                  P                  8H  p\         P                  V4      pKW  V'       g.   RV R.p\        P                  ! \        P                  VR4       R# R# )z)Returns True if obj's ancestry is broken.FZqtr=   z'has broken ancestry. See qt bug 130116.T)r   r2   
startswithr@   r>   r   r?   APPLICATIONr   r4   r   )r,   Ztoolkit_nameZreached_appparentr9   r:   r   has_broken_ancestryZAXObject.has_broken_ancestryz   s     ;  005&&t,,$$S)["++F3uzz7M7MMK((0F!3(QRFu//>r   c                r*   r+   r;   r   r   r   r   r      s%     G Ge&& G4 Gr   c                sN    V RJ ;'       g    \         P                  V 4      '       * # )z;Returns False if we know for certain this object is invalidN)r   object_is_known_deadr,   r%   r   is_validZAXObject.is_valid   s$     4KEE8#@#@#EFFr   c                r*   r+   r;   r   r   r   r   r      s%     H H%"2"2 Ht Hr   c                s|    \        T ;'       d)    \        P                  P                  \	        V 4      4      4      RJ # )z@Returns True if we know for certain this object no longer existsT)r<   r   r!   gethashrH   r%   r   rG   ZAXObject.object_is_known_dead   s1     C>>H//33DI>?4GGr   c                s>   < V ^8  d   QhRS[ P                  RS[RR/# )r   r,   is_deadr   Nr;   r   r   r   r   r      s(     ? ?E$4$4 ?t ? ?r   c                sz   V f   R# \         P                  P                  \        V 4      4      pW!8X  d   R# V\         P                  \        V 4      &   V'       d,   Rp\        P
                  ! \        P                  VRR4       R# V'       d.   RV R.p\        P                  ! \        P                  VR4       R# R# )z$Updates the known-dead status of objNz&AXObject: Adding to known dead objectsTzAXObject: Removingzfrom known-dead objects)r   r!   rJ   rK   r   r   r   r4   )r,   rL   Zcurrent_statusr#   r9      &&   r   _set_known_dead_statusZAXObject._set_known_dead_status   s     ;!,,00c;$)0DI&:C 0 0#tTB*C1JKFu//> r   c                D   < V ^8  d   QhRS[ P                  RS[RS[RR/# )r   r,   r8   r#   r   N)r   r.   Z	Exceptionr   r   r   r   r   r      s/     7 7%** 79 73 74 7r   c                sL   \        V4      p\        P                  ! RV4      '       d:   VP                  VR4      p\        P
                  ! \        P                  VR4       M~\        P                  ! RV4      '       d:   VP                  VR4      p\        P
                  ! \        P                  VR4       M(\        P
                  ! \        P                  VR4       R# \        P                  P                  \        V 4      4      RJ d   \        P                  V R4       R# R# )z?Parses the exception and potentially updates our status for objzaccessible/\d+ does not existzobject no longer existsTz The application no longer existszapp no longer existsNF)r   reZsearchreplacer   r   r   r   r!   rJ   rK   rN   )r,   r8   r#   Zerror_string   &&& r   handle_errorZAXObject.handle_error   s     5z995|DD++l,EFC 0 0#t<YY:LII++l,BCC 0 0#t< 0 0#t<""49-6++C6 7r   c                r*   r+   r;   r   r   r   r   r      s!     ! !U-- !$ !r   c                   \         P                  V 4      '       g   R#  \        P                  P	                  V 4      pVRJ#   \
        P                   d*   pRT  RT 2p\         P                  YT4        Rp?R# Rp?ii ; i)z8Returns True if the action interface is supported on objFz0AXObject: Exception calling get_action_iface on r0   N)r   rI   r   r.   Zget_action_ifacer   r3   rS   r,   ifacer8   r#      &   r   supports_actionZAXObject.supports_action   s{       %%	$$55c:E D   {{ 	DSEE7SC!!#c2	   A B A;;B c                r*   r+   r;   r   r   r   r   r      s%     H Hu'7'7 HD Hr   c           	     s0   ^RI Hp VP                  \        P                  P
                  .R7      pVf   R# \        P                  V R 4      pVf   R# \        \        P                  P                  W2\        P                  P                  ^R4      4      # )i   )AXCollection)ZrolesFc                 b    \         P                  V 4      \        P                  P                  8H  # N)r   r>   r   r?   rA   xr%   r   <lambda>Z4AXObject._has_document_spreadsheet.<locals>.<lambda>   s    8,,Q/5::3C3CCr   T)Zax_collectionrZ   Zcreate_match_ruler   r?   ZDOCUMENT_SPREADSHEETr   find_ancestor_inclusiver<   Z
CollectionZget_matchesZCollectionSortOrderZ	CANONICAL)r,   rZ   ZruleZframerW   r   _has_document_spreadsheetZ"AXObject._has_document_spreadsheet   s     	0--UZZ5T5T4U-V<00CE=E$$0022<<aG H 	Hr   c                r*   r+   r;   r   r   r   r   r      s!     ! !!1!1 !d !r   c                s   \         P                  V 4      '       g   R#  \        P                  P	                  V 4      p \        P                  P                  T 4      p\         P                  T4      pTR8w  d   TRJ# \         P                  T R 4      '       d   R# \         P                  T 4      '       d+   R	p\        P                  ! \        P                  TR4       R# R#   \
        P                   d7   pRT 2p\        P                  ! \        P                  TR4        Rp?R# Rp?ii ; i  \
        P                   d*   pRT  RT 2p\         P                  YT4        Rp?R# Rp?ii ; i)
z<Returns True if the collection interface is supported on objFz,AXObject: Exception in supports_collection: TNz4AXObject: Exception calling get_collection_iface on r0   Zsofficec                 r[   r\   )r   r>   r   r?   ZDOCUMENT_TEXTr]   r%   r   r_   Z.AXObject.supports_collection.<locals>.<lambda>   s    8,,Q/5::3K3KKr   zKAXObject: Treating soffice as not supporting collection due to spreadsheet.)r   rI   r   r.   r1   r   r3   r   r   r   Zget_collection_ifacerS   get_namer`   ra   )r,   r6   r8   r#   rV   Zapp_name   &     r   supports_collectionZAXObject.supports_collection   s=      %%	""2237C	$$99#>E $$S)y $$++KM M--c22_C 0 0#t<3 {{ 	@HC 0 0#t<	 {{ 	HRPUwWC!!#c2	s.   C$ D2 $D/9+D**D/2E0E++E0c                r*   r+   r;   r   r   r   r   r   
  !     ! ! 0 0 !T !r   c                rT   )z;Returns True if the component interface is supported on objFz3AXObject: Exception calling get_component_iface on r0   N)r   rI   r   r.   Zget_component_ifacer   r3   rS   rU   rW   r   supports_componentZAXObject.supports_component	  {       %%	$$88=E D   {{ 	GuBugVC!!#c2	rY   c                r*   r+   r;   r   r   r   r   r     s!     ! !u// !D !r   c                rT   )z:Returns True if the document interface is supported on objFz2AXObject: Exception calling get_document_iface on r0   N)r   rI   r   r.   Zget_document_ifacer   r3   rS   rU   rW   r   supports_documentZAXObject.supports_document  s{       %%	$$77<E D   {{ 	Fse2eWUC!!#c2	rY   c                r*   r+   r;   r   r   r   r   r   +  s!     ! !E$4$4 ! !r   c                rT   )z?Returns True if the editable-text interface is supported on objFz7AXObject: Exception calling get_editable_text_iface on r0   N)r   rI   r   r.   Zget_editable_text_ifacer   r3   rS   rU   rW   r   supports_editable_textZAXObject.supports_editable_text*  s~       %%	$$<<SAE D   {{ 	KC5PRSXRYZC!!#c2	rY   c                r*   r+   r;   r   r   r   r   r   ;  re   r   c                rT   )z;Returns True if the hyperlink interface is supported on objFz-AXObject: Exception calling get_hyperlink on r0   N)r   rI   r   r.   Zget_hyperlinkr   r3   rS   rU   rW   r   supports_hyperlinkZAXObject.supports_hyperlink:  s{       %%	$$2237E D   {{ 	A#bPC!!#c2	rY   c                r*   r+   r;   r   r   r   r   r   K  re   r   c                rT   )z;Returns True if the hypertext interface is supported on objFz3AXObject: Exception calling get_hypertext_iface on r0   N)r   rI   r   r.   Zget_hypertext_ifacer   r3   rS   rU   rW   r   supports_hypertextZAXObject.supports_hypertextJ  rg   rY   c                r*   r+   r;   r   r   r   r   r   [  !     ! !E,, ! !r   c                rT   )z7Returns True if the image interface is supported on objFz/AXObject: Exception calling get_image_iface on r0   N)r   rI   r   r.   Zget_image_ifacer   r3   rS   rU   rW   r   supports_imageZAXObject.supports_imageZ  {       %%	$$44S9E D   {{ 	CC55'RC!!#c2	rY   c                r*   r+   r;   r   r   r   r   r   k  re   r   c                rT   )z;Returns True if the selection interface is supported on objFz3AXObject: Exception calling get_selection_iface on r0   N)r   rI   r   r.   Zget_selection_ifacer   r3   rS   rU   rW   r   supports_selectionZAXObject.supports_selectionj  rg   rY   c                r*   r+   r;   r   r   r   r   r   {  rl   r   c                rT   )z7Returns True if the table interface is supported on objFz/AXObject: Exception calling get_table_iface on r0   N)r   rI   r   r.   Zget_table_ifacer   r3   rS   rU   rW   r   supports_tableZAXObject.supports_tablez  rn   rY   c                r*   r+   r;   r   r   r   r   r     s!     ! !!1!1 !d !r   c                rT   )z<Returns True if the table cell interface is supported on objFz.AXObject: Exception calling get_table_cell on r0   N)r   rI   r   r.   Zget_table_cellr   r3   rS   rU   rW   r   supports_table_cellZAXObject.supports_table_cell  s{       %%	$$33C8E D   {{ 	B3%r%QC!!#c2	rY   c                r*   r+   r;   r   r   r   r   r     s!     ! !5++ ! !r   c                rT   )z6Returns True if the text interface is supported on objFz.AXObject: Exception calling get_text_iface on r0   N)r   rI   r   r.   Zget_text_ifacer   r3   rS   rU   rW   r   supports_textZAXObject.supports_text  s{       %%	$$33C8E
 D  	 {{ 	B3%r%QC!!#c2	rY   c                r*   r+   r;   r   r   r   r   r     rl   r   c                rT   )z7Returns True if the value interface is supported on objFz/AXObject: Exception calling get_value_iface on r0   N)r   rI   r   r.   Zget_value_ifacer   r3   rS   rU   rW   r   supports_valueZAXObject.supports_value  rn   rY   c                J   < V ^8  d   QhRS[ P                  RS[S[,          /# r+   )r   r.   listintr   r   r   r   r     s%      e&& 49 r   c                s   \         P                  V 4      '       g   . # . pT pV'       dG    VP                  \        P                  P                  V4      4       \         P                  T4      pKN  VP                  4        V#   \        P                   d+   pRT RT 2p\         P                  Y#T4       . u Rp?# Rp?ii ; i)zAReturns the path from application to obj as list of child indicesz0AXObject: Exception getting index in parent for r0   N)r   rI   appendr   r.   get_index_in_parentr   r3   rS   get_parent_checkedreverse)r,   ZpathZaccr8   r#   r:   r   get_pathZAXObject.get_path  s       %%IE,,@@EF
 --c2C ;; HRPUwW%%c#6	s   .B CB<6C<Cc                r*   r+   r   r.   rv   r   r   r   r   r     s!      !1!1 c r   c                    \         P                  V 4      '       g   R#  \        P                  P	                  V 4      pV#   \
        P                   d(   pRT 2p\         P                  YT4       Ru Rp?# Rp?ii ; i)z0Returns the child index of obj within its parentz,AXObject: Exception in get_index_in_parent: N)r   rI   r   r.   rx   r   r3   rS   )r,   indexr8   r#   rW   r   rx   ZAXObject.get_index_in_parent  ss       %%I	$$88=E  {{ 	@HC!!#c2I	   A   A<A71A<7A<c                \   < V ^8  d   QhRS[ P                  RS[ P                  R,          /# r   r,   r   Nr   r.   r   r   r   r   r     s,      (( U-=-=-D r   c                sX   \         P                  V 4      '       g   R#  \        P                  P	                  V 4      pY8X  d.   RT R.p\        P                  ! \        P                  TR4       R# Tfx   \         P                  T 4      \        P                  P                  \        P                  P                  39  d,   RT R.p\        P                  ! \        P                  TR4       T#   \
        P                   d'   pRT 2p\         P                  YT4        Rp?R# Rp?ii ; i)zBReturns the accessible parent of obj. See also get_parent_checked.Nz#AXObject: Exception in get_parent: r=   zclaims to be its own parentTzclaims to have no parent)r   rI   r   r.   r@   r   r3   rS   r   r4   r   r>   r?   INVALIDZDESKTOP_FRAME)r,   rE   r8   r#   r9   r:   r   r@   ZAXObject.get_parent  s       %%	%%005F =!3(EFFu//>>  %ejj.@.@%**BZBZ-[[!3(BCFu//> {{ 	7w?C!!#c2	s   C. .D)D$$D)c                r   r   r   r   r   r   r   r     s,       0 0 U5E5E5L r   c           	     s   \         P                  V 4      '       g   R# \         P                  V 4      pV\        P                  P
                  \        P                  P                  39   d   R# \         P                  V 4      pVf   R# \        P                  \        P                  8  d   V# \         P                  V 4      '       d   V# \         P                  V 4      p\         P                  V4      pV^ 8  g   W48  d4   RV RVRVRVR.	p\        P                  ! \        P                  VR4       V# \         P                  W 4       V# )z9Returns the parent of obj, doing checks for tree validityNr=   z	has indexz; parentZhasZchildrenT)r   rI   r>   r   r?   r   rD   r@   r   r   
debugLevelrL   rx   get_child_countr4   get_active_descendant_checked)r,   rolerE   r   
n_childrenr9   rc   r   ry   ZAXObject.get_parent_checked  s      %%  %EJJ&&

(>(>??$$S)>e...MC  M,,S1--f5
19+!3U &%ZIFu//>M 	..v;r   c                s^   < V ^8  d   QhRS[ P                  RS[S[ P                  ,          /# r+   )r   r.   ru   r   r   r   r   r     s,     	 	E,, 	e6F6F1G 	r   c                s    . p\         P                  V 4      pV'       d)   VP                  V4       \         P                  V4      pK0  VP                  4        V# )zAReturns a list of the ancestors of obj, starting with its parent.)r   ry   rw   rz   )r,   Z	ancestorsrE      &  r   _get_ancestorsZAXObject._get_ancestors  sL     	,,S1V$008Fr   c                v   < V ^8  d   QhRS[ P                  RS[ P                  RS[ P                  R,          /# )r   obj1obj2r   Nr   r   r   r   r   r   &  s>       
		D	 r   c                s   RV RV.p\         P                  ! \         P                  VR4       V '       d	   V'       g   R# W8X  d   V # \        P	                  V 4      V .,           p\        P	                  V4      V.,           pRp\        W44       F  w  rgWg8X  d   TpK   M	  RV RVRV.p\         P                  ! \         P                  VR4       V# )z-Returns the common ancestor of obj1 and obj2.z(AXObject: Looking for common ancestor ofZandTNzAXObject: Common ancestor ofZis)r   r4   r   r   r   Zzip)r   r   r9   Zobj1_ancestorsZobj2_ancestorsresultZa1Za2s   &&      r   get_common_ancestorZAXObject.get_common_ancestor%  s     =dE4P5++VT:<K!006$?!006$?.9FBx	 : 1$tT6R5++VT:r   c                   < V ^8  d   QhRS[ P                  RS[S[ P                  .S[3,          RS[ P                  R,          /# r   r,   predr   Nr   r.   r   r<   r   r   r   r   r   B  sK     	1 	1	1(()4/0	1 
		D	 	1r   c                sL    V! V 4      '       d   V # \         P                  W4      # )zHReturns obj, or the ancestor of obj, for which the function pred is true)r   find_ancestor)r,   r      &&r   r`   Z AXObject.find_ancestor_inclusiveA  s#     99J%%c00r   c                r   r   r   r   r   r   r   r   N  sK      (()4/0 
		D	 r   c                sX   \         P                  V 4      '       g   R# V .p\         P                  V 4      pV'       dm   W29   d/   RVRV.p\        P                  ! \        P
                  VR4       R# V! V4      '       d   V# VP                  V4       \         P                  V4      pKt  R# )z8Returns the ancestor of obj if the function pred is trueNz4AXObject: Circular tree suspected in find_ancestor. zalready in: T)r   rI   ry   r   r4   r   rw   )r,   r   ZobjectsrE   r9   rM   r   r   ZAXObject.find_ancestorM  s       %% %,,S1 P .';""5#3#3VTBF||NN6"008Fr   c                sZ   < V ^8  d   QhRS[ P                  RS[ P                  RS[RS[/# )r   r,   ancestor	inclusiver   r;   r   r   r   r   r   j  sC     P PP""P P 
	Pr   c                s   a \         P                  V 4      '       g   R# \         P                  S4      '       g   R# V S8X  d   V'       d   R# \         P                  V V3R l4      RJ# )zQReturns true if ancestor is an ancestor of obj or, if inclusive, obj is ancestor.FTc                 s   < V S8H  # r\   r   )r^   r   s   &r   r_   Z&AXObject.is_ancestor.<locals>.<lambda>z  s	    Q(]r   N)r   rI   r   )r,   r   r   s   &f&r   is_ancestorZAXObject.is_ancestori  sR       %%  **(?y%%c+BC4OOr   c                b   < V ^8  d   QhRS[ P                  RS[RS[ P                  R,          /# r   r,   r   r   Nr|   r   r   r   r   r   }  s3      u''  8H8H48O r   c                s   \         P                  V 4      '       g   R# \         P                  V 4      pV^ 8:  d   R# VR8X  d
   V^,
          p^ Tu;8:  d
   V8  g    R#  R#  \        P                  P                  W4      pY08X  d.   RT R.p\        P                  ! \        P                  TR4       R# T#   \        P                   d'   pRT 2p\         P                  YT4        Rp?R# Rp?ii ; i)z9Returns the nth child of obj. See also get_child_checked.Nz"AXObject: Exception in get_child: r=   zclaims to be its own childTr~   )r   rI   r   r   r.   get_child_at_indexr   r3   rS   r   r4   r   )r,   r   r   childr8   r#   r9      &&     r   	get_childZAXObject.get_child|  s       %%--c2
?B;NEE&J& '	$$77CE <!3(DEFu//> {{ 	6ug>C!!#c2	s   "B6 6C1C,,C1c                r   r   r|   r   r   r   r   r     s6      &)			D	 r   c                sF   \         P                  V 4      '       g   R# \         P                  W4      p\        P                  \        P
                  8  d   V# \         P                  V4      pW8w  d/   RV RVRV.p\        P                  ! \        P                  VR4       V# )z<Returns the nth child of obj, doing checks for tree validityNr=   Zclaimszas child; child's parent isT)r   rI   r   r   r   r   r@   r4   )r,   r   r   rE   r9   rM   r   get_child_checkedZAXObject.get_child_checked  s       %%""3.e...L$$U+=!3%9VX^_Fu//>r   c                r   )r   	containerreported_childr   Nr   r   r   r   r   r     s>      ##(( 
		D	 r   c                s   \         P                  V \        P                  P                  4      '       g   V# \         P                  V4      p \        P                  P                  W4      pY18w  d3   RT RT R2TRT.p\        P                  ! \        P                  TR4       T#   \        P                   d(   pRT 2p\         P                  YT4       Tu Rp?# Rp?ii ; i)zDChecks the reported active descendant and return the real/valid one.z6AXObject: Exception in get_active_descendant_checked: Nz
AXObject: z's child at z is z; not reported childT)r   	has_stater   	StateTypeZMANAGES_DESCENDANTSrx   r.   r   r   r3   rS   r   r4   r   )r   r   r   Z
real_childr8   r#   r9   r   r   r   Z&AXObject.get_active_descendant_checked  s     !!)U__-P-PQQ!!,,^<	"))<<YNJ 'i<wd)CZ&F u//> {{ 	"J5'RC!!)C8!!	"s   B& &C";CC"C"c                r   r   r   r   r   r   r   r     sK      (()4/0 
		D	 r   c                s&   \         P                  V 4      '       g   R# \        \         P                  V 4      4       FQ  p\         P	                  W4      pVf   K  V! V4      '       d   Vu # \         P                  W14      pV'       g   KO  Vu # 	  R# ):Returns the descendant of obj if the function pred is trueN)r   rI   ranger   r   _find_descendant)r,   r   ir      &&  r   r   ZAXObject._find_descendant  sw       %%x//45A..s6E}E{{--e:Eu 6 r   c                r   r   r   r   r   r   r   r     sK     
 

(()4/0
 
		D	 
r   c                s    \         P                   ! 4       p\        P                  W4      pRVR\         P                   ! 4       V,
          R R2.p\        P                  ! \        P
                  VR4       V# )r   z AXObject: find_descendant: foundzin .4fsT)r   r   r   r   r4   r   )r,   r   r(   r   r9   rM   r   find_descendantZAXObject.find_descendant  sb     		**354fDIIKRWDWX[C\\]>^_5++VT:r   c                r   r   r   r   r   r   r   r     s,     
< 
<U%5%5 
<%:J:JT:Q 
<r   c                s    \         P                  V 4      '       g   R# \         P                  V \         P                  V 4      ^,
          4      pVf   V # \         P	                  V4      # )z%Returns the deepest descendant of objN)r   rI   r   r   find_deepest_descendant)r,   Z
last_childr$   r   r   Z AXObject.find_deepest_descendant  sV       %%''X-E-Ec-JQ-NO
J//
;;r   c          
      s   < V ^8  d   QhRS[ P                  RS[S[ P                  .S[3,          R,          RS[S[ P                  .S[3,          R,          RS[S[ P                  ,          RR/# )r   r,   
include_ifN
exclude_ifmatchesr   r   r.   r   r<   ru   r   r   r   r   r     s     S SSe../56=S e../56=S e&&'	S
 
Sr   c                sb   \         P                  V 4      '       g   R# \         P                  V 4      p\        V4       Fm  p\         P	                  W4      pV'       d   V! V4      '       d   K0  V'       d    V! V4      '       d   VP                  V4       \         P                  WaW#4       Ko  	  R# )IReturns all descendants which match the specified inclusion and exclusionN)r   rI   r   r   r   rw   _find_all_descendants)r,   r   r   r   child_countr   r   s   &&&&   r   r   ZAXObject._find_all_descendants  s       %%..s3{#A&&s.Ej//j//u%**5jR $r   Nc          	      s   < V ^8  d   QhRS[ P                  RS[S[ P                  .S[3,          R,          RS[S[ P                  .S[3,          R,          RS[S[ P                  ,          /# )r   rootr   Nr   r   r   r   r   r   r   r     sr      e../56= e../56= 
e		r   c                s   \         P                   ! 4       p. p\        P                  WW$4       R\        V4       R\         P                   ! 4       V,
          R R2p\        P
                  ! \        P                  VR4       V# )r   z AXObject: find_all_descendants: z matches found in r   r   T)r   r   r   lenr   r   r   )r   r   r   r(   r   r#      &&&   r   find_all_descendantsZAXObject.find_all_descendants  sr     		*,&&tM.s7|n =  $		e 3C8; 	 	E,,c48r   c                N   < V ^8  d   QhRS[ P                  RS[ P                  /# r+   )r   r.   r?   r   r   r   r   r   "  s%      e&& 5:: r   c                s   \         P                  V 4      '       g   \        P                  P                  #  \        P
                  P                  V 4      p\         P                  T R4       T#   \        P                   d@   pRT 2p\         P                  YT4       \        P                  P                  u Rp?# Rp?ii ; i)z"Returns the accessible role of objz!AXObject: Exception in get_role: NF)r   rI   r   r?   r   r.   r>   r   r3   rS   rN   )r,   r   r8   r#   rW   r   r>   ZAXObject.get_role!  s       %%::%%%	&##,,S1D 	''U3 {{ 	&5eW=C!!#c2::%%%	&s   A. .C4B=7C=Cc                @   < V ^8  d   QhRS[ P                  RS[RS[/# )r   r,   	localizedr   r   r.   r<   r   r   r   r   r   r   3  s(      5++   r   c                sP   \         P                  V 4      '       g   R#  V'       g"   \        P                  P	                  V 4      pV# \        P                  P                  V 4      p V#   \        P                   d'   pRT 2p\         P                  YT4        Rp?R# Rp?ii ; i)z'Returns the accessible role name of objr/   z&AXObject: Exception in get_role_name: N)	r   rI   r   r.   get_role_nameZget_localized_role_namer   r3   rS   )r,   r   Z	role_namer8   r#   rM   r   r   ZAXObject.get_role_name2  s       %%	!,,::3?	  ",,DDSI	  {{ 	:5'BC!!#c2	s"   A* A* A* *B%?B  B%c                r   )r   r,   
is_brailler   r   r   r   r   r   r   F  s)     
 
%"2"2 
 
QT 
r   c                s    \         P                  V 4      '       g   R# \         P                  V 4      pVP                  RR4      pV'       d   VP                  RV4      pV# )z.Returns the accessible role description of objr/   ZroledescriptionZbrailleroledescriptionr   rI   get_attributes_dictrJ   )r,   r   attrsZrvr   r   get_role_descriptionZAXObject.get_role_descriptionE  sR       %%,,S1YY("-3R8B	r   c                r*   r+   r-   r   r   r   r   r   S  s!      u// C r   c                (   \         P                  V 4      '       g   R#  \        P                  P	                  V 4      p\         P                  T R4       T#   \
        P                   d'   pRT 2p\         P                  YT4        Rp?R# Rp?ii ; i)z Returns the accessible id of objr/   z*AXObject: Exception in get_accessible_id: NF)	r   rI   r   r.   get_accessible_idr   r3   rS   rN   r,   r   r8   r#   rW   r   r   ZAXObject.get_accessible_idR  s       %%	%%77<F 	''U3 {{ 	>ugFC!!#c2	   A B+BBc                r*   r+   r-   r   r   r   r   r   d  s!      e&& 3 r   c                r   )z"Returns the accessible name of objr/   z!AXObject: Exception in get_name: NF	r   rI   r   r.   rb   r   r3   rS   rN   )r,   r7   r8   r#   rW   r   rb   ZAXObject.get_namec  s       %%	##,,S1D 	''U3 {{ 	5eW=C!!#c2	r   c                sT   < V ^8  d   QhRS[ P                  RS[ P                  RS[/# )r   r   r   r   r;   r   r   r   r   r   u  s/     0 0e&6&6 0e>N>N 0SW 0r   c                sp    \         P                  V 4      pV'       g   R# V\         P                  V4      8H  # )z;Returns true if obj1 and obj2 share the same non-empty nameF)r   rb   )r   r   Zname1   && r   has_same_non_empty_nameZ AXObject.has_same_non_empty_namet  s0     !!$'))$///r   c                r*   r+   r-   r   r   r   r   r     s!      U-- # r   c                    \         P                  V 4      '       g   R#  \        P                  P	                  V 4      pV#   \
        P                   d'   pRT 2p\         P                  YT4        Rp?R# Rp?ii ; i)z)Returns the accessible description of objr/   z(AXObject: Exception in get_description: N)r   rI   r   r.   get_descriptionr   r3   rS   r,   descriptionr8   r#   rW   r   r   ZAXObject.get_description~  sp       %%	**::3?K  {{ 	<UGDC!!#c2	   A   A;A66A;c                r*   r+   r-   r   r   r   r   r     s!      5#3#3  r   c                r   )z/Returns the accessible image description of objr/   z.AXObject: Exception in get_image_description: N)r   rm   r   Imageget_image_descriptionr   r3   rS   r   rW   r   r   ZAXObject.get_image_description  sn     &&s++	++;;C@K  {{ 	B5'JC!!#c2	r   c                sP   < V ^8  d   QhRS[ P                  RS[S[S[3,          /# r+   )r   r.   Ztuplerv   r   r   r   r   r     s)     " "E,, "sCx "r   c                s*   \         P                  V 4      '       g   R#  \        P                  P	                  V 4      pTP                  TP                  3#   \
        P                   d(   pRT 2p\         P                  YT4       Ru Rp?# Rp?ii ; i)z3Returns a (width, height) tuple of the image in objz'AXObject: Exception in get_image_size: N)    r   )
r   rm   r   r   get_image_sizer   r3   rS   r^   Zyr   rW   r   r   ZAXObject.get_image_size  s     &&s++K	[[//4F xx!! {{ 	;E7CC!!#c2K	s   A B+BBBc                r*   r+   r-   r   r   r   r   r     s!      5++  r   c                s   \         P                  V 4      '       g   R#  \        P                  P	                  V 4      ;'       g    RpV#   \
        P                   d%    \         P                  T R4      ;'       g    Rp T# i ; i)z'Returns the accessible help text of objr/   Zhelptext)r   rI   r   r.   get_help_textr   r3   get_attribute)r,   Ztextr$   r   r   ZAXObject.get_help_text  sy       %%	A##11#6<<"D
 	 {{ 	A))#z:@@bD		As   %A
 A
 
1B<BBc                r*   r+   r|   r   r   r   r   r     s!      U-- # r   c                    \         P                  V 4      '       g   ^ #  \        P                  P	                  V 4      pV#   \
        P                   d'   pRT 2p\         P                  YT4        Rp?^ # Rp?ii ; i)zReturns the child count of objz(AXObject: Exception in get_child_count: N)r   rI   r   r.   r   r   r3   rS   r,   Zcountr8   r#   rW   r   r   ZAXObject.get_child_count  so       %%	$$44S9E  {{ 	<UGDC!!#c2	r   c          	      s   < V ^8  d   QhRS[ P                  RS[S[ P                  .S[3,          R,          RS[S[ P                  RR3,          /# )r   r,   r   Nr   )r   r.   r   r<   r   r   r   r   r   r     sW      (()4/047 
5##T4/	0r   c              #  s  "   \         P                  V 4      '       g   R# \         P                  V 4      pVR8  d-   RV R.p\        P                  ! \        P
                  VRR4       \        V4       F  p\         P                  W4      pVfJ   \         P                  V 4      '       g/   RV R.p\        P                  ! \        P
                  VR4        R# Vf   Kk  Ve   V! V4      '       g   K  Vx  K  	  R# 5i)zGenerator to iterate through obj's children. If the function pred is
specified, children for which pred is False will be skipped.Ni  r=   zhas more than 500 childrenTzis no longer valid)r   rI   r   r   r4   r   r   r   )r,   r   r   r9   r   r   s   &&    r   iter_childrenZAXObject.iter_children  s        %%..s3!3(DEFu//tD;'E&&s2E}X%6%6s%;%;%s,@A""5#3#3VTB dld5kk (s   B'C<*/C<C<2
C<c                r   r   r   r   r   r   r   r     s,      %"2"2 u7G7G$7N r   c                sP   \         P                  V 4      '       g   R# \         P                  V 4      pVf   R# \         P                  V 4      pV^ 8:  d   R# \         P	                  W^,
          4      pW08X  d.   RV R.p\
        P                  ! \
        P                  VR4       R# V# )z;Returns the previous sibling of obj, based on child indicesNr=   claims to be its own siblingTr   rI   r@   rx   r   r   r4   r   r,   rE   r   Zsiblingr9   r:   r   get_previous_siblingZAXObject.get_previous_sibling  s       %%$$S)>,,S1A:$$VQY7>!3(FGFu//>r   c                r   r   r   r   r   r   r   r     s,      e.. 53C3Cd3J r   c                sP   \         P                  V 4      '       g   R# \         P                  V 4      pVf   R# \         P                  V 4      pV^ 8  d   R# \         P	                  W^,           4      pW08X  d.   RV R.p\
        P                  ! \
        P                  VR4       R# V# )z7Returns the next sibling of obj, based on child indicesNr=   r   Tr   r   r:   r   get_next_siblingZAXObject.get_next_sibling   s       %%$$S)>,,S119$$VQY7>!3(FGFu//>r   c                r   r+   )r   r.   StateSetr   r   r   r   r     s%      5++  r   c                s   \         P                  V 4      '       g   \        P                  ! 4       #  \        P                  P                  V 4      pTf@   RT .p\        P                  ! \        P                  TR4       \        P                  ! 4       # \         P                  T R4       T#   \        P                   d;   pRT 2p\         P                  YT4       \        P                  ! 4       u Rp?# Rp?ii ; i)z)Returns the state set associated with objz&AXObject: Exception in get_state_set: Nz"AXObject: get_state_set failed forTF)r   rI   r   r   r.   get_state_setr   r3   rS   r   r4   r   rN   )r,   Z	state_setr8   r#   r9   r:   r   r   ZAXObject.get_state_set  s       %%>>##	$((66s;I :C@Fu//>>>##''U3 {{ 	$:5'BC!!#c2>>##	$s   B, ,C;/C60C;6C;c                sT   < V ^8  d   QhRS[ P                  RS[ P                  RS[/# )r   r,   stater   )r   r.   r   r<   r   r   r   r   r   .  s,     ; ;u'' ; ;D ;r   c                s    \         P                  V 4      '       g   R# \         P                  V 4      P                  V4      # )z+Returns true if obj has the specified stateF)r   rI   r   Zcontains)r,   r   r   r   r   ZAXObject.has_state-  s4       %%%%c*33E::r   c                rO   )r   r,   	recursiver   r   Nr   r   r   r   r   r   7  s7     3 333 3 
	3r   c                sT   V f   R# RV RV R2.pV'       d   VP                  RV 24       \        P                  ! \        P                  VR4       V'       g#    \        P
                  P                  V 4       R#  \        P
                  P                  V 4       R#   \        P                   d7   pRT 2p\        P                  ! \        P                  TR4        Rp?R# Rp?ii ; i  \        P                   d'   pRT 2p\        P                  YT4        Rp?R# Rp?ii ; i)	z7Clears the Atspi cached information associated with objNz"AXObject: Clearing AT-SPI cache onzRecursive: Z.r   Tz+AXObject: Exception in clear_cache_single: z$AXObject: Exception in clear_cache: )rw   r   r4   r   r   r.   Zclear_cache_singler   r3   r   clear_cacher   rS   )r,   r   r   r9   r8   r#   r   r   r   ZAXObject.clear_cache6  s    ;6{9+UV=WXMMIfX./5++VT:A  33C8 	3((- ;; ACE7K##E$4$4c4@@A {{ 	38@C!!#c22	3s0   B =C, C)3+C$$C),D'D""D'c                r*   r+   r|   r   r   r   r   r   U  s!      E,,  r   c                r}   )z*Returns the process id associated with objz'AXObject: Exception in get_process_id: Nr~   )r   rI   r   r.   get_process_idr   r3   rS   )r,   Zpidr8   r#   rW   r   r   ZAXObject.get_process_idT  ss       %%I	""11#6C 
 {{ 	;E7CC!!#c2I	r   c                r*   r+   r;   r   r   r   r   r   e  s!      U%% $ r   c                s4   V f   R# \         P                  V 4      '       g   R#  \        P                  P	                  V 4       \         P                  T R4       R#   \
        P                   d'   pRT 2p\         P                  YT4        Rp?R# Rp?ii ; i)z6Returns true of obj exists but is believed to be dead.NFTzAXObject: Accessible is dead: r   )r,   r8   r#   r   r   rL   ZAXObject.is_deadd  s     ;  %%	 %%c* 	''U3 {{ 	25':C!!#c2	s   A B1BBc                sV   < V ^8  d   QhRS[ P                  RS[RS[S[S[3,          /# )r   r,   	use_cacher   )r   r.   r<   dictr   r   r   r   r   r   {  s5       
c3hr   c                s   \         P                  V 4      '       g   / # V'       d3   \         P                  P                  \	        V 4      4      pV'       d   V#  \
        P                  P                  V 4      pTf   / # T\         P                  \	        T 4      &   T#   \        P                   d(   pRT 2p\         P                  YT4       / u Rp?# Rp?ii ; i)z5Returns the object attributes of obj as a dictionary.z,AXObject: Exception in get_attributes_dict: N)r   rI   r"   rJ   rK   r   r.   Zget_attributesr   r3   rS   )r,   r   
attributesr8   r#   rM   r   r   ZAXObject.get_attributes_dictz  s       %%I!3377S	BJ!!	))88=J I0:""49- {{ 	@HC!!#c2I	s   B C1CCCc                sF   < V ^8  d   QhRS[ P                  RS[RS[RS[/# )r   r,   attribute_namer   r   r   r.   r   r<   r   r   r   r   r     s7     2 222 2 
	2r   c                s    \         P                  V 4      '       g   R# \         P                  W4      pVP                  VR4      # )z9Returns the value of the specified attribute as a string.r/   r   )r,   r   r   r   rR   r   r   ZAXObject.get_attribute  s9       %%11#A
~~nb11r   c                r*   r+   r|   r   r   r   r   r     s!      5++  r   c                r   )z/Returns the number of actions supported on obj.z&AXObject: Exception in get_n_actions: N)r   rX   r   Actionget_n_actionsr   r3   rS   r   rW   r   r   ZAXObject.get_n_actions  sm     '',,	LL..s3E  {{ 	:5'BC!!#c2	r   c                &   < V ^8  d   QhRS[ RS[ /# )r   action_namer   r   r   r   r   r   r     s      C C r   c                s    V '       g   R# \         P                  ! RRV 4      P                  4       p\         P                  ! RRV4      pV# )z?Adjusts the name to account for differences in implementations.r/   z(?<=[a-z])([A-Z])z-\1z"[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~]Z-)rP   Zsubr5   )r   r7   r$   r   _normalize_action_nameZAXObject._normalize_action_name  s>     vv*FK@FFHvv=sDIr   c                r   r   r,   r   r   r   r.   rv   r   r   r   r   r   r     s(     5 5U-- 5# 5# 5r   c                s8   ^ Tu;8:  d   \         P                  V 4      8  g    R#  R#  \        P                  P	                  W4      p\         P                  T4      #   \
        P                   d'   pRT 2p\         P                  YT4        Rp?R# Rp?ii ; i)z,Returns the name of obj's action at index i.r/   z(AXObject: Exception in get_action_name: N)	r   r   r   r   get_action_namer   r3   rS   r   )r,   r   r7   r8   r#   rM   r   r   ZAXObject.get_action_name  s     A3..s33 4	<<//7D ..t44 {{ 	<UGDC!!#c2	s   A B3BBc                rt   r+   )r   r.   ru   r   r   r   r   r   r     s%      e.. 49 r   c                s    . p\        \        P                  V 4      4       F3  p\        P                  W4      pV'       g   K"  VP	                  V4       K5  	  V# )z-Returns the list of actions supported on obj.)r   r   r   r   rw   )r,   Zresultsr   r7   rW   r   get_action_namesZAXObject.get_action_names  sK     x--c23A++C3Dtt$ 4 r   c                r   r   r   r   r   r   r   r     s(      E$4$4   r   c                   ^ Tu;8:  d   \         P                  V 4      8  g    R#  R#  \        P                  P	                  W4      pV#   \
        P                   d'   pRT 2p\         P                  YT4        Rp?R# Rp?ii ; i)z3Returns the description of obj's action at index i.r/   z/AXObject: Exception in get_action_description: N)r   r   r   r   get_action_descriptionr   r3   rS   )r,   r   r   r8   r#   rM   r   r   ZAXObject.get_action_description  s}     A3..s33 4	,,==cEK  {{ 	CE7KC!!#c2	   A B BBc                r   r   r   r   r   r   r   r     s(      E$4$4   r   c                s$   ^ Tu;8:  d   \         P                  V 4      8  g    R#  R#  \        P                  P	                  W4      pTR8X  d   R# T#   \
        P                   d'   pRT 2p\         P                  YT4        Rp?R# Rp?ii ; i)z:Returns the key binding string of obj's action at index i.r/   z/AXObject: Exception in get_action_key_binding: Nz<VoidSymbol>)r   r   r   r   Zget_key_bindingr   r3   rS   )r,   r   Z
keybindingr8   r#   rM   r   get_action_key_bindingZAXObject.get_action_key_binding  s     A3..s33 4	55c=J ' {{ 	CE7KC!!#c2	s   A B)B

Bc                r   )r   sequencer   r   r   r   r   r   r     s     8 8c 8c 8r   c                s   V '       g   R# \        V 4      ^8  dY   V P                  R4      '       gB   RV 9  d;   V P                  R4      pRP                  R VRR  4       4      VR,          ,           p  \        P
                  ! V 4      w  r#\        P                  ! W#4      pV'       d   VP                  R4      '       g   Tp \        P                   ! T 4      #   \        P                   df   pRT 2p\        P                  ! \        P                  TR4       T P                  RR4      P                  R	R
4      P                  4       p  Rp?LRp?ii ; i)z8Returns the human consumable label for the key sequence.r/   <Z,Z+c              3   s.   "   T F  pR V R2x  K  	  R# 5i)r   >Nr   )Z.0Zpartr$   r   Z	<genexpr>Z7AXObject._get_label_for_key_sequence.<locals>.<genexpr>  s     C{t4&{{s   Nz4AXObject: Exception in _get_label_for_key_sequence: Tr    r~   )r   rC   splitjoinr   Zaccelerator_parseZaccelerator_get_labelZendswithr   r3   r   r   r   rQ   stripr   Zlocalize_key_sequence)r   r9   ZkeyZmodsr   r8   r#   s   &      r   _get_label_for_key_sequenceZ$AXObject._get_label_for_key_sequence  s     x=1X%8%8%=%=#XBU^^C(FwwCvcr{CCfRjPH		"--h7IC..s9F fooc22!--h77 {{ 	KHPC 0 0#t<''R088cBHHJH	Ks   4.C E.AEEc                r*   r+   r-   r   r   r   r   r     s!      U-- # r   c                sX   \         P                  V 4      pVP                  RR4      P                  R4      pV'       dY   V^ ,          '       dJ   RP	                  \        \         P                  V4      4      P                  4       p\        V4      ^8  d   V# \         P                  V 4      pVR8X  d   R# \         P                  W4      P                  R4      p\        V4      ^8X  d   \         P                  V^,          4      # \         P                  VR,          4      pRV9   d   V# R# )z5Returns the accelerator/shortcut associated with obj.keyshortcutsr/   r   ;Ctrlr~   )r   r   rJ   r   r   mapr   r   r   "_find_first_action_with_keybindingr   r,   r   Z	shortcutsr   r   Zstringsrc   r   get_acceleratorZAXObject.get_accelerator  s     ,,S1 IInb177<	1XXc("F"F	RSYY[F6{Q;;C@B; 11#=CCCHw<177
CC 55gbkBVMr   c                r*   r+   r-   r   r   r   r   r   :  s!      %** s r   c                s<   \         P                  V 4      pVP                  RR4      P                  R4      pV'       dY   V^ ,          '       dJ   RP	                  \        \         P                  V4      4      P                  4       p\        V4      ^8X  d   V# \         P                  V 4      pVR8X  d   R# \         P                  W4      P                  R4      p\         P                  V^ ,          4      pRV9   g   RV9   d   R# VP                  4       R9   d   R# V# )	z)Returns the mnemonic associated with obj.r   r/   r   r   r   ZControlr~   )r   Zspacez<space>)r   r   rJ   r   r   r   r   r   r   r  r   r5   r  rc   r   get_mnemonicZAXObject.get_mnemonic9  s     ,,S1 IInb177<	1XXc("F"F	RSYY[F6{a;;C@B; 11#=CCCH55gajAVyF2 <<>66r   c                r*   r+   r|   r   r   r   r   r   \  s!      0@0@ S r   c                s    \        \        P                  V 4      4       F"  p\        P                  W4      '       g   K   Vu # 	  R# )z?Returns the index of the first action with a keybinding on obj.r~   )r   r   r   r   )r,   r   r$   r   r  Z+AXObject._find_first_action_with_keybinding[  s;     x--c23A..s66 4 	r   c                r   r   r,   r   r   r   r   r   r   r   r   e  s-     @ @(( @s @t @r   c                s2    \         P                  W4      ^ 8  # )z5Returns true if the named action is supported on obj.)r   get_action_index)r,   r   r   r   
has_actionZAXObject.has_actiond  s     ((:a??r   c                r   r  )r   r.   r   rv   r   r   r   r   r   k  s(      e.. S S r   c                s    \         P                  V4      p\        \         P                  V 4      4       F!  pV\         P	                  W4      8X  g   K  Vu # 	  R# )z;Returns the index of the named action or -1 if unsupported.r~   )r   r   r   r   r   )r,   r   r   r   r   r  ZAXObject.get_action_indexj  sM     55kBx--c23Ah66s>> 4 	r   c                r   r   )r   r.   rv   r<   r   r   r   r   r   v  s(      u'' C D r   c                r   )zInvokes obj's action at index i. The return value, if true, may be
meaningless because most implementors return true without knowing if
the action was successfully performed.Fz"AXObject: Exception in do_action: N)r   r   r   r   	do_actionr   r3   rS   )r,   r   r   r8   r#   rM   r   r  ZAXObject.do_actionu  s|     A3..s33 4	\\++C3F  {{ 	6ug>C!!#c2	r   c                r   r  r   r   r   r   r   r     s(     . .U-- .C .D .r   c                s    \         P                  W4      pVR8X  d/   RVRV .p\        P                  ! \        P                  VR4       R# \         P                  W4      # )zInvokes the named action on obj. The return value, if true, may be
meaningless because most implementors return true without knowing if
the action was successfully performed.zINFO:znot an available action forTFr~   )r   r  r   r4   r   r  )r,   r   r   r9   r   r   do_named_actionZAXObject.do_named_action  sV     ))#;B;{,I3OFu//>!!#--r   c                r*   r+   r;   r   r   r   r   r     s!      (( T r   c                s   \         P                  V 4      '       g   R#  \        P                  P	                  V 4      p\        P                  \        P                  8  d   T# T'       d`   \         P                  T \        P                  P                  4      '       g,   RT R.p\        P                  ! \        P                  TR4       T#   \
        P                   d'   pRT 2p\         P                  YT4        Rp?R# Rp?ii ; i)z:Attempts to grab focus on obj. Returns true if successful.Fz#AXObject: Exception in grab_focus: Nr=   z$lacks focused state after focus grabT)r   rf   r   Z	Component
grab_focusr   r3   rS   r   r   r   r   r   ZFOCUSEDr4   )r,   r   r8   r#   r9   r:   r   r
  ZAXObject.grab_focus  s     **3//	__//4F e...M(,,S%//2I2IJJ!3(NOFu//> {{ 	7w?C!!#c2	s   C D!DDc                st   < V ^8  d   Qh/ S[ S[S[3,          ;R&   S[ S[S[ S[S[3,          3,          ;R&   # )r   r!   r"   )r   rv   r<   r   r   r   r   r   r   2   s9      S$Y$  Cc3h/05	 r   r   )r/   )F)NNr\   )Fr/   )T)\Z__name__Z
__module__Z__qualname__Z__firstlineno____doc__r!   r"   r'   ZLockr    Zstaticmethodr   r   r&   r)   r2   rB   rF   rI   rG   rN   rS   rX   ra   rd   rf   rh   ri   rj   rk   rm   ro   rp   rq   rr   rs   r{   rx   r@   ry   r   r   r`   r   r   r   r   r   r   r   r   r   r   r>   r   r   r   rb   r   r   r   r   r   r   r   r   r   r   r   r   r   rL   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r	  r
  Z__annotate_func__Z__static_attributes__Z__classdictcell__)r   s   @r   r   r   2   s    G"$J35NNE/ / / / / 1 1 1
         0 G G
 H H
 ? ?( 7 7" ! ! H H ! !F ! !  ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !  (    2  @ 	 	  6 	1 	1  6 P P P$  <  &  4  * 
 
 
< 
< S S(   "      $ 
 
 
       0 0     " "        2  ,  ,  * ; ; 3 3 3:    *   6 2 2 2     5 5      $ 8 82  B  B   @ @
    " . .  I+  r   r   )r  Z__id__Z__version__Z__date__Z__copyright__Z__license__rP   r'   r   Ztypingr   r   ZgiZrequire_versionZgi.repositoryr   r   r   r/   r   r   r   r)   r   r   r   <module>r     s}   4 D1 	   & 	   7E "   5%       x xt+ 	 $ $ &r   