| Server IP : 39.108.156.168 / Your IP : 216.73.216.104 Web Server : nginx/1.24.0 System : Linux e2.ksyuki.com 6.11.0-25-generic #25~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 15 17:20:50 UTC 2 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/orca/scripts/toolkits/Gecko/__pycache__/ |
Upload File : |
�
g
f�% � �� � d Z dZdZdZdZdZddlZ ej dd � ddlZddl Z dd
l
mZ ddl
mZ ddl
m
Z
dd
lmZ ddlmZ ddlmZ ddlmZ G d� dej, � Zy)z�Commonly-required utility methods needed by -- and potentially
customized by -- application and toolkit scripts. They have
been pulled out from the scripts because certain scripts had
gotten way too large as a result of including these methods.z$Id$z
$Revision$z$Date$zGCopyright (c) 2010 Joanmarie Diggs.Copyright (c) 2014-2015 Igalia, S.L.�LGPL� N�Atspiz2.0)�debug)�
focus_manager)�
orca_state)�web)�
AXDocument)�AXObject)�AXUtilitiesc � � � e Zd Z� fd�Z� fd�Z d� fd� Zd� fd� Zd� Zd� Z� fd�Z d� Z
d � Zdd
�Zdd�Z
� fd�Z� fd
�Zd� fd� Z� xZS )� Utilitiesc �N �� t �| � |� d | _ d | _ d| _ y )Nr )�super�__init__�_lastAutoTextObjectEvent�_lastAutoTextInputEvent�_lastAutoTextEventTime)�self�script� __class__s ��N/usr/lib/python3/dist-packages/orca/scripts/toolkits/Gecko/script_utilities.pyr zUtilities.__init__2 s( �� �
���� �(,��%�'+��$�&'��#� c �� �� t �| � |� ryt j |� r>t j
|� r)t j t j |d� � S y)NTr F)r �isLayoutOnlyr �is_tool_barr
�get_child_count�is_page_tab_list� get_child)r �objr s �r r zUtilities.isLayoutOnly8 sO �� ��7���$���"�"�3�'�H�,D�,D�S�,I��/�/��0B�0B�3��0J�K�K�r c �^ �� t � | � |||||� ry| j � }t j |� |v rt j |� |v syt j
|� t j
|� k( }d|d|d|g}t
j t j |d� |S )NTF�GECKO: Treating�andzas same object:) r �isSameObject�_topLevelRolesr
�get_role�get_namer �printTokens�
LEVEL_INFO)
r �obj1�obj2�comparePaths�ignoreNames�ignoreDescriptions�roles�rv�tokensr s
�r r# zUtilities.isSameObjectA s� �� ��7���d�L�+�GY�Z���#�#�%���!�!�$�'�5�0�X�5F�5F�t�5L�PU�5U��
�
�
�t�
$��(9�(9�$�(?�
?��#�T�5�$�8I�2�N��
���%�*�*�F�D�9�� r c � �� t �| � ||� }t j |� rat j
|� rLd� }t j |d� }|j t j ||� D �cg c] }|�� c}� |S c c}w )Nc �. � t j | � S �N)r �is_column_header��xs r �isExtraz-Utilities.getOnScreenObjects.<locals>.isExtraU s � �&�7�7��:�:�:r r ) r �getOnScreenObjectsr �
is_tree_tabler
r r �extend�
iter_children)r �root�extents�objectsr7 �childr6 r s �r r8 zUtilities.getOnScreenObjectsO sy �� ��'�,�T�7�;�� �$�$�T�*�x�/G�/G��/M�
;� �&�&�t�Q�/�E��N�N�x�'=�'=�e�W�'M�N�!�A�N�O���� Os �8 B
c �( � t j |� sy| j |� }t j |� r,d|d|g}t j t j
|d� yd|dg}t j t j
|d� y)z,Returns True if this is an editable message.F�GECKO:zis in an editable document:TzGECKO: Editableznot in an editable document)r �is_editable�getDocumentForObjectr r'