+
    Qi,  c                  sX   R t ^ RIHt RtRtRtRtRt^ RIH	t	 ^ RI
Ht ^ R	I
Ht ^ R
I
Ht ^ RI
Ht ^ RI
Ht ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^RIHt ]	'       d9   ^ RIt]P6                  ! RR4       ]P6                  ! RR4       ^ RIHtHt ^ RIH t   ! R R]PB                  4      t!R# )zCustom script for Thunderbird.)annotationsz$Id$z
$Revision$z$Date$z-Copyright (c) 2004-2008 Sun Microsystems Inc.ZLGPL)TYPE_CHECKING)cmdnames)debug)focus_manager)input_event)settings_manager)Gecko)AXObject)AXText)AXUtilities
SpellCheckNAtspiz2.0Gtkz3.0)r   r   )	Utilitiesc                  s  a  ] tR t^6t$ RtR]R&   R]R&   R V 3R lltR V 3R	 lltR
 R ltR V 3R llt	R V 3R llt
R V 3R lltR/R V 3R llltR0R V 3R llltR0R V 3R llltR1R V 3R llltR V 3R lltR V 3R lltR V 3R lltR  V 3R! lltR" V 3R# lltR$ V 3R% lltR& V 3R' lltR( V 3R) lltR* V 3R+ lltR, V 3R- lltR.tV ;t# )2ScriptzThe script for Thunderbird.r   
spellcheckz'Utilities'	utilitiesc                    V ^8  d   QhRRRR/# )   appAtspi.AccessiblereturnNone Zformat   "I/usr/lib/python3.14/site-packages/orca/scripts/apps/Thunderbird/script.py__annotate__Script.__annotate__=   s      ,      c                	sR  < \         P                  ! 4       P                  R 4      f&   \         P                  ! 4       P                  R R4       \         P                  ! 4       P                  R4      f&   \         P                  ! 4       P                  RR4       \        SV `  V4       R# )sayAllOnLoadNFpageSummaryOnLoad)r   get_managerget_settingZset_settingsuper__init__)selfr   	__class__   &&r   r%   ZScript.__init__=   sx    '')55nEM((*66~uM'')556IJR((*667JERr   c                   V ^8  d   QhRR/# )r   r   r   r   r   r   r   r   r   E   s     1 1D 1r   c                s  < \         SV `  4        \        P                  ! \        P
                  \        P                  4      V P                  R&   \        P                  ! \        P                  \        P                  4      V P                  R&   \        P                  ! \        P                  \        P                  4      V P                  R&   R# )z1Defines the input event handlers for this script.ZtogglePresentationModeHandlerZenableStickyFocusModeHandlerZenableStickyBrowseModeHandlerN)r$   setup_input_event_handlersr   ZInputEventHandlerr   toggle_presentation_moder   ZTOGGLE_PRESENTATION_MODEZinput_event_handlersenable_sticky_focus_modeZSET_FOCUS_MODE_STICKYenable_sticky_browse_modeZSET_BROWSE_MODE_STICKY)r&   r'   s   &r   r*   Z!Script.setup_input_event_handlersE   s     	*, ))//113 	!!"AB ))//..0 	!!"@A ))00//1 	!!"ABr   c               r)   )r   r   r   r   r   r   r   r   r   Y   s        
  r   c                s    \        V 4      # )z/Returns the spellcheck support for this script.r   )r&   s   &r   get_spellcheckZScript.get_spellcheckY   s     $r   c               r)   )r   r   zGtk.Gridr   r   r   r   r   r   ^   s       r   c                s  < \         SV `  4       pV P                  f   Q hV P                  f   Q hV P                  P	                  \
        P                  ! 4       P                  R4      4       V P                  P	                  \
        P                  ! 4       P                  R4      4       V P                  P                  4       pVP                  V^ \        VP                  4       4      ^^4       VP                  4        V# )zgReturn a GtkGrid containing the application unique configuration
GUI items for the current application.r    r!   )r$   get_app_preferences_gui_say_all_on_load_check_button"_page_summary_on_load_check_buttonZ
set_activer   r"   r#   r   ZattachlenZget_childrenZshow_all)r&   Zgridr   r'   s   &  r   r/   ZScript.get_app_preferences_gui^   s     w.011===66BBB**55((*66~F	H//::((*667JK	M __<<>
J3t'8'8':#;QBr   c               r)   )r   r   zdict[str, bool | int]r   r   r   r   r   r   q   s     
 
