+
    Qi4  c                  s   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 ^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 ^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' ]	'       d6   ^ R$I(t(](PR                  ! 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      t0R$# ).a%  Each script maintains a set of key bindings, braille bindings, and
AT-SPI event listeners.  The key bindings are an instance of
KeyBindings.  The braille bindings are also a dictionary where the
keys are BrlTTY command integers and the values are instances of
InputEventHandler.  The listeners field is a dictionary where the keys
are AT-SPI event names and the values are function pointers.

Instances of scripts are intended to be created solely by the
script manager.

This Script class is not intended to be instantiated directly.
Instead, it is expected that subclasses of the Script class will be
created in their own module.  The module defining the Script subclass
is also required to have a 'get_script(app)' method that returns an
instance of the Script subclass.  See default.py for an example.)annotationsz$Id$z
$Revision$z$Date$z-Copyright (c) 2005-2009 Sun Microsystems Inc.ZLGPL)TYPE_CHECKING)ax_event_synthesizer)bypass_mode_manager)action_presenter)braille_generator)caret_navigator)	clipboard)debug)debugging_tools_manager)flat_review_finder)flat_review_presenter)keybindings)learn_mode_presenter)mouse_review)notification_presenter)object_navigator)say_all_presenter)script_utilities)sleep_mode_manager)sound_generator)speech_and_verbosity_manager)speech_generator)structural_navigator)system_information_presenter)table_navigator)typing_echo_presenter)	bookmarks)where_am_i_presenter)AXObjectNAtspiz2.0)r   )chat)label_inference)liveregions)
spellcheckc                  s   ] tR t^ZtRtR R ltR R ltR R ltR R	 ltRXR
 R llt	R R lt
