%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/orca/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/orca/__pycache__/ax_selection.cpython-312.pyc |
� g f4 � � � d Z dZdZdZdZdZddlZ ej dd � dd lm Z ddl mZ dd lm Z G d� d� Zy)a� Utilities for obtaining information about containers supporting selection. These utilities are app-type- and toolkit-agnostic. Utilities that might have different implementations or results depending on the type of app (e.g. terminal, chat, web) or toolkit (e.g. Qt, Gtk) should be in script_utilities.py file(s). N.B. There are currently utilities that should never have custom implementations that live in script_utilities.py files. These will be moved over time. z$Id$z $Revision$z$Date$zCopyright (c) 2023 Igalia, S.L.�LGPL� N�Atspiz2.0)r � )�debug)�AXObjectc �@ � e Zd ZdZed� � Zed� � Zed� � Zy)�AXSelectionzJUtilities for obtaining information about containers supporting selection.c �H � t j | � sy t j j | � }d| d|dg}t j t j |d� |S # t $ r3}d|g}t j t j |d� Y d}~yd}~ww xY w)z'Returns the selected child count of objr z3AXSelection: Exception in get_selected_child_count:TN�AXSelection:�reportszselected children) r �supports_selectionr � Selection�get_n_selected_children� Exceptionr �printTokens� LEVEL_INFO)�obj�count�error�tokenss �3/usr/lib/python3/dist-packages/orca/ax_selection.py�get_selected_child_countz$AXSelection.get_selected_child_count1 s� � � �*�*�3�/�� ��O�O�;�;�C�@�E� !�#�y�%�9L�M�� ���%�*�*�F�D�9���� � �K�U�S�F����e�.�.���=��� �s �A% �% B!�.)B�B!c �� � t j | � }|dk ry|dk( r|dz }d|cxk r|k sy y t j j | |� }|| k( r+d| dg}t j t j |d� yd|d |d | g}t j t j |d� |S # t $ r3}d|g}t j t j |d� Y d}~yd}~ww xY w)z&Returns the nth selected child of obj.r N���r z-AXSelection: Exception in get_selected_child:Tr �#claims to be its own selected childzis selected child #�of) r r r r �get_selected_childr r r r )r �index� n_children�childr r s r r zAXSelection.get_selected_childC s� � � !�9�9�#�>� ���?���B�;���N�E��E�&�J�&�� '�� ��O�O�6�6�s�E�B�E� �C�<�$�c�+P�Q�F����e�.�.���=�� �%�)>��t�S�Q�� ���%�*�*�F�D�9���� � �E�u�M�F����e�.�.���=��� �s � B4 �4 C0�=)C+�+C0c �^ � t j | � }t � }t |� D ]7 } t j j | |� }|��'|j |� �9 | |v r;d| dg}t j t j |d� |j | � t |� }t |� |k7 r-d| d|� �g}t j t j |d� |S # t $ r7}d|g}t j t j |d� g cY d}~c S d}~ww xY w)z3Returns a list of all the selected children of obj.z0AXSelection: Exception in get_selected_children:TNr r z$AXSelection: Selected child count ofzis )r r �set�ranger r r r r r r �add�remove�list�len)r r �children�ir r r �results r �get_selected_childrenz!AXSelection.get_selected_childrena s � � �4�4�S�9���5���u�� $�A� ����:�:�3��B�� � ����U�#� $� �(�?�$�c�+P�Q�F����e�.�.���=��O�O�C� ��h����v�;�%��<�c�S���=�Q�F����e�.�.���=�� ��% � �L�e�T���!�!�%�"2�"2�F�D�A�� �� �s � C,�, D,�5*D'�D,�'D,N)�__name__� __module__�__qualname__�__doc__�staticmethodr r r+ � � r r r . s? � �T��� ��"