*? 
r   c                s*  < \         SV `  4       pV P                  f   Q hV P                  f   Q hV P                  P	                  4       VR&   V P                  P	                  4       VR&   VP                  V P                  P                  4       4       V# )z7Returns a dictionary with the app-specific preferences.r    r!   )r$   get_preferences_from_guir0   r1   Z
get_activeZupdater   )r&   Zprefsr'   s   & r   r3   ZScript.get_preferences_from_guiq   s     0211===66BBB $ B B M M On%)%L%L%W%W%Y!"T__==?@r   c               s(    V ^8  d   QhRRRRRRRR/# )r   eventzAtspi.Event | None	old_focusAtspi.Accessible | None	new_focusr   boolr   r   r   r   r   r   }   s8     K K!K +K +	K
 
Kr   c                s  < V P                   P                  V4      '       dP   V P                   P                  V4      '       * pV P                  V4       V P                   P                  VR7       R# \        SV `  WV4      # )zVHandles changes of focus of interest. Returns True if this script did all needed work.)include_labelT)r   Zis_suggestions_itemupdate_brailleZpresent_suggestion_list_itemr$   locus_of_focus_changed)r&   r4   r5   r7   r9   r'   s   &&&& r   r;   ZScript.locus_of_focus_changed}   si     ??..y99 $ C CI NNM	*OO88}8Uw-e	JJr   c               s$    V ^8  d   QhRRRRRR/# )r   objr   prev_objr6   r   r8   r   r   r   r   r   r      s(     5 55 *5 
	5r   c                	s  < V P                   P                  V4      '       d-   R V.p\        P                  ! \        P                  VR4       R# RVR.p\        P                  ! \        P                  VR4       \
        SV `  W4      # )z2THUNDERBIRD: Using focus mode for editable messageTzTHUNDERBIRD:zis not an editable message.)r   is_editable_messager   Zprint_tokensZ
