%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__/chat.cpython-312.pyc

�

g
f�����dZdZdZdZdZdZddlmZddlmZdd	lm	Z	dd
lm
Z
ddlmZddlmZdd
lm
Z
ddlmZddlmZddlmZddlmZddlmZGd�d�ZGd�d�ZGd�d�ZGd�d�Zy)z Implements generic chat support.z$Id$z
$Revision$z$Date$z%Copyright (c) 2010-2011 The Orca Team�LGPL�)�cmdnames)�debug)�
focus_manager)�	guilabels)�input_event)�keybindings)�messages)�script_manager)�settings)�settings_manager)�AXObject)�AXUtilitiesc�6�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	y)	�RingListc�<�g|_d|_||_d|_y�N�)�__data__�__full__�__max__�__cur__)�self�lengths  �+/usr/lib/python3/dist-packages/orca/chat.py�__init__zRingList.__init__3s����
���
�������c�x�|jdk(rZtd|jdz
�D]!}|j|dz|j|<�#||j|jdz
<y|jj	|�|xjdz
c_|j|j
k(rd|_yy)Nrr)r�rangerr�appendr)r�x�is   rr zRingList.append9s����=�=�A���A�t�|�|�a�/�0�
8��#'�=�=��Q��#7��
�
�a� �
8�./�D�M�M�$�,�,��*�+��M�M� � ��#��L�L�A��L��|�|�t�|�|�+� !��
�,rc��|jS�N)r�rs r�getzRingList.getDs���}�}�rc��|jdkDr0|j|jdz
=|xjdzc_yy)Nrr)rrr%s r�removezRingList.removeGs6���L�L�1���
�
�d�l�l�Q�.�/��L�L�A��L�
rc��|jSr$)rr%s r�sizez
RingList.sizeL����|�|�rc��|jSr$)rr%s r�maxsizezRingList.maxsizeOr+rc�8�dj|j�S)N�)�joinrr%s r�__str__zRingList.__str__Rs���w�w�t�}�}�%�%rN)
�__name__�
__module__�__qualname__rr r&r(r*r-r1�rrrr2s%���	"���
��&rrc�0�eZdZdZdd�Zd�Zd�Zd�Zd�Zy)	�Conversation�	Nc��||_||_||_ttj
�|_d}||jj�kr4|jd�|dz
}||jj�kr�4d|_	y)aCreates a new instance of the Conversation class.

        Arguments:
        - name: the chatroom/conversation name
        - accHistory: the accessible which holds the conversation history
        - inputArea: the editable text object for this conversation.
        rr/rN)
�name�
accHistory�	inputArearr7�MESSAGE_LIST_LENGTH�_messageHistoryr-�
addMessage�
_typingStatus)rr:r;r<r"s     rrzConversation.__init__as�����	�$���"��� (��(H�(H�I���
���$�&�&�.�.�0�0��O�O�B��
��F�A��$�&�&�.�.�0�0� ��rc�:�|jj|�y)z�Adds the current message to the message history.

        Arguments:
        - message: A string containing the message to add
        N)r>r )r�messages  rr?zConversation.addMessage�s��	
���#�#�G�,rc�@�|jj�}||S)z�Returns the specified message from the message history.

        Arguments:
        - messageNumber: the index of the message to get.
        )r>r&)r�
messageNumberr
s   r�
getNthMessagezConversation.getNthMessage�s#���'�'�+�+�-���
�&�&rc��|jS)z<Returns the typing status of the buddy in this conversation.�r@r%s r�getTypingStatuszConversation.getTypingStatus�s���!�!�!rc��||_y)z�Sets the typing status of the buddy in this conversation.

        Arguments:
        - status: a string describing the current status.
        NrG)r�statuss  r�setTypingStatuszConversation.setTypingStatus�s��$��rr$)	r2r3r4r=rr?rErHrKr5rrr7r7[s#���� �>-�	'�"�
$rr7c�6�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	y)	�ConversationListc��g|_t|�|_t|�|_d}||jj	�kr6|jdd�|dz
}||jj	�kr�5yy)z�Creates a new instance of the ConversationList class.

        Arguments:
        - messageListLength: the size of the message history to keep.
        rr/Nr)�
conversationsrr>�_roomHistoryr-r?)r�messageListLengthr"s   rrzConversationList.__init__�sz�� ���
 (�(9�:���
%�%6�7���
���$�&�&�.�.�0�0��O�O�B��%�
��F�A��$�&�&�.�.�0�0rc���|sd}n.|j|�s|j|�|j}|jj	|�|j
j	|�y)z�Adds the current message to the message history.

        Arguments:
        - message: A string containing the message to add
        - conversation: The instance of the Conversation class with which
          the message is associated
        r/N)�hasConversation�addConversationr:r>r rP)rrB�conversationr:s    rr?zConversationList.addMessage�s[����D��'�'��5��$�$�\�2��$�$�D����#�#�G�,���� � ��&rc�~�|jj�}|jj�}||||fS)z�Returns a list containing the specified message from the message
        history and the name of the chatroom/conversation associated with
        that message.

        Arguments:
        - messageNumber: the index of the message to get.
        )r>r&rP)rrDr
�roomss    r�getNthMessageAndNamez%ConversationList.getNthMessageAndName�sA���'�'�+�+�-���!�!�%�%�'���
�&��m�(<�<�<rc��||jvS)z�Returns True if we know about this conversation.

        Arguments:
        - conversation: the conversation of interest
        )rO�rrUs  rrSz ConversationList.hasConversation�s���t�1�1�1�1rc�,�t|j�S)z<Returns the number of conversations we currently know about.)�lenrOr%s r�getNConversationsz"ConversationList.getNConversations�s���4�%�%�&�&rc�:�|jj|�y)z|Adds conversation to the list of conversations.

        Arguments:
        - conversation: the conversation to add
        N)rOr rZs  rrTz ConversationList.addConversation�s��	
���!�!�,�/rc�Z�	|jj|�y#t$rYywxYw)z�Removes conversation from the list of conversations.

        Arguments:
        - conversation: the conversation to remove

        Returns True if conversation was successfully removed.
        TF)rOr(�	ExceptionrZs  r�removeConversationz#ConversationList.removeConversation�s4��	����%�%�l�3����	��	�s��	*�*N)
r2r3r4rr?rXrSr]rTrar5rrrMrM�s%���6'�&=�2�'�
0�rrMc��eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zdd�Zdd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zdd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy
)�ChatzTThis class implements the chat functionality which is available to
    scripts.
    c�p�||_||_gd�|_tj|_i|_|j�|j�|_	t|j�|_t|j�|_
d|_d|_d|_d|_d|_d|_y)ahCreates an instance of the Chat class.

        Arguments:
        - script: the script with which this instance is associated.
        - buddyListAncestries: a list of lists of roles beginning
          with the object serving as the actual buddy list (e.g.
          ROLE_TREE_TABLE) and ending with the top level object (e.g.
          ROLE_FRAME).
        )	�F1�F2�F3�F4�F5�F6�F7�F8�F9N)�_script�_buddyListAncestries�messageKeysr	�ORCA_MODIFIER_MASK�messageKeyModifier�inputEventHandlers�setupInputEventHandlers�getKeyBindings�keyBindingsr\rQrM�_conversationList�focusedChannelRadioButton�allChannelsRadioButton�allMessagesRadioButton�buddyTypingCheckButton�chatRoomHistoriesCheckButton�speakNameCheckButton)r�script�buddyListAncestriess   rrz
Chat.__init__s������$7��!�
C�	
��"-�"@�"@���"$����$�$�&��.�.�0���
"%�T�%5�%5�!6���!1�$�2H�2H�!I���)-��&�&*��#�&*��#�&*��#�,0��)�$(��!rc���tj|jtj�|j
d<tj|jtj�|j
d<tj|jtj�|j
d<tj|jtj�|j
d<y)z�Defines InputEventHandler fields for chat functions which
        will be used by the script associated with this chat instance.�togglePrefixHandler�toggleBuddyTypingHandler�toggleMessageHistoriesHandler�
reviewMessageN)r�InputEventHandler�togglePrefixr�CHAT_TOGGLE_ROOM_NAME_PREFIXrs�toggleBuddyTyping�CHAT_TOGGLE_BUDDY_TYPING�toggleMessageHistories�CHAT_TOGGLE_MESSAGE_HISTORIES�readPreviousMessage�CHAT_PREVIOUS_MESSAGEr%s rrtzChat.setupInputEventHandlersHs���

�)�)��!�!��5�5�
7�	
��� 5�6�
�)�)��&�&��1�1�
3�	
��� :�;�
�)�)��+�+��6�6�
8�	
��� ?�@�
�)�)��(�(��.�.�
0�	
����0�
	rc
���tj�}|jtjdtjtj
|jd��|jtjdtjtj
|jd��|jtjdtjtj
|jd��|jD]N}|jtj||jtj|jd���P|S)z�Defines the chat-related key bindings which will be used by
        the script associated with this chat instance.

        Returns: an instance of keybindings.KeyBindings.
        r/r�r�r�r�)
r	�KeyBindings�add�
KeyBinding�defaultModifierMask�NO_MODIFIER_MASKrsrprrrq)rrv�
messageKeys   rruzChat.getKeyBindingsbs2��"�-�-�/������"�"���/�/��,�,��'�'�(=�>�	
@�	A�	����"�"���/�/��,�,��'�'�(B�C�	
E�	F�	����"�"���/�/��,�,��'�'�(G�H�	
J�	K��*�*�	?�J��O�O��&�&���+�+��2�2��+�+�O�<�	>�
?�	?��rc���ddlm}|j�}|jd�tj
}t
j�jd�}|jj|�|_|jj|�|j|jdddd�tj}t
j�jd�}|jj|�|_|jj|�|j|jdddd�tj }t
j�jd�}|jj|�|_|j"j|�|j|j"dddd�|j%�}|j|dd	dd�|j'd
tj(�d��}|j+d�|j-|�|j.j1d
d
dd�}|j3dddd�|j5|�|j�}|j5|�t
j�jd�}tj6}|j8jd|�}|j|t:j<k(�||_|j|j>dddd�tj@}|j8jd|�}	|	jC|�|	j|t:jDk(�|	|_#|j|jFdddd�tjHtKjL|jNjP�z}|j8jd|�}
|
jC|�|
j|t:jRk(�|
|_*|j|jTdddd�|jW�|S)zpReturn a GtkGrid containing the application unique configuration
        GUI items for the current application. r)�Gtk��chatSpeakRoomNamer�chatAnnounceBuddyTyping�chatRoomHistories��z<b>z</b>Tg�?�chatMessageVerbosityN),�
