+
    Qi?  c                   s
  a  R t0 t R tRtRtRtRtRt^ RI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 R]	4      t ! R R]	4      t ! R R]	4      t ! R R4      t]! 4       t] ^ k R R ltR# )&Provides braille presentation support.z$Id$z
$Revision$z$Date$zQCopyright (c) 2005-2008 Sun Microsystems Inc.Copyright (c) 2011-2025 Igalia, S.L.ZLGPLN)Enum)braille)dbus_service)debug)input_event_manager)settings)settings_manager)	tablesdirc                   sp   a  ] tR t^+t o Rt]P                  t]P                  t	]
V 3R lR l4       tRtV tR# )VerbosityLevelz:Verbosity level enumeration with int values from settings.c                    < V ^8  d   QhRS[ /#    returnstrformat__classdict__   ";/usr/lib/python3.14/site-packages/orca/braille_presenter.py__annotate__ZVerbosityLevel.__annotate__2        ! !S !    c                6    V P                   P                  4       # z6Returns the lowercase string name for this enum value.ZnameZlowerself   &r   string_nameZVerbosityLevel.string_name1        yy  r    N)__name__
__module____qualname____firstlineno____doc__r   ZVERBOSITY_LEVEL_BRIEFZBRIEFVERBOSITY_LEVEL_VERBOSEZVERBOSEpropertyr   __static_attributes____classdictcell__r      @r   r	   r	   +   s0     D**E..G! !r   r	   c                   sp   a  ] tR t^7t o Rt]P                  t]P                  t	]
V 3R lR l4       tRtV tR# )RolenameStylez9Rolename style enumeration with int values from settings.c                r
   r   r   r   r   r   r   ZRolenameStyle.__annotate__>   r   r   c                r   r   r   r   r   r   r   ZRolenameStyle.string_name=   r   r   r    N)r!   r"   r#   r$   r%   r   ZBRAILLE_ROLENAME_STYLE_SHORTZSHORTZBRAILLE_ROLENAME_STYLE_LONGZLONGr'   r   r(   r)   r*   r+   r   r,   r,   7   s0     C11E//D! !r   r,   c                   s   a  ] tR t^Ct o Rt]P                  t]P                  t	]P                  t]P                  t]V 3R lR l4       tRtV tR# )BrailleIndicatorz<Braille indicator enumeration with int values from settings.c                r
   r   r   r   r   r   r   ZBrailleIndicator.__annotate__L   r   r   c                r   r   r   r   r   r   r   ZBrailleIndicator.string_nameK   r   r   r    N)r!   r"   r#   r$   r%   r   ZBRAILLE_UNDERLINE_NONEZNONEZBRAILLE_UNDERLINE_7ZDOT7ZBRAILLE_UNDERLINE_8ZDOT8ZBRAILLE_UNDERLINE_BOTHZDOTS78r'   r   r(   r)   r*   r+   r   r-   r-   C   sF     F**D''D''D,,F! !r   r-   c                   sN  a  ] tR t^Qt o RtV 3R lR ltV 3R lR lt]P                  V 3R lR l4       t	]P                  V 3R lR	 l4       tV 3R
 lR lt]P                  V 3R lR l4       t]P                  V 3R lR l4       tV 3R lR lt]P                  V 3R lR l4       t]P                  V 3R lR l4       t]P                  V 3R lR l4       t]P                  V 3R lR l4       t]P                  V 3R lR l4       t]P                  V 3R lR l4       t]P                  V 3R lR l4       t]P                  V 3R  lR! l4       t]P                  V 3R" lR# l4       t]P                  V 3R$ lR% l4       t]P                  V 3R& lR' l4       t]P                  V 3R( lR) l4       t]P                  V 3R* lR+ l4       t]P                  V 3R, lR- l4       t]P                  V 3R. lR/ l4       tV 3R0 lR1 lt]P                  V 3R2 lR3 l4       t ]P                  V 3R4 lR5 l4       t!]P                  V 3R6 lR7 l4       t"]P                  V 3R8 lR9 l4       t#]P                  V 3R: lR; l4       t$]P                  V 3R< lR= l4       t%]P                  V 3R> lR? l4       t&]P                  V 3R@ lRA l4       t']P                  V 3RB lRC l4       t(]P                  V 3RD lRE l4       t)]P                  V 3RF lRG l4       t*]P                  V 3RH lRI l4       t+RJt,V t-RK# )LBraillePresenterr    c                s   < V ^8  d   QhRR/# )r   r   Nr    r   r   r   r   BraillePresenter.__annotate__T   s     G G$ Gr   c                s    R p\         P                  ! \         P                  VR4       \        P                  ! 4       pVP                  RV 4       R# )z.BRAILLE PRESENTER: Registering D-Bus commands.Tr.   N)r   print_message