R R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR  R! ltR" R# ltR$ R% ltR& R' ltR( R) ltR* R+ ltR, R- ltR. R/ ltR0 R1 ltR2 R3 ltR4 R5 ltR6 R7 ltR8 R9 lt R: R; lt!R< R= lt"R> R? lt#R@ RA lt$RB RC lt%RD RE lt&RF RG lt'RH RI lt(RYRK RL llt)RM RN lt*RO RP lt+RQ RR lt,RS RT lt-RU RV lt.RWt/RJ# )ZScriptzThe base Script class.c                    V ^8  d   QhRRRR/# )   appzAtspi.AccessiblereturnNone Zformat   "0/usr/lib/python3.14/site-packages/orca/script.py__annotate__Script.__annotate__]   s     !9 !9, !9 !9    c                	s   Wn         \        P                  ! V P                   4      ;'       g    R  RV P                   R2V n        RV n        RV n        / V n        / V n        / V n	        \        P                  ! 4       V n        V P                  4       V n        V P                  4       V n        V P#                  4       V n        V P'                  4       V n        V P+                  4       V n        V P/                  4       V n        V P3                  4       V n        V P7                  4       V n        V P;                  4       V n        V P?                  4       V n         V PC                  4        V PE                  4       V n#        \H        PJ                  PL                  V n'        RV n(        RV P                   R2p\R        PT                  ! \R        PV                  VR4       R# )Zdefaultz	 (module=Z)TNFzSCRIPT: z initialized),r&   r   Zget_name
__module__namepresent_if_inactiverun_find_command_oninput_event_handlerspoint_of_referenceevent_cacher   KeyBindingskey_bindingsget_listeners	listenersget_utilities	utilitiesget_braille_generatorr   get_sound_generatorr   get_speech_generatorr   get_bookmarksr   get_live_region_managerlive_region_managerget_label_inferencer    get_chatr   get_spellcheckr"   setup_input_event_handlersget_braille_bindingsbraille_bindingsr   ZNavigationModeZOFF_default_sn_mode!_default_caret_navigation_enabledr   Zprint_message
LEVEL_INFO)selfr&   Zmsgs   && r,   __init__ZScript.__init__]   s   ((2??i@	$//IZZ[\	)- <@ *,!(*!#'335++-++-!%!;!;!=#779 $ 9 9 ;++- $(#?#?#A #779MMO	--/ 	'') $ 9 9 ; !//33 	7<.<0E,,c48r/   c                   V ^8  d   QhRR/# )r%   r'   strr)   r*   r+   r,   r-   r.      s       r/   c                	s    V P                    # )N)r1   rL      &r,   __str__ZScript.__str__   s    ))r/   c               rN   r%   r'   Zdictr)   r*   r+   r,   r-   r.      s      t r/   c                    / # )z<Returns a dictionary of the event listeners for this script.r)   rP   rQ   r,   r9   ZScript.get_listeners   	     	r/   c               rN   r%   r'   r(   r)   r*   r+   r,   r-   r.      s     @ @D @r/   c                    R# )z1Defines the input event handlers for this script.Nr)   rP   rQ   r,   rF   Z!Script.setup_input_event_handlers       r/   c               r$   )r%   enabled_onlyboolr'   keybindings.KeyBindingsr)   r*   r+   r,   r-   r.      s     ) )T )=T )r/   c                ,    \         P                  ! 4       # )z)Returns the key bindings for this script.r   r7   )rL   rY      &&r,   get_key_bindingsZScript.get_key_bindings        &&((r/   c               rN   )r%   r'   r[   r)   r*   r+   r,   r-   r.      s     ) )&= )r/   c                r\   )z=Returns the application-specific keybindings for this script.r]   rP   rQ   r,   get_app_key_bindingsZScript.get_app_key_bindings   r`   r/   c               rN   rS   r)   r*   r+   r,   r-   r.      s      d r/   c                rT   )z-Returns the braille bindings for this script.r)   rP   rQ   r,   rG   ZScript.get_braille_bindings   rU   r/   c               rN   )r%   r'   z"braille_generator.BrailleGeneratorr)   r*   r+   r,   r-   r.      s     8 8'I 8r/   c                .    \         P                  ! V 4      # )z.Returns the braille generator for this script.)r   ZBrailleGeneratorrP   rQ   r,   r=   ZScript.get_braille_generator   s     !11$77r/   c               rN   )r%   r'   zsound_generator.SoundGeneratorr)   r*   r+   r,   r-   r.      s     4 4%C 4r/   c                rb   )z,Returns the sound generator for this script.)r   ZSoundGeneratorrP   rQ   r,   r>   ZScript.get_sound_generator   s     --d33r/   c               rN   )r%   r'   z speech_generator.SpeechGeneratorr)   r*   r+   r,   r-   r.      s     6 6&F 6r/   c                rb   )z-Returns the speech generator for this script.)r   ZSpeechGeneratorrP   rQ   r,   r?   ZScript.get_speech_generator   s      //55r/   c               rN   )r%   r'   zchat.Chat | Noner)   r*   r+   r,   r-   r.      s      * r/   c                rW   )z)Returns the 'chat' class for this script.Nr)   rP   rQ   r,   rD   ZScript.get_chat        r/   c               rN   )r%   r'   zspellcheck.SpellCheck | Noner)   r*   r+   r,   r-   r.      s       < r/   c                rW   )z/Returns the spellcheck support for this script.Nr)   rP   rQ   r,   rE   ZScript.get_spellcheck   rc   r/   c               rN   )r%   r'   zcaret_navigator.CaretNavigatorr)   r*   r+   r,   r-   r.           / /%C /r/   c                r\   )z,Returns the caret navigator for this script.)r   get_navigatorrP   rQ   r,   get_caret_navigatorZScript.get_caret_navigator        ,,..r/   c               rN   )r%   r'   zclipboard.ClipboardPresenterr)   r*   r+   r,   r-   r.      s     ) ))E )r/   c                r\   )z0Returns the clipboard presenter for this script.)r   get_presenterrP   rQ   r,   get_clipboard_presenterZScript.get_clipboard_presenter   s     &&((r/   c               rN   )r%   r'   z-debugging_tools_manager.DebuggingToolsManagerr)   r*   r+   r,   r-   r.      s     5 5-Z 5r/   c                r\   )z4Returns the debugging tools manager for this script.)r	   get_managerrP   rQ   r,   get_debugging_tools_managerZ"Script.get_debugging_tools_manager   s     '2244r/   c               rN   )r%   r'   zscript_utilities.Utilitiesr)   r*   r+   r,   r-   r.      s     0 09 0r/   c                rb   )z&Returns the utilities for this script.)r   Z	UtilitiesrP   rQ   r,   r;   ZScript.get_utilities   s      ))$//r/   c               rN   )r%   r'   z%label_inference.LabelInference | Noner)   r*   r+   r,   r-   r.      s      %J r/   c                rW   )z:Returns the label inference functionality for this script.Nr)   rP   rQ   r,   rC   ZScript.get_label_inference   rc   r/   c               rN   )r%   r'   z!say_all_presenter.SayAllPresenterr)   r*   r+   r,   r-   r.      s     1 1'H 1r/   c                r\   )z0Returns the 'say all' presenter for this script.)r   rh   rP   rQ   r,   get_say_all_presenterZScript.get_say_all_presenter   s     !..00r/   c               rN   )r%   r'   z(structural_navigator.StructuralNavigatorr)   r*   r+   r,   r-   r.      s     4 4*R 4r/   c                r\   )z9Returns the 'structural navigator' class for this script.)r   re   rP   rQ   r,   get_structural_navigatorZScript.get_structural_navigator        $1133r/   c               rN   )r%   r'   z)typing_echo_presenter.TypingEchoPresenterr)   r*   r+   r,   r-   r.           5 5+T 5r/   c                r\   )z4Returns the 'typing echo' presenter for this script.)r   rh   rP   rQ   r,   get_typing_echo_presenterZ Script.get_typing_echo_presenter        %2244r/   c               rN   )r%   r'   z$liveregions.LiveRegionManager | Noner)   r*   r+   r,   r-   r.      s      )M r/   c                rW   )z0Returns the live region manager for this script.Nr)   rP   rQ   r,   rA   ZScript.get_live_region_manager   rc   r/   c               rN   )r%   r'   z,notification_presenter.NotificationPresenterr)   r*   r+   r,   r-   r.      s     6 6,X 6r/   c                r\   )z3Returns the notification presenter for this script.)r   rh   rP   rQ   r,   get_notification_presenterZ!Script.get_notification_presenter   s     &3355r/   c               rN   )r%   r'   z#flat_review_finder.FlatReviewFinderr)   r*   r+   r,   r-   r.      s     / /(K /r/   c                r\   )z/Returns the flat review finder for this script.)r
   Z
get_finderrP   rQ   r,   get_flat_review_finderZScript.get_flat_review_finder   s     ",,..r/   c               rN   )r%   r'   z)flat_review_presenter.FlatReviewPresenterr)   r*   r+   r,   r-   r.      ro   r/   c                r\   )z2Returns the flat review presenter for this script.)r   rh   rP   rQ   r,   get_flat_review_presenterZ Script.get_flat_review_presenter   rq   r/   c               rN   )r%   r'   z7system_information_presenter.SystemInformationPresenterr)   r*   r+   r,   r-   r.      s     < <	@<r/   c                r\   )z9Returns the system information presenter for this script.)r   rh   rP   rQ   r,    get_system_information_presenterZ'Script.get_system_information_presenter   s    
 ,99;;r/   c               rN   )r%   r'   z object_navigator.ObjectNavigatorr)   r*   r+   r,   r-   r.           0 0&F 0r/   c                r\   )z-Returns the object navigator for this script.)r   re   rP   rQ   r,   get_object_navigatorZScript.get_object_navigator         --//r/   c               rN   )r%   r'   ztable_navigator.TableNavigatorr)   r*   r+   r,   r-   r.      rd   r/   c                r\   )z,Returns the table navigator for this script.)r   re   rP   rQ   r,   get_table_navigatorZScript.get_table_navigator   rg   r/   c               rN   )r%   r'   z6speech_and_verbosity_manager.SpeechAndVerbosityManagerr)   r*   r+   r,   r-   r.      s     : :	?:r/   c                r\   )z9Returns the speech and verbosity manager for this script.)r   rj   rP   rQ   r,    get_speech_and_verbosity_managerZ'Script.get_speech_and_verbosity_manager   s    
 ,7799r/   c               rN   )r%   r'   z%bypass_mode_manager.BypassModeManagerr)   r*   r+   r,   r-   r.     s     1 1)N 1r/   c                r\   )z0Returns the bypass mode manager for this script.)r   rj   rP   rQ   r,   get_bypass_mode_managerZScript.get_bypass_mode_manager  s     #..00r/   c               rN   )r%   r'   z&where_am_i_presenter.WhereAmIPresenterr)   r*   r+   r,   r-   r.     s     4 4*P 4r/   c                r\   )z1Returns the where-am-I presenter for this script.)r   rh   rP   rQ   r,   get_where_am_i_presenterZScript.get_where_am_i_presenter  rn   r/   c               rN   )r%   r'   z'learn_mode_presenter.LearnModePresenterr)   r*   r+   r,   r-   r.     s     4 4*Q 4r/   c                r\   )z1Returns the learn-mode presenter for this script.)r   rh   rP   rQ   r,   get_learn_mode_presenterZScript.get_learn_mode_presenter  rn   r/   c               rN   )r%   r'   z action_presenter.ActionPresenterr)   r*   r+   r,   r-   r.     rv   r/   c                r\   )z-Returns the action presenter for this script.)r   rh   rP   rQ   r,   get_action_presenterZScript.get_action_presenter  rx   r/   c               rN   )r%   r'   z#sleep_mode_manager.SleepModeManagerr)   r*   r+   r,   r-   r.     s     0 0(K 0r/   c                r\   )z/Returns the sleep mode manager for this script.)r   rj   rP   rQ   r,   get_sleep_mode_managerZScript.get_sleep_mode_manager  s     "--//r/   c               rN   )r%   r'   zmouse_review.MouseReviewerr)   r*   r+   r,   r-   r.      s     + +$> +r/   c                r\   )z+Returns the mouse reviewer for this script.)r   Zget_reviewerrP   rQ   r,   get_mouse_reviewerZScript.get_mouse_reviewer   s     ((**r/   c               rN   )r%   r'   z'ax_event_synthesizer.AXEventSynthesizerr)   r*   r+   r,   r-   r.   %  s     6 6'N 6r/   c                r\   )z.Returns the event synthesizer for this script.)r   Zget_synthesizerrP   rQ   r,   get_event_synthesizerZScript.get_event_synthesizer%  s     $3355r/   c               rN   )r%   r'   zbookmarks.Bookmarksr)   r*   r+   r,   r-   r.   *  s     " "2 "r/   c                s     V P                   #   \         d+    \         P                  ! T 4      T n         T P                   u # i ; i)z.Returns the bookmarks support for this script.)r   ZAttributeErrorZ	BookmarksrP   rQ   r,   r@   ZScript.get_bookmarks*  s<    	">>! 	"&006DN>>!	"s    2AANc               (    V ^8  d   QhRRRRRRRR/# )r%   