gi.repositoryr��Grid�set_border_widthr�CHAT_SPEAK_ROOM_NAMEr
�
getManager�
getSetting�CheckButton�new_with_mnemonicr}�
set_active�attach�CHAT_ANNOUNCE_BUDDY_TYPINGr{�CHAT_SEPARATE_MESSAGE_HISTORIESr|�Frame�Label�CHAT_SPEAK_MESSAGES_FROM�set_use_markup�set_label_widget�	Alignment�new�set_paddingr��CHAT_SPEAK_MESSAGES_ALL�RadioButtonr�CHAT_SPEAK_ALLrz�CHAT_SPEAK_MESSAGES_ACTIVE�
join_group�CHAT_SPEAK_FOCUSED_CHANNELrx�"CHAT_SPEAK_MESSAGES_ALL_IF_FOCUSEDr�get_namern�app�CHAT_SPEAK_ALL_IF_FOCUSEDry�show_all)rr��grid�label�value�
messagesFrame�messagesAlignment�messagesGrid�rb1�rb2�rb3s           r�getAppPreferencesGUIzChat.getAppPreferencesGUI�s���	&��x�x�z�����b�!��.�.�� �+�+�-�8�8�9L�M��$'�O�O�$E�$E�e�$L��!��!�!�,�,�U�3����D�-�-�q�!�Q��:��4�4�� �+�+�-�8�8�9R�S��&)�o�o�&G�&G��&N��#��#�#�.�.�u�5����D�/�/��A�q�!�<��9�9�� �+�+�-�8�8�9L�M���O�O�-�-�e�4�	
�)��)�)�4�4�U�;����D�5�5�q�!�Q��B��	�	��
����M�1�a��A�.��	�	�C�	� B� B�C�4�H�I��
���T�"��&�&�u�-��M�M�-�-�c�3��1�=���%�%�a��B��2����+�,��x�x�z�����l�+� �+�+�-�8�8�9O�P���1�1���o�o�/�/��e�<�����u�� 7� 7�7�8�&)��#����D�7�7��A�q�!�D��4�4���o�o�/�/��e�<�����s�����u�� C� C�C�D�),��&����D�:�:�A�q�!�Q�G��<�<����d�l�l�.�.�/�0���o�o�/�/��e�<�����s�����u�� B� B�B�C�&)��#����D�7�7��A�q�!�D��
�
���rc�l�|jj�rtj}n;|jj�rtj
}ntj}||jj�|jj�|jj�d�S)z7Returns a dictionary with the app-specific preferences.)r�r�r�r�)
ry�
get_activerr�rxr�r�r}r{r|)r�	verbositys  r�getPreferencesFromGUIzChat.getPreferencesFromGUI�s����&�&�1�1�3� �:�:�I�
�
+�
+�
6�
6�
8� �;�;�I� �/�/�I�%.�!%�!:�!:�!E�!E�!G�'+�'B�'B�'M�'M�'O�!%�!B�!B�!M�!M�!O�	
�	
rc��tj}tj�j	d�}tj�jd|�|rtj}|jj|�y)z� Toggle whether we prefix chat room messages with the name of
        the chat room.

        Arguments:
        - script: the script associated with this event
        - inputEvent: if not None, the input event that caused this action.
        r�T)	r
�CHAT_ROOM_NAME_PREFIX_ONr
r�r��
setSetting�CHAT_ROOM_NAME_PREFIX_OFFrn�presentMessage)rr~�
inputEvent�line�
speakRoomNames     rr�zChat.togglePrefix�si���0�0��(�3�3�5�@�@�AT�U�
��#�#�%�0�0�1D�-�FW�X���5�5�D����#�#�D�)�rc��tj}tj�j	d�}tj�jd|�|rtj}|jj|�y)z� Toggle whether we announce when our buddies are typing a message.

        Arguments:
        - script: the script associated with this event
        - inputEvent: if not None, the input event that caused this action.
        r�T)	r
�CHAT_BUDDY_TYPING_ONr
r�r�r��CHAT_BUDDY_TYPING_OFFrnr�)rr~r�r��announceTypings     rr�zChat.toggleBuddyTyping�sk���,�,��)�4�4�6�A�A�B[�\���#�#�%�0�0�%�>�'9�	;���1�1�D����#�#�D�)�rc��tj}tj�j	d�}tj�jd|�|rtj}|jj|�y)z� Toggle whether we provide chat room specific message histories.

        Arguments:
        - script: the script associated with this event
        - inputEvent: if not None, the input event that caused this action.
        r�T)	r
