+
    Qi2  c                   s
   R t RtRtRtRtRt^RIHt ^RIHt ^RIH	t	 ^R	IH
t
 ^R
IHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt  ! R R4      t ! R R4      t ! R R4      t ! R R4      tR# )z Implements generic chat support.z$Id$z
$Revision$z$Date$z%Copyright (c) 2010-2011 The Orca TeamZLGPL)cmdnames)debug)focus_manager)input_event_manager)	guilabels)input_event)keybindings)messages)script_manager)settings)settings_manager)AXObject)AXUtilitiesc                   sJ   a  ] tR t^3t o R tR tR tR tR tR t	R t
RtV tR	# )
RingListc                s<    . V n         ^ V n        Wn        ^ V n        R#     N)__data____full____max____cur__)selfZlength   &&./usr/lib/python3.14/site-packages/orca/chat.py__init__ZRingList.__init__4   s        c                s   V P                   ^8X  dm   \        ^ V P                  ^,
          4       F*  pV P                  V^,           ,          V P                  V&   K,  	  WP                  V P                  ^,
          &   R# V P                  P	                  V4       V ;P                  ^,          un        V P                  V P
                  8X  d
   ^V n         R# R# )i   N)r   Zranger   r   appendr   )r   xi   && r   r   ZRingList.append:   s    ==AAt||a/0#'==Q#7a  1./MM$,,*+MM  #LLAL||t||+ ! ,r   c                    V P                   # N)r   r      &r   getZRingList.getE   s    }}r   c                s    V P                   ^ 8  d:   V P                  V P                   ^,
           V ;P                   ^,          un         R# R# r   )r   r   r   r    r   removeZRingList.removeH   s6    LL1dllQ./LLAL r   c                r   r   )r   r   r    r   sizeZRingList.sizeM       ||r   c                r   r   )r   r   r    r   maxsizeZRingList.maxsizeP   r$   r   c                s8    R P                  V P                  4      # ) )Zjoinr   r   r    r   __str__ZRingList.__str__S   s    wwt}}%%r   )r   r   r   r   N)__name__
__module____qualname____firstlineno__r   r   r!   r"   r#   r%   r'   __static_attributes____classdictcell__Z__classdict__   @r   r   r   3   s-     	"
& &r   r   c                   sF   a  ] tR t^\t o ^	tRR ltR tR tR tR t	Rt
V tR# )	ConversationNc                s    Wn         W n        W0n        \        \        P
                  4      V n        ^ pW@P                  P                  4       8  d   V P                  R4       V^,          pK:  RV n	        R# )zCreates 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.
r&   N)
name
accHistory	inputArear   r0   MESSAGE_LIST_LENGTH_messageHistoryr%   
addMessage_typingStatus)r   r1   r2   r3   r   s   &&&& r   r   ZConversation.__init__b   sc     	$"  ((H(HI &&..00OOBFA  r   c                <    V P                   P                  V4       R# )zoAdds the current message to the message history.

Arguments:
- message: A string containing the message to add
N)r5   r   )r   messager   r   r6   ZConversation.addMessage   s     	##G,r   c                sF    V P                   P                  4       pW!,          # )zvReturns the specified message from the message history.

Arguments:
- messageNumber: the index of the message to get.
)r5   r!   )r   messageNumberr   r   r   getNthMessageZConversation.getNthMessage   s!     ''++-&&r   c                r   )z<Returns the typing status of the buddy in this conversation.r7   r   r    r   getTypingStatusZConversation.getTypingStatus   s     !!!r   c                s    Wn         R# )zxSets the typing status of the buddy in this conversation.

Arguments:
- status: a string describing the current status.
Nr<   )r   statusr   r   setTypingStatusZConversation.setTypingStatus   s
     $r   )r5   r7   r2   r3   r1   r   )r(   r)   r*   r+   r4   r   r6   r;   r=   r?   r,   r-   r.   r/   r   r0   r0   \   s+       >-	'"
$ $r   r0   c                   sJ   a  ] tR t^t o R tR tR tR tR tR t	R t
RtV tR	# )
ConversationListc                s    . V n         \        V4      V n        \        V4      V n        ^ pW P                  P	                  4       8  d   V P                  RR4       V^,          pK;  R# )zCreates a new instance of the ConversationList class.