event_typerO   detail1z
int | Nonedetail2r'   Atspi.Event | Noner)   r*   r+   r,   r-   r.   4  s2     ! !! ! 	! 
!r/   c                	s   V P                   P                  VR ^ .4      ^ ,          pV'       g-   RV.p\        P                  ! \        P                  VR4       R # Ve[   W%P
                  8w  dK   R\        VP
                  4      R\        V4      .p\        P                  ! \        P                  VR4       R # Ve[   W5P                  8w  dK   R\        VP                  4      R\        V4      .p\        P                  ! \        P                  VR4       R # VeI   WEP                  8w  d9   RVP                  RV.p\        P                  ! \        P                  VR4       R # RV.p\        P                  ! \        P                  VR4       V# )NzSCRIPT: No queued event of typeTz SCRIPT: Queued event's detail1 (z) doesn't matchz SCRIPT: Queued event's detail2 (z!SCRIPT: Queued event's any_data (z$SCRIPT: Found matching queued event:)	r6   Zgetr   Zprint_tokensrK   r   rO   r   any_data)rL   r   r   r   r   Zcached_eventZtokenss   &&&&&  r,   _get_queued_eventZScript._get_queued_event4  sR    ''++Jq	B1E7DFu//>7.B.B#B8#l>R>R:S'W7Fu//>7.B.B#B8#l>R>R:S'W7Fu//>H0E0E$E9"++->JFu//>8,G5++VT:r/   c               r   )r%   eventr   	old_focuszAtspi.Accessible | None	new_focusr'   rZ   r)   r*   r+   r,   r-   r.   W  s2      ! + +	
 