LEVEL_INFOr$   use_focus_mode)r&   r<   r=   Ztokensr'   s   &&& r   r?   ZScript.use_focus_mode   st    
 >>--c22JCPFu//> #'DE5++VT:w%c44r   c               $    V ^8  d   QhRRRRRR/# r   r4   input_event.InputEvent | Noneforce_messager8   r   r   r   r   r   r   r      s-     G G,G G 
	Gr   c                	   < V P                   P                  \        P                  ! 4       P	                  4       4      '       d   R # \
        SV `  W4      # T)r   r>   r   r"   get_locus_of_focusr$   r-   r&   r4   rC   r'      &&&r   r-   Z Script.enable_sticky_browse_mode   s?    
 >>--m.G.G.I.\.\.^__w0FFr   c               r@   rA   r   r   r   r   r   r      s-     F F,F F 
	Fr   c                	rD   rE   )r   r>   r   r"   rF   r$   r,   rG   rH   r   r,   ZScript.enable_sticky_focus_mode   s?    
 >>--m.G.G.I.\.\.^__w/EEr   c               s(    V ^8  d   QhRRRRRRRR/# )r   r4   rB   documentr6   notify_userr8   r   r   r   r   r   r   r      s8     
A 
A,
A *
A 	
A
 

Ar   c                	s   < V P                   '       dE   V P                  P                  \        P                  ! 4       P                  4       4      '       d   R # \        SV `  W4      # rE   )Z_in_focus_moder   r>   r   r"   rF   r$   r+   )r&   r4   rI   rJ   r'   s   &&&&r   r+   ZScript.toggle_presentation_mode   sK     ~~11-2K2K2M2`2`2bccw/@@r   c               r   r   r4   zAtspi.Eventr   r8   r   r   r   r   r   r      s     
. 
.[ 
.T 
.r   c                s   < V P                   P                  VP                  4      '       d   R# V P                  4       '       d   R# \        SV `  V4      # )z<Callback for object:state-changed:busy accessibility events.T)r   r>   sourceZin_focus_moder$   on_busy_changedr&   r4   r'   r(   r   rM   ZScript.on_busy_changed   sC     >>--ell;;w&u--r   c               r   rK   r   r   r   r   r   r      s     
- 
-K 
-D 
-r   c                sB  < V P                   P                  VP                  4      '       df   VP                  R8X  d   R# V P                  P                  VP                  VP                  4       V P                  P                  4       '       d   R# \        SV `!  V4      # )z:Callback for object:text-caret-moved accessibility events.Ti)	r   r>   rL   Zdetail1r   set_document_position	is_activer$   on_caret_movedrN   r(   r   rQ   ZScript.on_caret_moved   so     >>--ell;;}}"OO11%,,N((**w%e,,r   c               r   rK   r   r   r   r   r   r           . .[ .T .r   c                s   < \         P                  ! VP                  4      V P                  P	                  4       8X  d   V P                  P                  4        R# \        SV `  V4      # )z;Callback for object:property-change:accessible-name events.T)r   Zget_namerL   r   Zget_misspelled_wordpresent_error_detailsr$   on_name_changedrN   r(   r   rT   ZScript.on_name_changed   sL     U\\*doo.Q.Q.SSOO113w&u--r   c               r   rK   r   r   r   r   r   r      s     3 3+ 3$ 3r   c                s,  < VP                   V P                  P                  4       8X  d   R# \        P                  ! VP                   4      p\
        P                  ! V4      '       d   \
        P                  ! V4      '       g   R# \        SV `%  V4      # )z?Callback for object:state-changed:showing accessibility events.T)
rL   r   Zget_suggestions_listr   
get_parentr
   Zis_combo_boxZ
is_focusedr$   on_selection_changedr&   r4   Zparentr'      && r   rV   ZScript.on_selection_changed   si     <<4????AA$$U\\2##F++K4J4J64R4Rw+E22r   c               r   rK   r   r   r   r   r   r      s     3 3+ 3$ 3r   c                s   < VP                   V P                  P                  4       8X  d#   V P                  P                  4       '       d   R# \        SV `  V4      # )zACallback for object:state-changed:sensitive accessibility events.T)rL   r   get_change_to_entryZpresent_completion_messager$   on_sensitive_changedrN   r(   r   rZ   ZScript.on_sensitive_changed   sD     <<4??>>@@99;;w+E22r   c               r   rK   r   r   r   r   r   r      rR   r   c                s   < \         P                  ! VP                  4      '       d=   \         P                  ! \        P
                  ! VP                  4      4      '       d   R# \        SV `  V4      # )z=Callback for object:text-changed:delete accessibility events.T)r
   is_labelrL   is_status_barr   rU   r$   on_text_deletedrN   r(   r   r]   ZScript.on_text_deleted   sM     --(()<)<U\\)JKKw&u--r   c               r   rK   r   r   r   r   r   r      s     / /k /d /r   c                s  < \         P                  ! VP                  4      p\        P                  ! VP                  4      '       d   \        P
                  ! V4      '       d   R# \        VP                  4      ^8  d,   VP                  V P                  P                  4       8X  d   R# VP                  P                  R4      '       d.   V P                  P                  VP                  4      '       d   R# \        SV `=  V4      # )z=Callback for object:text-changed:insert accessibility events.TZsystem)r   rU   rL   r
   r[   r\   r2   Zany_datar   rY   ZtypeZendswithr   r>   r$   on_text_insertedrW   rX   r   r^   ZScript.on_text_inserted   s     $$U\\2--+2K2KF2S2Su~~"u||t7Z7Z7\'\ ::x((T^^-O-OPUP\P\-]-]w'..r   c               r   rK   r   r   r   r   r   r     s     8 8{ 8t 8r   c                s  < VP                   V P                  P                  4       8X  d   R# \        P                  ! V4      pV P
                  P                  VP                   4      '       dp   V P                  P                  4       '       dP   \        P                  ! VP                   4      pV^ 8  d'   V P                  P                  VP                   V4       R# \        SV `1  V4      # )z@Callback for object:text-selection-changed accessibility events.T)rL   r   rY   r
   Zget_text_event_reasonr   r>   rP   r	   Zget_selection_start_offsetrO   r$   on_text_selection_changed)r&   r4   Z_reasonZselection_startr'   s   &&  r   r_   Z Script.on_text_selection_changed  s     <<4??>>@@33E:>>--ell;;@Y@Y@[@[$??MO!#55ellOTw077r   c               r   rK   r   r   r   r   r   r     s        r   c                s  < \         SV `  V4       V P                  P                  VP                  4      '       g   V P                  P                  4        R# V P                  P                  4        V P                  P                  4       p\        P                  ! 4       P                  RVR4       V P                  V4       R# )z2Callback for window:activate accessibility events.TNF)r$   on_window_activatedr   Zis_spell_check_windowrL   
deactivaterS   rY   r   r"   Zset_locus_of_focusr:   )r&   r4   Zentryr'   rX   r   r`   ZScript.on_window_activated  s     	#E*44U\\BBOO&&(--/335!!#66tUEJE"r   c               r   rK   r   r   r   r   r   r   )  s     4 4; 44 4r   c                s   < V P                   P                  4        V P                  P                  4        \        SV `  V4      # )z4Callback for window:deactivate accessibility events.)r   ra   r   Zclear_content_cacher$   on_window_deactivatedrN   r(   r   rb   ZScript.on_window_deactivated)  s5     	""$**,w,U33r   r   )N)NF)NNT)Z__name__Z
__module__Z__qualname__Z__firstlineno____doc__Z__annotations__r%   r*   r.   r/   r3   r;   r?   r-   r,   r+   rM   rQ   rT   rV   rZ   r]   r^   r_   r`   rb   Z__static_attributes__Z__classcell__)r'   s   @r   r   r   6   s    %  1 1( 
 &
 
K K 5 5G GF F
A 
A
. 
.
- 
-. .3 33 3. ./ /"8 8 4 4r   r   )"rc   Z
__future__r    Z__id__Z__version__Z__date__Z__copyright__Z__license__Ztypingr   Zorcar   r   r   r   r   Zorca.scripts.toolkitsr   Zorca.ax_objectr   Zorca.ax_textr	   Zorca.ax_utilitiesr
   r   r   ZgiZrequire_versionZgi.repositoryr   r   Z,orca.scripts.toolkits.Gecko.script_utilitiesr   r   r   r   r   <module>rd      s   , % "?       ! ' #  ) "w&ue$(Fx4U\\ x4r   