Arguments:
- messageListLength: the size of the message history to keep.
r&   N)conversationsr   r5   _roomHistoryr%   r6   )r   messageListLengthr   r   r   r   ZConversationList.__init__   sd      
  ((9:
 %%67 &&..00OOB%FA 1r   c                s    V'       g   RpM4V P                  V4      '       g   V P                  V4       VP                  pV P                  P	                  V4       V P
                  P	                  V4       R# )zAdds 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addConversationr1   r5   r   rB   )r   r9   conversationr1      &&& r   r6   ZConversationList.addMessage   s^     D''55$$\2$$D##G,  &r   c                s    V P                   P                  4       pV P                  P                  4       pW!,          W1,          3# )zReturns 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.
)r5   r!   rB   )r   r:   r   Zrooms   &&  r   getNthMessageAndNameZ%ConversationList.getNthMessageAndName   s=     ''++-!!%%'&(<<<r   c                s    WP                   9   # )zjReturns True if we know about this conversation.

Arguments:
- conversation: the conversation of interest
)rA   r   rF   r   r   rD   Z ConversationList.hasConversation   s     1111r   c                s,    \        V P                  4      # )z<Returns the number of conversations we currently know about.)lenrA   r   r    r   getNConversationsZ"ConversationList.getNConversations   s     4%%&&r   c                r8   )zdAdds conversation to the list of conversations.

Arguments:
- conversation: the conversation to add
N)rA   r   rJ   r   r   rE   Z ConversationList.addConversation   s     	!!,/r   c                sb     V P                   P                  V4       R#   \         d     R# i ; i)zRemoves conversation from the list of conversations.

Arguments:
- conversation: the conversation to remove

Returns True if conversation was successfully removed.
TF)rA   r"   	ExceptionrJ   r   r   removeConversationZ#ConversationList.removeConversation   s4    	%%l3   		s    ..)r5   rB   rA   N)r(   r)   r*   r+   r   r6   rI   rD   rL   rE   rN   r,   r-   r.   r/   r   r@   r@      s-     6'&=2'
0 r   r@   c                   s   a  ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
 tRR ltRR ltR tR tR tR tR tR tR tRR ltR tR tR tR tR tR tR tRtV tR# ) Chati  z?Provides chat functionality available to scripts for chat apps.c                sb   Wn         . ROV n        \        P                  V n        / V n        V P                  4        V P                  4       V n        \        V P                  4      V n
        \        V P                  4      V n        RV n        RV n        RV n        RV n        RV n        RV n        R# )F1N)	rP   ZF2ZF3ZF4ZF5ZF6ZF7ZF8ZF9)_scriptmessageKeysr   ORCA_MODIFIER_MASKmessageKeyModifierinput_event_handlerssetup_input_event_handlersget_key_bindingskey_bindingsrK   rC   r@   _conversationListfocusedChannelRadioButtonallChannelsRadioButtonallMessagesRadioButtonbuddyTypingCheckButtonchatRoomHistoriesCheckButtonspeakNameCheckButton)r   scriptr   r   r   ZChat.__init__  s     C 	"-"@"@$&!'') 113
 "%T%5%5!6!1$2H2H!I)-&&*#&*#&*#,0)$(!r   c                s   \         P                  ! V P                  \        P                  4      V P
                  R&   \         P                  ! V P                  \        P                  4      V P
                  R&   \         P                  ! V P                  \        P                  4      V P
                  R&   \         P                  ! V P                  \        P                  4      V P
                  R&   R# )z8Defines the input event handlers for this chat instance.togglePrefixHandlertoggleBuddyTypingHandlertoggleMessageHistoriesHandlerreviewMessageN)r   ZInputEventHandlertogglePrefixr    ZCHAT_TOGGLE_ROOM_NAME_PREFIXrU   toggleBuddyTypingZCHAT_TOGGLE_BUDDY_TYPINGtoggleMessageHistoriesZCHAT_TOGGLE_MESSAGE_HISTORIESreadPreviousMessageZCHAT_PREVIOUS_MESSAGEr   r    r   rV   ZChat.setup_input_event_handlers<  s     ))!!557 	!!"78 ))&&113 	!!"<= ))++668 	!!"AB ))((..0 	!!/2
 	r   c           
     s   \         P                  ! 4       pVP                  \         P                  ! R\         P                  \         P
                  V P                  R,          4      4       VP                  \         P                  ! R\         P                  \         P
                  V P                  R,          4      4       VP                  \         P                  ! R\         P                  \         P
                  V P                  R,          4      4       V P                   FT  pVP                  \         P                  ! VV P                  \         P                  V P                  R,          4      4       KV  	  V# )z5Defines and returns the key bindings for this script.r&   ra   rb   rc   rd   )
