%PDF- %PDF-
Mini Shell

Mini Shell

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

�

g
f4���dZdZdZdZdZdZddlZejdd	�dd
lm	Z	ddl
mZdd
lm
Z
Gd�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�@�eZdZdZed��Zed��Zed��Zy)�AXSelectionzJUtilities for obtaining information about containers supporting selection.c�H�tj|�sy	tjj	|�}d|d|dg}t
jtj|d�|S#t
$r3}d|g}t
jtj|d�Yd}~yd}~wwxYw)z'Returns the selected child count of objrz3AXSelection: 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_count1s����*�*�3�/��	��O�O�;�;�C�@�E�!�#�y�%�9L�M��
���%�*�*�F�D�9�����	�K�U�S�F����e�.�.���=���	�s�A%�%	B!�.)B�B!c���tj|�}|dkry|dk(r|dz
}d|cxkr|ksyy	tjj	||�}||k(r+d|dg}t
jtj|d�yd|d	|d
|g}t
jtj|d�|S#t
$r3}d|g}t
jtj|d�Yd}~yd}~wwxYw)z&Returns the nth selected child of obj.rN���rz-AXSelection: Exception in get_selected_child:Tr�#claims to be its own selected childzis selected child #�of)	r	rrr�get_selected_childrrrr)r�index�
n_children�childrrs      rrzAXSelection.get_selected_childCs���!�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�^�tj|�}t�}t|�D]7}	tj
j
||�}|��'|j|��9||vr;d|dg}tjtj|d�|j|�t|�}t|�|k7r-d|d|��g}tjtj|d�|S#t$r7}d|g}tjtj|d�gcYd}~cSd}~wwxYw)z3Returns a list of all the selected children of obj.z0AXSelection: Exception in get_selected_children:TNrrz$AXSelection: Selected child count ofzis )r	r�set�rangerrrrrrr�add�remove�list�len)rr�children�ir rr�results        r�get_selected_childrenz!AXSelection.get_selected_childrenas���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__�staticmethodrrr+��rr	r	.s?��T�����"����:���r2r	)r/�__id__�__version__�__date__�
__copyright__�__license__�gi�require_version�
gi.repositoryr�r�	ax_objectrr	r1r2r�<module>r=sO��*�������1�
���	�����7�E�"����N�Nr2

Zerion Mini Shell 1.0