
    1f                     8    d dl Z  G d de      Z G d de      Zy)    Nc                       e Zd Zd Zy)
_ELessListc                 N    	 t         j                  | |      S # t        $ r Y y w xY wN)list__getitem__
IndexError)selfindexs     2/usr/lib/python3/dist-packages/pyatspi/appevent.pyr   z_ELessList.__getitem__   s,    $#//e<<! $#$s    	$$N)__name__
__module____qualname__r        r   r   r      s    	$r   r   c                   B    e Zd ZdZdZd ZddZed        Zed        Z	y)		EventTypea  
        Wraps the AT-SPI event type string so its components can be accessed 
        individually as klass (can't use the keyword class), major, minor, and detail 
        (klass_major_minor_detail).

        @note: All attributes of an instance of this class should be considered 
                public readable as it is acting a a struct.
        @ivar klass: Most general event type identifier (object, window, mouse, etc.)
        @type klass: string
        @ivar major: Second level event type description
        @type major: string
        @ivar minor: Third level event type description
        @type minor: string
        @ivar detail: Lowest level event type description
        @type detail: string
        @ivar name: Full, unparsed event name as received from AT-SPI
        @type name: string
        @cvar format: Names of the event string components
        @type format: 4-tuple of string
        :c                 2   |j                  | j                        }|j                  | j                  d      }t        |      | _        | j                  d   | _        | j                  d   | _        | j                  d   | _        | j                  d   | _        y)a  
                Parses the full AT-SPI event name into its components
                (klass:major:minor:detail). If the provided event name is an integer
                instead of a string, then the event is really a device event.

                @param name: Full AT-SPI event name
                @type name: string
                @raise AttributeError: When the given event name is not a valid string 
                   r         N)	strip
_SEPARATORsplitr   
_separatedklassmajorminordetail)r
   namestripped	separateds       r   __init__zEventType.__init__0   sv      ::doo6$NN4??A>	",Y"7!__Q/
!__Q/
!__Q/
"ooa0r   c                    |j                   r|j                   | j                   k7  ry|j                  r|j                  | j                  k7  ry|j                  r|j                  | j                  k7  ry|rL|j                   | j                   k(  r3|j                  | j                  k(  r|j                  | j                  k(  ryy)zq
                Determines if the passed event type is a subtype
                of this event.
                FT)r   r   r   )r
   
event_typeexcludeSelfs      r   
is_subtypezEventType.is_subtypeC   s    
 ##
(8(8TZZ(G$%++
0@0@DJJ0N',#-#3#3
8H8HDJJ8V/4J$4$4

$B"((DJJ6:;K;Ktzz;Y$r   c                     t        |       S r   strr
   s    r   r!   zEventType.nameU       4y r   c                     t        |       S r   r*   r,   s    r   valuezEventType.valueY   r-   r   N)F)
r   r   r   __doc__r   r$   r(   propertyr!   r/   r   r   r   r   r      s@    	* 
	1&	$ 
	! 
	! 
	! 
	!r   r   )stringr   r   r+   r   r   r   r   <module>r3      s$    $ $C! C!r   