r   ZKeyBindingsaddZ
KeyBindingZDEFAULT_MODIFIER_MASKZNO_MODIFIER_MASKrU   rR   rT   rS   )r   ZkeyBindingsZ
messageKeys   &  r   rW   ZChat.get_key_bindingsU  s/    "--/""11,,))*?@	B	C 	""11,,))*DE	G	H 	""11,,))*IJ	L	M **JOO&&++22--o>	@A + r   c                s,	   ^ RI pVP                  RR4       ^ RIHp VP	                  4       pVP                  ^4       \        P                  p\        P                  ! 4       P                  R4      pVP                  P                  V4      V n        V P                  P                  V4       VP                  V P                  ^ ^ ^^4       \        P                   p\        P                  ! 4       P                  R4      pVP                  P                  V4      V n        V P"                  P                  V4       VP                  V P"                  ^ ^^^4       \        P$                  p\        P                  ! 4       P                  R4      pVP                  P                  V4      V n        V P&                  P                  V4       VP                  V P&                  ^ ^^^4       VP)                  4       pVP                  V^ ^^^4       VP+                  R\        P,                   R	24      pVP/                  R
4       VP1                  V4       VP2                  P5                  RR^^4      pVP7                  ^ ^ ^^ 4       VP9                  V4       VP	                  4       pVP9                  V4       \        P                  ! 4       P                  R4      p\        P:                  pVP<                  P                  RV4      p	V	P                  V\>        P@                  8H  4       Wn!        VP                  V PB                  ^ ^ ^^4       \        PD                  pVP<                  P                  RV4      p
V
PG                  V	4       V
P                  V\>        PH                  8H  4       Wn%        VP                  V PJ                  ^ ^^^4       \        PL                  \N        PP                  ! V PR                  PT                  4      ,          pVP<                  P                  RV4      pVPG                  V	4       VP                  V\>        PV                  8H  4       Wn,        VP                  V PX                  ^ ^^^4       VP[                  4        V# )zhReturn a GtkGrid containing the application unique configuration
GUI items for the current application. NGtkz3.0)rj   chatSpeakRoomNamechatAnnounceBuddyTypingchatRoomHistoriesz<b>z</b>Tg      ?chatMessageVerbosity).giZrequire_versionZgi.repositoryrj   ZGridZset_border_widthr   ZCHAT_SPEAK_ROOM_NAMEr
   get_managerget_settingZCheckButtonZnew_with_mnemonicr_   Z
set_activeZattachZCHAT_ANNOUNCE_BUDDY_TYPINGr]   ZCHAT_SEPARATE_MESSAGE_HISTORIESr^   ZFrameZLabelZCHAT_SPEAK_MESSAGES_FROMZset_use_markupZset_label_widgetZ	AlignmentZnewZset_paddingri   ZCHAT_SPEAK_MESSAGES_ALLZRadioButtonr	   CHAT_SPEAK_ALLr\   ZCHAT_SPEAK_MESSAGES_ACTIVEZ
join_groupCHAT_SPEAK_FOCUSED_CHANNELrZ   Z"CHAT_SPEAK_MESSAGES_ALL_IF_FOCUSEDr   get_namerQ   appCHAT_SPEAK_ALL_IF_FOCUSEDr[   Zshow_all)r   ro   rj   ZgridZlabelZvalueZmessagesFrameZmessagesAlignmentZmessagesGridZrb1Zrb2Zrb3s   &           r   get_app_preferences_guiZChat.get_app_preferences_guiy  s    	
5%(%xxzb!.. ,,.::;NO$'OO$E$Ee$L!!!,,U3D--q!Q:44 ,,.::;TU&)oo&G&G&N###..u5D//Aq!<99 ,,.::;NOOO--e4 	)))44U;D55q!QB		M1aA.		C	 B BC4HIT"&&u-MM--c31=%%aB2+,xxzl+ ,,.::;QR11oo//e<u 7 778&)#D77Aq!D44oo//e<su C CCD),&D::Aq!QG<<dll../0oo//e<su B BBC&)#D77Aq!Dr   c           	     s   V P                   P                  4       '       d   \        P                  pMAV P                  P                  4       '       d   \        P
                  pM\        P                  pRVRV P                  P                  4       RV P                  P                  4       RV P                  P                  4       /# )z7Returns a dictionary with the app-specific preferences.rn   rk   rl   rm   )
r[   Z
get_activer	   rv   rZ   rs   rr   r_   r]   r^   )r   	verbositys   & r   get_preferences_from_guiZChat.get_preferences_from_gui  s     &&1133 ::I++6688 ;;I //I #I!:!:!E!E!G%t'B'B'M'M'O!B!B!M!M!O	
 	
