%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/orca/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/orca/__pycache__/sleep_mode_manager.cpython-312.pyc

�

g
f���dZdZdZdZdZdZddlmZddlmZdd	lm	Z	dd
lm
Z
ddlmZddlmZdd
l
mZGd�d�Ze�Zd�Zy)zModule for sleep modez$Id$z
$Revision$z$Date$zCopyright (c) 2024 Igalia, S.L.�LGPL�)�cmdnames)�debug)�input_event)�keybindings)�messages)�script_manager)�AXObjectc�@�eZdZdZd�Zd
d�Zdd�Zd�Zd�Zd�Z	dd	�Z
y)
�SleepModeManagerz#Provides sleep mode implementation.c�p�|jd�|_tj�|_g|_y)NT)�get_handlers�	_handlersr�KeyBindings�	_bindings�_apps)�selfs �9/usr/lib/python3/dist-packages/orca/sleep_mode_manager.py�__init__zSleepModeManager.__init__)s+���*�*�4�0���$�0�0�2�����
�c��|rCd}tjtj|d�|j�|jS|jj�r|j�|jS)z+Returns the sleep-mode-manager keybindings.z(SLEEP MODE MANAGER: Refreshing bindings.T)r�printMessage�
LEVEL_INFO�_setup_bindingsr�isEmpty)r�refresh�
is_desktop�msgs    r�get_bindingszSleepModeManager.get_bindings.sd���<�C����u�/�/��d�;�� � �"��~�~���^�^�
#�
#�
%�� � �"��~�~�rc��|r7d}tjtj|d�|j�|jS)z(Returns the sleep-mode-manager handlers.z(SLEEP MODE MANAGER: Refreshing handlers.T)rrr�_setup_handlersr)rrrs   rrzSleepModeManager.get_handlers:s:���<�C����u�/�/��d�;�� � �"��~�~�rc��|xrt|�|jv}|r)d|g}tjtj|d�|S)z-Returns True if sleep mode is active for app.z!SLEEP MODE MANAGER: Is active forT)�hashrr�printTokensr)r�app�result�tokenss    r�is_active_for_appz"SleepModeManager.is_active_for_appDsE���0��c��d�j�j�0���9�3�?�F����e�.�.���=��
rc���i|_tj|jtj
�|jd<d}t
jtj|d�y)z@Sets up and returns the sleep-mode-manager input event handlers.�toggle_sleep_modez$SLEEP MODE MANAGER: Handlers set up.TN)	rr�InputEventHandlerr*r�TOGGLE_SLEEP_MODErrr�rrs  rr!z SleepModeManager._setup_handlersMs[�����
�)�)��&�&��*�*�
,�	
���*�+�
5��
���5�+�+�S�$�7rc
�P�tj�|_|jjtjdtj
tj|jjd���d}tjtj|d�y)z8Sets up and returns the sleep-mode-manager key bindings.�qr*z$SLEEP MODE MANAGER: Bindings set up.TN)rrr�add�
KeyBinding�defaultModifierMask�SHIFT_ALT_CTRL_MODIFIER_MASKr�getrrrr-s  rrz SleepModeManager._setup_bindingsZs{��%�0�0�2���������"�"���/�/��8�8����"�"�#6�7�	
9�	:�5��
���5�+�+�S�$�7rNc��|r|jsytj�}|j|j�r�|jjt
|j��|j|j�}|jtjtj|j�z�|j|d�y|j�|jtjtj|j�z�|j|j!|j�d�|jj#t
|j��y)zToggles sleep mode.TzSleep mode toggled offzSleep mode toggled on)r%r	�
getManagerr(r�remover#�	getScript�presentMessager�SLEEP_MODE_DISABLED_FORr
�get_name�setActiveScript�clearBraille�SLEEP_MODE_ENABLED_FOR�getOrCreateSleepModeScript�append)r�script�event�_script_manager�
new_scripts     rr*z"SleepModeManager.toggle_sleep_modeis���6�:�:��(�3�3�5���!�!�&�*�*�-��J�J���d�6�:�:�.�/�(�2�2�6�:�:�>�J��%�%��0�0�8�3D�3D�V�Z�Z�3P�P�
R��+�+�J�8P�Q���������h�=�=��@Q�@Q�RX�R\�R\�@]�]�^��'�'��(R�(R�SY�S]�S]�(^�(?�	A��
�
���$�v�z�z�*�+�r)FT)F�N)�__name__�
__module__�__qualname__�__doc__rrrr(r!rr*�rrrr&s(��-��

���8�
8�rrc��tSrE)�_managerrJrrr6r6�s���OrN)rI�__id__�__version__�__date__�
__copyright__�__license__�rrrrrr	�	ax_objectr
rrLr6rJrr�<module>rTsT��*�������1�
����������W�W�t���r

Zerion Mini Shell 1.0