LEVEL_INFOr   Zget_remote_controllerZregister_decorated_module)r   msgZ
controller   &  r   __init__ZBraillePresenter.__init__T   s>    >E,,c48!779
,,-?Fr   c                r
   r   boolr   r   r   r   r/   Z   s      T r   c                s    \         P                  ! 4       pVP                  R4      ;'       g    VP                  R4      pV'       g)   Rp\        P                  ! \        P
                  VR4       V# )z&Returns whether braille is to be used.enableBrailleZenableBrailleMonitorz'BRAILLE PRESENTER: Braille is disabled.T)r   get_managerget_settingr   r0   r1   )r   ZmanagerZresultr2   s   &   r   use_brailleZBraillePresenter.use_brailleZ   s[     #..0$$_5dd9L9LMc9d;C 0 0#t<r   c                r
   r   r5   r   r   r   r   r/   e   s     K K Kr   c                J    \         P                  ! 4       P                  R4      # )z#Returns whether braille is enabled.r7   r   r8   r9   r   r   r   get_braille_is_enabledZ'BraillePresenter.get_braille_is_enabledd   s      ++-99/JJr   c                &   < V ^8  d   QhRS[ RS[ /# r   valuer   r5   r   r   r   r   r/   k   s      D T r   c                sL   RV R2p\         P                  ! \         P                  VR4       \        P                  ! 4       P                  RV4       V'       d6   \        P                  ! \        P                  ! 4       P                  4       R# \        P                  ! 4        R# )z Sets whether braille is enabled.z-BRAILLE PRESENTER: Setting enable braille to .Tr7   )r   r0   r1   r   r8   set_settingr   Zinitr   Zprocess_braille_eventZshutdownr   r@   r2      && r   set_braille_is_enabledZ'BraillePresenter.set_braille_is_enabledj   sx     >eWAFE,,c48$$&22?EJLL,88:PPQ  r   c                r
   r   r5   r   r   r   r   r/   y   s     9 9T 9r   c                p    \         P                  ! 4       P                  R4      pV\        P                  8H  # )z>Returns whether the braille verbosity level is set to verbose.brailleVerbosityLevelr   r8   r9   r   r&   r   level   & r   use_verbose_brailleZ$BraillePresenter.use_verbose_brailley   s/     !,,.::;RS8888r   c                r
   r   r   r   r   r   r   r/      s     5 5S 5r   c                t    \         P                  ! 4       P                  R4      p\        V4      P                  # )zDReturns the current braille verbosity level for object presentation.rG   )r   r8   r9   r	   r   r   Z	int_valuerK   r   get_verbosity_levelZ$BraillePresenter.get_verbosity_level   s/     %002>>?VW	i(444r   c                &   < V ^8  d   QhRS[ RS[/# r?   r   r6   r   r   r   r   r/      s        r   c                n    \         VP                  4       ,          pRT R2p\        P                  ! \        P                  TR4       \        P                  ! 4       P                  RTP                  4       R#   \         d0    RT 2p\        P                  ! \        P
                  TR4        R# i ; i)z9Sets the braille verbosity level for object presentation.z,BRAILLE PRESENTER: Invalid verbosity level: TFz.BRAILLE PRESENTER: Setting verbosity level to rA   rG   )r	   upperKeyErrorr   r0   LEVEL_WARNINGr1   r   r8   rB   r@   )r   r@   rJ   r2      &&  r   set_verbosity_levelZ$BraillePresenter.set_verbosity_level   s    	"5;;=1E ?ugQGE,,c48$$&223JEKKX  	@HC 3 3S$?	   A: :6B43B4c                r
   r   r5   r   r   r   r   r/      s     9 9D 9r   c                rF   )z.Returns whether full rolenames should be used.brailleRolenameStylerH   rI   rK   r   use_full_rolenamesZ#BraillePresenter.use_full_rolenames   s/     !,,.::;QR8888r   c                r
   r   r   r   r   r   r   r/      s     4 4C 4r   c                rM   )z;Returns the current rolename style for object presentation.rY   )r   r8   r9   r,   r   rN   rK   r   get_rolename_styleZ#BraillePresenter.get_rolename_style   s/     %002>>?UV	Y'333r   c                rP   r?   rQ   r   r   r   r   r/              r   c                rR   )z8Sets the current rolename style for object presentation.z+BRAILLE PRESENTER: Invalid rolename style: TFz-BRAILLE PRESENTER: Setting rolename style to rA   rY   )r,   rS   rT   r   r0   rU   r1   r   r8   rB   r@   )r   r@   Zstyler2   rV   r   set_rolename_styleZ#BraillePresenter.set_rolename_style   s    	!%++-0E >eWAFE,,c48$$&223I5;;W  	?wGC 3 3S$?	rX   c                r
   r   r5   r   r   r   r   r/      s     R Rt Rr   c                r;   )zBReturns whether ancestors of the current object will be displayed.enableBrailleContextr<   r   r   r   get_display_ancestorsZ&BraillePresenter.get_display_ancestors   s      ++-99:PQQr   c                r>   r?   r5   r   r   r   r   r/      s      4 D r   c                    RV R2p\         P                  ! \         P                  VR4       \        P                  ! 4       P                  RV4       R# )z?Sets whether ancestors of the current object will be displayed.z5BRAILLE PRESENTER: Setting enable braille context to rA   Tr^   r   r0   r1   r   r8   rB   rC   rD   r   set_display_ancestorsZ&BraillePresenter.set_display_ancestors   sH     FeWANE,,c48$$&223I5Qr   c                r
   r   r5   r   r   r   r   r/      s     U U4 Ur   c                r;   )z.Returns whether contracted braille is enabled.enableContractedBrailler<   r   r   r   !get_contracted_braille_is_enabledZ2BraillePresenter.get_contracted_braille_is_enabled   s      ++-99:STTr   c                r>   r?   r5   r   r   r   r   r/            t  r   c                r`   )z+Sets whether contracted braille is enabled.z8BRAILLE PRESENTER: Setting enable contracted braille to rA   Trc   ra   rC   rD   r   !set_contracted_braille_is_enabledZ2BraillePresenter.set_contracted_braille_is_enabled   sH     IqQE,,c48$$&223LeTr   c                r
   r   r   r   r   r   r   r/      s     @ @s @r   c                s    \         P                  ! 4       P                  R4      pV'       g   R# \        P                  P                  \        P                  P                  V4      4      ^ ,          # )z3Returns the current braille contraction table name.brailleContractionTable )r   r8   r9   ospathsplitextZbasename)r   	full_pathrK   r   get_contraction_tableZ&BraillePresenter.get_contraction_table   sM     %002>>?XY	ww 0 0 ;<Q??r   c                s0   < V ^8  d   QhRS[ S[,          /# r   )Zlistr   r   r   r   r   r/      s     K K$s) Kr   c                s    \         P                  ! 4       pV Uu. uF)  p\        P                  P	                  V4      ^ ,          NK+  	  up# u upi )z4Returns a list of available contraction table names.)r   get_table_filesri   rj   rk   )r   table_filesfilenamer3   r    get_available_contraction_tablesZ1BraillePresenter.get_available_contraction_tables   sA     --/>IJk(  *1--kJJJs   /Ac                rP   r?   rQ   r   r   r   r   r/      s      3 4 r   c                s*   \         P                  ! 4       p\        P                  P	                  V4      ^ ,          pRpV F%  pVP                  VR,           4      '       g   K#  Tp M	  V'       g.   RV 2p\        P                  ! \        P                  VR4       R# \        P                  P                  \        V4      pRV R2p\        P                  ! \        P                  VR4       \        P                  ! 4       P                  RV4       R# )z+Sets the current braille contraction table.NrA   z.BRAILLE PRESENTER: Invalid contraction table: TFz0BRAILLE PRESENTER: Setting contraction table to rg   )r   rn   ri   rj   rk   Z
startswithr   r0   rU   Zjoinr   r1   r   r8   rB   )r   r@   ro   Z	base_namerp   Z
table_filer2   rl   s   &&      r   set_contraction_tableZ&BraillePresenter.set_contraction_table   s     --/GG$$U+A.	%J$$Y_55% &
 B5'JC 3 3S$?GGLLH5	@qIE,,c48$$&223LiXr   c                r
   r   r5   r   r   r   r   r/      s     S Sd Sr   c                sT    \         P                  ! 4       P                  R4      '       * # )z5Returns whether the end-of-line indicator is enabled.disableBrailleEOLr<   r   r   r   $get_end_of_line_indicator_is_enabledZ5BraillePresenter.get_end_of_line_indicator_is_enabled   s"    
 $//1==>QRRRr   c                r>   r?   r5   r   r   r   r   r/      s      $ 4 r   c                s    V'       * pRV R2p\         P                  ! \         P                  VR4       \        P                  ! 4       P                  RV4       R# )z2Sets whether the end-of-line indicator is enabled.z*BRAILLE PRESENTER: Setting disable-eol to rA   Trs   ra   rC   rD   r   $set_end_of_line_indicator_is_enabledZ5BraillePresenter.set_end_of_line_indicator_is_enabled   sN    
 	:5'CE,,c48$$&223FNr   c                r
   r   r5   r   r   r   r   r/     s     S S$ Sr   c                r;   )z-Returns whether braille word wrap is enabled.enableBrailleWordWrapr<   r   r   r   get_word_wrap_is_enabledZ)BraillePresenter.get_word_wrap_is_enabled
  s      ++-99:QRRr   c                r>   r?   r5   r   r   r   r   r/     s      d t r   c                r`   )z*Sets whether braille word wrap is enabled.z/BRAILLE PRESENTER: Setting enable word wrap to rA   Trv   ra   rC   rD   r   set_word_wrap_is_enabledZ)BraillePresenter.set_word_wrap_is_enabled  sH     @waHE,,c48$$&223JERr   c                r
   r   r5   r   r   r   r   r/     s     Q Q Qr   c                r;   )zBReturns whether 'flash' messages (i.e. announcements) are enabled.enableFlashMessagesr<   r   r   r   get_flash_messages_are_enabledZ/BraillePresenter.get_flash_messages_are_enabled  s      ++-99:OPPr   c                r>   r?   r5   r   r   r   r   r/      s      D T r   c                r`   )z?Sets whether 'flash' messages (i.e. announcements) are enabled.z4BRAILLE PRESENTER: Setting enable flash messages to rA   Try   ra   rC   rD   r   set_flash_messages_are_enabledZ/BraillePresenter.set_flash_messages_are_enabled  sH     EUG1ME,,c48$$&223H%Pr   c                r
   r   intr   r   r   r   r/   (  s     1 1S 1r   c                sR    V P                  4       '       d   R# V P                  4       # )zFReturns flash message duration in milliseconds based on user settings.i)!get_flash_messages_are_persistentget_flash_message_durationr   r   r   get_flashtime_from_settingsZ,BraillePresenter.get_flashtime_from_settings(  s'     1133I..00r   c                r
   r   r|   r   r   r   r   r/   0  s     N NC Nr   c                r;   )z/Returns flash message duration in milliseconds.brailleFlashTimer<   r   r   r   r   Z+BraillePresenter.get_flash_message_duration/  s      ++-99:LMMr   c                rP   r?   )r}   r6   r   r   r   r   r/   6  s        r   c                r`   )z,Sets flash message duration in milliseconds.z1BRAILLE PRESENTER: Setting braille flash time to rA   Tr   ra   rC   rD   r   set_flash_message_durationZ+BraillePresenter.set_flash_message_duration5  sH     B%JE,,c48$$&223EuMr   c                r
   r   r5   r   r   r   r   r/   ?  s     O O4 Or   c                r;   )zJReturns whether 'flash' messages are persistent (as opposed to temporary).flashIsPersistentr<   r   r   r   r~   Z2BraillePresenter.get_flash_messages_are_persistent>  s      ++-99:MNNr   c                r>   r?   r5   r   r   r   r   r/   E  re   r   c                r`   )zGSets whether 'flash' messages are persistent (as opposed to temporary).z<BRAILLE PRESENTER: Setting flash messages are persistent to rA   Tr   ra   rC   rD   r   !set_flash_messages_are_persistentZ2BraillePresenter.set_flash_messages_are_persistentD  sI     MUGSTUE,,c48$$&223FNr   c                r
   r   r5   r   r   r   r   r/   N  s     M M Mr   c                r;   )zDReturns whether 'flash' messages are detailed (as opposed to brief).flashIsDetailedr<   r   r   r   get_flash_messages_are_detailedZ0BraillePresenter.get_flash_messages_are_detailedM  s      ++-99:KLLr   c                r>   r?   r5   r   r   r   r   r/   T  s      T d r   c                r`   )zASets whether 'flash' messages are detailed (as opposed to brief).z:BRAILLE PRESENTER: Setting flash messages are detailed to rA   Tr   ra   rC   rD   r   set_flash_messages_are_detailedZ0BraillePresenter.set_flash_messages_are_detailedS  sI     K5'QRSE,,c48$$&223DeLr   c                r
   r   r   r   r   r   r   r/   ]  s     7 7 7r   c                rM   )z-Returns the braille selector indicator style.brailleSelectorIndicatorr   r8   r9   r-   r   rN   rK   r   get_selector_indicatorZ'BraillePresenter.get_selector_indicator\  s/     %002>>?YZ		*666r   c                rP   r?   rQ   r   r   r   r   r/   d  s      C D r   c                rR   )z*Sets the braille selector indicator style.z/BRAILLE PRESENTER: Invalid selector indicator: TFz1BRAILLE PRESENTER: Setting selector indicator to rA   r   r-   rS   rT   r   r0   rU   r1   r   r8   rB   r@   r   r@   Z	indicatorr2   rV   r   set_selector_indicatorZ'BraillePresenter.set_selector_indicatorc  s    	(7I B%JE,,c48$$&223My_  	CE7KC 3 3S$?	rX   c                r
   r   r   r   r   r   r   r/   t  s     7 7C 7r   c                rM   )z)Returns the braille link indicator style.brailleLinkIndicatorr   rN   rK   r   get_link_indicatorZ#BraillePresenter.get_link_indicators  s/     %002>>?UV		*666r   c                rP   r?   rQ   r   r   r   r   r/   {  r\   r   c                rR   )z&Sets the braille link indicator style.z+BRAILLE PRESENTER: Invalid link indicator: TFz-BRAILLE PRESENTER: Setting link indicator to rA   r   r   r   rV   r   set_link_indicatorZ#BraillePresenter.set_link_indicatorz  s    	(7I >eWAFE,,c48$$&223I9??[  	?wGC 3 3S$?	rX   c                r
   r   r   r   r   r   r   r/     s     7 7s 7r   c                rM   )z4Returns the braille text attributes indicator style.textAttributesBrailleIndicatorr   rN   rK   r   get_text_attributes_indicatorZ.BraillePresenter.get_text_attributes_indicator  s/     %002>>?_`		*666r   c                rP   r?   rQ   r   r   r   r   r/     s      3 4 r   c                rR   )z1Sets the braille text attributes indicator style.z6BRAILLE PRESENTER: Invalid text attributes indicator: TFz8BRAILLE PRESENTER: Setting text attributes indicator to rA   r   r   r   rV   r   set_text_attributes_indicatorZ.BraillePresenter.set_text_attributes_indicator  s    	(7I IqQE,,c48$$&22,ioo	?  	J5'RC 3 3S$?	rX   r    N).r!   r"   r#   r$   r%   r4   r:   r   Zgetterr=   ZsetterrE   rL   rO   rW   rZ   r[   r]   r_   rb   rd   rf   rm   rq   rr   rt   ru   rw   rx   rz   r{   r   r   r   r~   r   r   r   r   r   r   r   r   r   r(   r)   r*   r+   r   r.   r.   Q   sx    0G G  K K
  9 9 5 5  9 9 4 4   R R
   U U
   @ @ K K  , S S   S S
   Q Q
  1 1 N N
   O O
   M M
   7 7   7 7   7 7  r   r.   c                s$    V ^8  d   QhR\         /# r   )r.   r      "r   r   r     s      ' r   c                 s    \         # )zReturns the Braille Presenter)
_presenterr    r   r   get_presenterr     s
     r   c                s@    V ^8  d   Qh/ ^ \         9   d
   \        ;R&   # )r   r   )__conditional_annotations__r.   r   r   r   r   r      s     , ,X 2 1 1Y -r   )r   r%   Z__id__Z__version__Z__date__Z__copyright__Z__license__ri   Zenumr   rh   r   r   r   r   r   r   Zorca_platformr   r	   r,   r-   r.   r   r   r   )r   r+   r   <module>r      s   . -7 	     !   $
!T 
!
!D 
!!t !O Od
  01
 1r   