r   c                (   \         P                  p\        P                  ! 4       P	                  R4      p\        P                  ! 4       P                  RV'       * 4       V'       d   \         P                  pV P                  P                  V4       R# )zToggle 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.
rk   T)	r   ZCHAT_ROOM_NAME_PREFIX_ONr
   rp   rq   set_settingZCHAT_ROOM_NAME_PREFIX_OFFrQ   present_message)r   r`   
inputEventlineZspeakRoomName   &&&  r   re   ZChat.togglePrefix  si     00(446BBCVW$$&223FMHYZ55D$$T*r   c                rz   )zToggle 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.
rl   T)	r   ZCHAT_BUDDY_TYPING_ONr
   rp   rq   r{   ZCHAT_BUDDY_TYPING_OFFrQ   r|   )r   r`   r}   r~   ZannounceTypingr   r   rf   ZChat.toggleBuddyTyping  sk     ,,)557CCD]^$$&22%>'9	;11D$$T*r   c                rz   )zToggle 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.
rm   T)	r   ZCHAT_SEPARATE_HISTORIES_ONr
   rp   rq   r{   ZCHAT_SEPARATE_HISTORIES_OFFrQ   r|   )r   r`   r}   r~   ZroomHistoriesr   r   rg   ZChat.toggleMessageHistories  si     22(446BBCVW$$&223FMHYZ77D$$T*r   Nc                s8    V P                   P                  VP                  4      pV P                  V^,           ,
          pRRre\
        P                  ! 4       P                  R4      '       dY   V P                  \        P                  ! 4       P                  4       4      pV'       d   VP                  V4      pVP                  pMV P                  P                  V4      w  rVV'       d   V'       d   V P                  WeR4       R# R# R#   \         d     Li ; i)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 keyval_name with respect
  to self.messageKeys is used instead.
Nrm   T)rR   indexZkeyval_namerM   rC   r
   rp   rq   getConversationr   Zget_locus_of_focusr;   r1   rY   rI   utterMessage)r   r`   r}   r   r:   r9   chatRoomNamerF      &&&&    r   rh   ZChat.readPreviousMessage
  s    	$$**:+A+ABE ..%!)< $d'')556IJJ//0I0I0K0^0^0`aL&44]C+00 &&;;MJ "G |lT: $7  		s   %D DDc                s~   \         P                  ! 4       P                  V P                  P                  R4      p\
        P                  ! 4       P                  4       pVe=   VP                  V P                  P                  8w  d   V\        P                  8X  d   R# V'       g   V\        P                  8X  d   R# RpV'       dW   \         P                  ! 4       P                  V P                  P                  R4      '       d   \        P                  V,          p\        P                  '       g	   V RV 2pMV RV 2p\        VP                  4       4      '       dC   V P                  P                   P#                  VR7      pV P                  P%                  WgR7       V P                  P'                  V4       R# )a1  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.