�CHAT_SEPARATE_HISTORIES_ONr
r�r�r��CHAT_SEPARATE_HISTORIES_OFFrnr�)rr~r�r��
roomHistoriess     rr�zChat.toggleMessageHistoriessi���2�2��(�3�3�5�@�@�AT�U�
��#�#�%�0�0�1D�-�FW�X���7�7�D����#�#�D�)�rNc���	|jj|j�}|j|dzz
}d\}}tj�jd�rQ|jtj�j��}|r<|j|�}|j}n|jj|�\}}|r|r|j||d�yyy#t$rY��wxYw)a� Speak/braille a previous chat room message.

        Arguments:
        - script: the script associated with this event
        - inputEvent: if not None, the input event that caused this action.
        - index: The index of the message to read -- by default, the most
          recent message. If we get an inputEvent, however, the value of
          index is ignored and the index of the event_string with respect
          to self.messageKeys is used instead.
        r)NNr�TN)rp�index�event_stringr`rQr
r�r��getConversationr�get_locus_of_focusrEr:rwrX�utterMessage)rr~r�r�rDrB�chatRoomNamerUs        rr�zChat.readPreviousMessages���	��$�$�*�*�:�+B�+B�C�E��.�.�%�!�)�<�
� *�����&�&�(�3�3�4G�H��/�/�
�0H�0H�0J�0]�0]�0_�`�L��&�4�4�]�C��+�0�0���&�&�;�;�M�J�
"�G�\��|����l�G�T�:�$�7���	��	�s�%C*�*	C6�5C6c��tj�j|jjd�}tj�j
�}|j|jjk7r|tjk(ry|s|tjk(ryd}|rKtj�j|jjd�rtj|z}tjs'|jjj||�}n&|jjj||�}t!|j#��rC|jj$j'|��}|jj)||��|jj+|�y)aj Speak/braille a chat room message.

        Arguments:
        - chatRoomName: name of the chat room this message came from
        - message: the chat room message
        - focused: whether or not the current chatroom has focus. Defaults
          to True so that we can use this method to present chat history
          as well as incoming messages.
        r�Nr/r���string��voice)r
r��
getAppSettingrnr�r�getActiveScriptr:rr�r�r
�CHAT_MESSAGE_FROM_ROOM�presentChatRoomLast�	utilities�appendStringr\�strip�speechGeneratorr��speakMessage�displayBrailleMessage)rr�rB�focusedr�r~�textr�s        rr�zChat.utterMessage9sO��%�/�/�1�?�?��L�L���4�6�	��*�*�,�<�<�>���;�;�$�,�,�+�+�+��H�>�>�>���Y�(�*M�*M�M������&�&�(�6�6�t�|�|�7G�7G�I\�]��2�2�\�A�D��+�+��<�<�)�)�6�6�t�W�E�D��<�<�)�)�6�6�w��E�D��t�z�z�|���L�L�0�0�6�6�d�6�C�E��L�L�%�%�d�%�%�8����*�*�4�0rc��|jS)ayGet the actual displayed message. This will almost always be the
        unaltered any_data from an event of type object:text-changed:insert.

        Arguments:
        - event: the Event from which to take the text.

        Returns the string which should be presented as the newly-inserted
        text. (Things like chatroom name prefacing get handled elsewhere.)
        )�any_data�r�events  r�getMessageFromEventzChat.getMessageFromEvent_s���~�~�rc���|r'|jjd�r|jsy|j|j�ry|j|j�ry|j
|�r|j||j�y|j|j�r�|j|j�r2|j|j�}t||j�}n'|j|j�}|j}|j|�jd�}|r|j!||�|j#|j�}|rd}|r|j%|||�y|j'|�rP|j}|j(j*j-|��}|j(j/||��yy)aSGives the Chat class an opportunity to present the text from the
        text inserted Event.

        Arguments:
        - event: the text inserted Event

        Returns True if we handled this event here; otherwise False, which
        tells the associated script that is not a chat event that requires
        custom handling.
        zobject:text-changed:insertFT�
r/r�r�)�type�
startswithr��isGenericTextObject�source�
isInBuddyList�isTypingStatusChangedEvent�presentTypingStatusChange�
isChatRoomMsg�isNewConversation�getChatRoomNamer7r�r:r�r��addMessageToHistory�
isFocusedChatr��isAutoCompletedTextEventrnr�r�r�)rr�r:rUrBr�r�r�s        r�presentInsertedTextzChat.presentInsertedTextls�����*�*�'�'�(D�E��.�.���#�#�E�L�L�1��
�
�
����
-��
�
,�
,�U�
3��*�*�5�%�.�.�A��
�
�
����
-��%�%�e�l�l�3��+�+�E�L�L�9��+�D�%�,�,�?��#�3�3�E�L�L�A��#�(�(���.�.�u�5�;�;�D�A�G���(�(��,�?�
�(�(����6�G������!�!�$���9��
�
*�
*�5�
1��>�>�D��L�L�0�0�6�6�d�6�C�E��L�L�%�%�d�%�%�8��rc�T�tj�jd�r�|j|j�}|rh||j�k7rU|jjj|��}|jj||��|j|�yy)aCPresents a change in typing status for the current conversation
        if the status has indeed changed and if the user wants to hear it.

        Arguments:
        - event: the accessible Event
        - status: a string containing the status change

        Returns True if we spoke the change; False otherwise
        r�r�r�TF)r
r�r�r�r�rHrnr�r�r�rK)rr�rJrUr�s     rrzChat.presentTypingStatusChange�s����&�&�(�3�3�4M�N��/�/����=�L���<�+G�+G�+I�!I����4�4�:�:�&�:�I�����)�)�&��)�>��,�,�V�4��rc�^�|j|�|jj||�y)aQAdds message to both the individual conversation's history
        as well as to the complete history stored in our conversation
        list.

        Arguments:
        - message: a string containing the message to be added
        - conversation: the instance of the Conversation class to which
          this message belongs
        N)r?rw)rrBrUs   rrzChat.addMessageToHistory�s(��	����(����)�)�'�<�@rc�Z�tj|�xrtj|�S)z�Returns True if the given accessible seems to be something
        unrelated to the custom handling we're attempting to do here.

        Arguments:
        - obj: the accessible object to examine.
        )r�is_editable�is_single_line�r�objs  rr�zChat.isGenericTextObject�s%���&�&�s�+�O��0J�0J�3�0O�Orc�|�|�y|jD]*}|jjj||�s�*yy)ayReturns True if obj is the list of buddies in the buddy list
        window. Note that this method relies upon a hierarchical check,
        using a list of hierarchies provided by the script. Scripts
        which have more reliable means of identifying the buddy list
        can override this method.

        Arguments:
        - obj: the accessible being examined
        FT)rornr��hasMatchingHierarchy)rr�roleLists   r�isBuddyListzChat.isBuddyList�sC���;���1�1�	�H��|�|�%�%�:�:�3��I��	�rc���|r|j|�ry|jD]3}|d�tj|�fd��}|j|�s�3yy)z�Returns True if obj is, or is inside of, the buddy list.

        Arguments:
        - obj: the accessible being examined
        - includeList: whether or not the list itself should be
          considered "in" the buddy list.
        Trc�4��tj|��k(Sr$)r�get_role)r!�roles �r�<lambda>z$Chat.isInBuddyList.<locals>.<lambda>s���h�>O�>O�PQ�>R�VZ�>Z�rF)rror�
find_ancestor)rr�includeListr�	candidaters     @rr�zChat.isInBuddyList�s_����4�+�+�C�0���1�1�	�H��A�;�D� �.�.�s�4Z�[�I����	�*��		�rc�\�|j|�}|jj|�S)z�Returns True if the given accessible is the chat history
        associated with a new conversation.

        Arguments:
        - obj: the accessible object to examine.
        )r�rwrS)rrrUs   rrzChat.isNewConversations.���+�+�C�0���)�)�9�9�,�G�G�Grc�6�|syd}tj|�stj|�r&tj|�r|j|�}|jjD]+}|r||jk(s�|cS||jk(s�)|cSy)z�Attempts to locate the conversation associated with obj.

        Arguments:
        - obj: the accessible of interest

        Returns the conversation if found; None otherwise
        Nr/)
