
    g
f                         d Z dZdZdZdZddlZ ej                  dd       dd	lmZ dd
l	m
Z
 ddlmZ  G d de
j                        Zy)z$Id$z
$Revision$z$Date$zCopyright (c) 2019 Igalia, S.L.LGPL    NAtspiz2.0)r   )script_utilities)AXObjectc                   0     e Zd Z fdZd Zd Zd Z xZS )	Utilitiesc                 $    t         |   |       y )N)super__init__)selfscript	__class__s     H/usr/lib/python3/dist-packages/orca/scripts/switcher/script_utilities.pyr   zUtilities.__init__%   s         c                 j    |xr0 t        j                  |      t        j                  j                  k(  S )z.Returns True if obj is the switcher container.)r   get_roler   Role
STATUS_BAR)r   objs     r   isSwitcherContainerzUtilities.isSwitcherContainer(   s)     Fx((-1F1FFFr   c                     |j                   j                  d      ry|j                   j                  d      r|j                  S y)z@Returns True if this event is the one we use to present changes.zobject:text-changed:insertTzobject:state-changed:showingF)type
startswithdetail1)r   events     r   "isSwitcherSelectionChangeEventTypez,Utilities.isSwitcherSelectionChangeEventType-   s:     ::  !=>::  !?@== r   c                 P    | j                  |      rt        j                  |      S y)z0Returns the name of the currently-selected item. )r   r   get_name)r   	containers     r   getSelectionNamezUtilities.getSelectionName8   s&     ##I.$$Y//r   )__name__
__module____qualname__r   r   r   r!   __classcell__)r   s   @r   r   r   #   s    !G
	r   r   )__id____version____date____copyright____license__girequire_versiongi.repositoryr   orcar   orca.ax_objectr   r    r   r   <module>r1      sQ   * 1 	   7E "  ! # ** r   