r/   c                rW   )zVHandles changes of focus of interest. Returns True if this script did all needed work.Tr)   )rL   r   r   r   s   &&&&r,   locus_of_focus_changedZScript.locus_of_focus_changedW  s     r/   c               r$   r%   r   zAtspi.Eventr'   rZ   r)   r*   r+   r,   r-   r.   a  s      + $ r/   c                rW   )z@Returns True if event should cause this script to become active.Tr)   rL   r   r^   r,   is_activatable_eventZScript.is_activatable_eventa  rc   r/   c               r$   r   r)   r*   r+   r,   r-   r.   f  s      [ T r/   c                rW   )z8Allows scripts to insist that they should become active.Fr)   r   r^   r,   force_script_activationZScript.force_script_activationf  s     r/   c               rN   rV   r)   r*   r+   r,   r-   r.   k  s     4 4$ 4r/   c                rW   )z%Called when this script is activated.Nr)   rP   rQ   r,   activateZScript.activatek  rX   r/   c               rN   rV   r)   r*   r+   r,   r-   r.   n  s     6 6D 6r/   c                rW   )z'Called when this script is deactivated.Nr)   rP   rQ   r,   
deactivateZScript.deactivaten  rX   r/   )rJ   rI   r&   r   rH   r   r   r6   r4   r8   r    r:   rB   r1   r5   r2   r3   r   r   r"   r<   )T)NNN)0Z__name__r0   Z__qualname__Z__firstlineno____doc__rM   rR   r9   rF   r_   ra   rG   r=   r>   r?   rD   rE   rf   ri   rk   r;   rC   rl   rm   rp   rA   rr   rs   rt   ru   rw   ry   rz   r{   r|   r}   r~   r   r   r   r@   r   r   r   r   r   r   Z__static_attributes__r)   r/   r,   r#   r#   Z   s     !9F
@)
)

8
4
6


/
)
5
0

1
4
5

6
/
5
<0
/
:1
4
4
0
0
+
6
"!F

46 6r/   r#   )1r   Z
__future__r    Z__id__Z__version__Z__date__Z__copyright__Z__license__Ztypingr   Z r   r   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Z	ax_objectr   ZgiZrequire_versionZgi.repositoryr   r   r    r!   r"   r#   r)   r/   r,   <module>r      s   0D" #?   " !      %   #  "  $       *  " *  #  " w&#!U6 U6r/   