r�is_textr�is_entryrrrwrOr:r;)rrr:rUs    rr�zChat.getConversations�������
����$��(9�(9�#�(>��&�&�s�+��'�'��,�D� �2�2�@�@�	$�L���<�,�,�,�'�'���/�/�/�#�#�	$�rc���tj|�rUtjtj|��r-tj
|�xrtj|�Sy)z�Returns True if the given accessible is the text object for
        associated with a chat room conversation.

        Arguments:
        - obj: the accessible object to examine.
        F)rr�is_scroll_paner�
get_parentr�
is_multi_liner
s  rrzChat.isChatRoomMsg8sS�����s�#��(B�(B�8�CV�CV�WZ�C[�(\�"�.�.�s�3�3�V��8Q�8Q�RU�8V�V�rc�&�tj|�rR|jjj	|�}d|d|g}tjt
j|d�|Sd|dg}tjt
j|d�y)z�Returns True if we plan to treat this chat as focused for
        the purpose of deciding whether or not a message should be
        presented to the user.

        Arguments:
        - obj: the accessible object to examine.
        zINFO:z's window is focused chat:Tz!is not focused chat (not showing)F)r�
is_showingrnr�� topLevelObjectIsActiveAndCurrentr�printTokens�
LEVEL_INFO)rr�active�tokenss    rrzChat.isFocusedChatDs����!�!�#�&��\�\�+�+�L�L�S�Q�F��s�$@�&�I�F����e�.�.���=��M��3� C�D��
���%�*�*�F�D�9�rc��d�}tj||�}d}	|jjj	|�}|j�j
�|jjj�j
�k7r|}|s�tj|tj�}	|jjj	|�}|j�j
�|jjj�j
�k7r|}|S|S#t$rY��wxYw#t$rY|SwxYw)z�Attempts to find the name of the current chat room.

        Arguments:
        - obj: The accessible of interest

        Returns a string containing what we think is the chat room name.
        c�Z�tj|�xstj|�Sr$)r�is_page_tab�is_frame)r!s r�predz"Chat.getChatRoomName.<locals>.predes#���*�*�1�-�H��1E�1E�a�1H�Hrr/)rrrnr��
displayedText�lowerr�r:r`rr-)rrr.�ancestorr:r�s      rrzChat.getChatRoomNameWs#��	I��)�)�#�t�4����	��<�<�)�)�7�7��A�D��z�z�|�!�!�#�t�|�|�'8�'8�'>�'>�'@�'F�'F�'H�H�����-�-�c�;�3G�3G�H�H�
��|�|�-�-�;�;�H�E���:�:�<�%�%�'�4�<�<�+<�+<�+B�+B�+D�+J�+J�+L�L��D���t���!�	��	���
����
�s%�A8D8�<A8E�8	E�E�	E�Ec���tj|j�sy|jjj�\}}|dk(r|jr|jdk7ryy)z�Returns True if event is associated with text being autocompleted.

        Arguments:
        - event: the accessible event being examined
        F�Tab�	T)rrr�rnr��lastKeyAndModifiersr�)rr��lastKey�modss    rrzChat.isAutoCompletedTextEvent�sT���"�"�5�<�<�0�����.�.�B�B�D�
����e�����5�>�>�T�3I��rc��y)z�Returns True if event is associated with a change in typing status.

        Arguments:
        - event: the accessible event being examined
        Fr5r�s  rr�zChat.isTypingStatusChangedEvent�s��rr)T)r2r3r4�__doc__rrtrur�r�r�r�r�r�r�r�rrrr�rr�rr�rrrrr�r5rrrcrcs����()�T�4&�PA�F
�.�$�$�";�@$1�L�?�B�*A�(P��(�(	H�#�J
��&'�R� rrcN)r9�__id__�__version__�__date__�
__copyright__�__license__r/rrrrrr	r
rrr
�	ax_objectr�ax_utilitiesrrr7rMrcr5rr�<module>rAsx��('�	������7�
��������������%�!&�!&�RE$�E$�Zi�i�bC
�C
r

Zerion Mini Shell 1.0