rn   Nr&   rk   Z Zstringvoice)r
   rp   Zget_app_settingrQ   ru   r   Zget_active_scriptr1   r	   rv   rs   r   ZCHAT_MESSAGE_FROM_ROOMZpresentChatRoomLastrK   stripspeech_generatorr   speak_messageZdisplay_message)r   r   r9   focusedrx   r`   textr   r   r   r   ZChat.utterMessage*  sC    %002BBLL46	++-??A&++1B1B"BH>>>Y(*M*MM'')99$,,:J:JL_``22\AD+++V1WI&DYav&Dtzz|LL1177t7DELL&&t&9$$T*r   c                s    VP                   # )aI  Get 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   eventr   r   getMessageFromEventZChat.getMessageFromEventP  s     ~~r   c                sj   V'       d4   VP                   P                  R4      '       d   VP                  '       g   R# V P                  VP                  4      '       d   R# V P                  VP                  4      '       d   R# V P                  V4      '       d   V P                  WP                  4       R# V P                  VP                  4      '       d   V P                  VP                  4      '       d2   V P                  VP                  4      p\        W!P                  4      pM'V P                  VP                  4      pVP                  pV P                  V4      P                  R4      pV'       d   V P!                  WC4       V P#                  VP                  4      pV'       d   RpV'       d   V P%                  W$V4       R# V P'                  V4      '       dQ   VP                  pV P(                  P*                  P-                  VR7      pV P(                  P/                  WgR7       R# R# )a  Gives 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.
zobject:text-changed:insertFTZ
r&   r   r   )ZtypeZ
startswithr   isGenericTextObjectsourceisInBuddyListisTypingStatusChangedEventpresentTypingStatusChangeisChatRoomMsgisNewConversationgetChatRoomNamer0   r   r1   r   r   addMessageToHistoryisFocusedChatr   isAutoCompletedTextEventrQ   r   r   r   )r   r   r1   rF   r9   r   r   r   s   &&      r   presentInsertedTextZChat.presentInsertedText]  s    **''(DEE...##ELL11 ell++ **511**5..Aell++%%ell33++ELL9+D,,?#33ELLA#((..u5;;DAG((?
 ((6G!!$9((//>>DLL1177t7DELL&&t&9r   c                sr   \         P                  ! 4       P                  R4      '       d   V P                  VP                  4      pV'       dj   W#P                  4       8w  dV   V P                  P                  P                  VR7      pV P                  P                  W$R7       VP                  V4       R# R# )a  Presents 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
rl   r   r   TF)r
   rp   rq   r   r   r=   rQ   r   r   r   r?   )r   r   r>   rF   r   r   r   r   ZChat.presentTypingStatusChange  s     '')556OPP//=L+G+G+I!I55;;6;J**6*?,,V4r   c                s^    VP                  V4       V P                  P                  W4       R# )a  Adds 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)r6   rY   )r   r9   rF   s   &&&r   r   ZChat.addMessageToHistory  s&     	())'@r   c                sj    \         P                  ! V4      ;'       d    \         P                  ! V4      # )zReturns 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_editableZis_single_liner   objr   r   r   ZChat.isGenericTextObject  s(     &&s+OO0J0J30OOr   c                s   \         P                  ! V\        P                  4      pV'       g   R# \        P                  ! V4      ;'       g5    \        P
                  ! V4      ;'       g    \        P                  ! V4      # )z5Returns True if obj is a list-like scrollable widget.F)r   find_ancestorr   is_scroll_paneZis_tree_or_tree_tableZis_list_boxZis_list)r   r   Zscroll_paner   r   _is_scrollable_listZChat._is_scrollable_list  sj     ,,S+2L2LM005 H H&&s+H H/:/B/B3/G	Hr   c                s    V P                  V4      '       g   R# \        P                  ! V\        P                  4      f   R# RVR.p\
        P                  ! \
        P                  VR4       R# )z5Returns True if obj is believed to be the buddy list.FzCHAT:zbelieved to be buddy list.T)r   r   r   r   is_framer   print_tokens
LEVEL_INFO)r   r   tokensr   r   isBuddyListZChat.isBuddyList  s\     '',,!!#{';';<D3 <=5++VT:r   c                s    V'       d   V P                  V4      '       d   R# \        P                  ! WP                  4      pVf   R# V P                  V4      # )z8Returns True if obj is, or is inside of, the buddy list.TF)r   r   r   r   )r   r   ZincludeListZ
buddy_listrG   r   r   ZChat.isInBuddyList  sJ     4++C00,,S2J2JK

++r   c                sd    V P                  V4      pV P                  P                  V4      '       * # )zReturns True if the given accessible is the chat history
associated with a new conversation.

Arguments:
- obj: the accessible object to examine.
)r   rY   rD   )r   r   rF   r   r   r   ZChat.isNewConversation  s.     ++C0))99,GGGr   c                s   V'       g   R# Rp\         P                  ! V4      '       g   \         P                  ! V4      '       d.   \         P                  ! V4      '       d   V P	                  V4      pV P
                  P                   F5  pV'       d   W#P                  8X  d   Vu # K!  WP                  8X  g   K3  Vu # 	  R# )zAttempts to locate the conversation associated with obj.

Arguments:
- obj: the accessible of interest

Returns the conversation if found; None otherwise
Nr&   )	r   is_textZis_entryr   r   rY   rA   r1   r2   )r   r   r1   rF   rH   r   r   ZChat.getConversation  s      $$(<(<S(A(A&&s++'',D 22@@L,,,'' -///## A r   c                s   \         P                  ! V4      '       dj   \         P                  ! \        P                  ! V4      4      '       d:   \         P
                  ! V4      '       * ;'       d    \         P                  ! V4      # R# )zReturns True if the given accessible is the text object for
associated with a chat room conversation.

Arguments:
- obj: the accessible object to examine.
F)r   r   r   r   Z
get_parentr   Zis_multi_liner   r   r   r   ZChat.isChatRoomMsg$  s\     s##(B(B8CVCVWZC[(\(\"..s33VV8Q8QRU8VVr   c                s:   \         P                  ! V4      '       dT   V P                  P                  P	                  V4      pRVRV.p\
        P                  ! \
        P                  VR4       V# RVR.p\
        P                  ! \
        P                  VR4       R# )zReturns 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.
zINFO:z's window is focused chat:Tz!is not focused chat (not showing)F)r   Z
is_showingrQ   Z	utilitiesZ&top_level_object_is_active_and_currentr   r   r   )r   r   Zactiver   rH   r   r   ZChat.isFocusedChat0  s     !!#&&\\++RRSVWFs$@&IFu//>M3 CD5++VT:r   c                st    R p\         P                  ! W4      pV'       d   \         P                  ! V4      # R# )zAttempts 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                 s    \         P                  ! V 4      '       g   \         P                  ! V 4      '       g   R # \        \        P
                  ! V 4      4      # )F)r   Zis_page_tabr   Zboolr   rt   )r   r    r   predZ"Chat.getChatRoomName.<locals>.predQ  s<    ++A..+2F2Fq2I2I))!,--r   r&   )r   r   rt   )r   r   r   ZancestorrH   r   r   ZChat.getChatRoomNameC  s0    	.
 ))#4$$X..r   c                s    \         P                  ! VP                  4      '       g   R# \        P                  ! 4       P                  4       '       d&   VP                  '       d   VP                  R8w  d   R# R# )z|Returns True if event is associated with text being autocompleted.

Arguments:
- event: the accessible event being examined
FZ	T)r   r   r   r   rp   Zlast_event_was_tabr   r   r   r   r   ZChat.isAutoCompletedTextEvent[  sN     ""5<<00**,??AA~~~%..D"8r   c                s    R# )z}Returns True if event is associated with a change in typing status.

Arguments:
- event: the accessible event being examined
F r   r   r   r   ZChat.isTypingStatusChangedEventk  s     r   )rY   rQ   r[   r\   r]   r^   rZ   rU   rX   rT   rR   rC   r_   )Nr   )T) r(   r)   r*   r+   __doc__r   rV   rW   rw   ry   re   rf   rg   rh   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r,   r-   r.   r/   r   rO   rO     s     I)>2"HCJ
.$$";@$+L?B*A(PH 
,	H D
&0  r   rO   N)r   Z__id__Z__version__Z__date__Z__copyright__Z__license__r&   r    r   r   r   r   r   r   r   r   r	   r
   Z	ax_objectr   Zax_utilitiesr   r   r0   r@   rO   r   r   r   <module>r      s{   ( '	7    !         %!& !&RE$ E$Zi ib]	 ]	r   