
    ȡcR}                     0   d dl mZ d dlmZ  G d de          Z G d de          Z G d de          Z G d	 d
e          Z G d de          Z	 G d de          Z
 G d de          Z G d dej        e          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d d e          Z G d! d"e          Z G d# d$e          Z G d% d&e          Z G d' d(e          Z G d) d*e          Z G d+ d,e          Z G d- d.e          Z G d/ d0e          Z G d1 d2e          Z G d3 d4e          Z G d5 d6e          Zi ej        eej        eej        eej        eej        eej        eej        eej        eej        eej        eej        eej        eej        eej        eej        eej        eej        eZ  G d7 d8          Z!d9S ):    )X)rqc                       e Zd Zd Zd ZdS )DisplayErrorc                     || _         d S Ndisplay)selfr
   s     M/var/www/api.educacionweb.es/myenv/lib/python3.11/site-packages/Xlib/error.py__init__zDisplayError.__init__   s        c                     d| j         z  S )NzDisplay error "%s"r	   r   s    r   __str__zDisplayError.__str__   s    #dl22r   N__name__
__module____qualname__r   r    r   r   r   r      s2          3 3 3 3 3r   r   c                       e Zd Zd ZdS )DisplayNameErrorc                     d| j         z  S )NzBad display name "%s"r	   r   s    r   r   zDisplayNameError.__str__"   s    &55r   N)r   r   r   r   r   r   r   r   r   !   s#        6 6 6 6 6r   r   c                       e Zd Zd Zd ZdS )DisplayConnectionErrorc                 "    || _         || _        d S r   r
   msg)r   r
   r   s      r   r   zDisplayConnectionError.__init__&   s    r   c                 &    d| j         d| j        S )NzCan't connect to display "z": r   r   s    r   r   zDisplayConnectionError.__str__*   s     7;|||TXXNNr   Nr   r   r   r   r   r   %   s7          O O O O Or   r   c                       e Zd Zd Zd ZdS )ConnectionClosedErrorc                     || _         d S r   whom)r   r$   s     r   r   zConnectionClosedError.__init__.   s    			r   c                     d| j         z  S )NzDisplay connection closed by %sr#   r   s    r   r   zConnectionClosedError.__str__1   s    049<<r   Nr   r   r   r   r!   r!   -   s2          = = = = =r   r!   c                       e Zd ZdS )
XauthErrorNr   r   r   r   r   r   r'   r'   5             r   r'   c                       e Zd ZdS )XNoAuthErrorNr(   r   r   r   r+   r+   6   r)   r   r+   c                       e Zd ZdS )ResourceIDErrorNr(   r   r   r   r-   r-   8   r)   r   r-   c                   
   e Zd Z ej         ej        d           ej        d           ej        d           ej        d           ej        d           ej        d           ej        d                    Z	d Z
d	 Zd
S )XErrortypecodesequence_numberresource_idminor_opcodemajor_opcode   c                 P    | j                             ||d          \  | _        }d S )N   )rawdict)_fieldsparse_binary_data)r   r
   datas      r   r   zXError.__init__E   s)    <44T7a4PP
DDDr   c                     g }dD ]'}|                     |d| j        |                    (| j        dd                    |          S )N)r1   r3   r2   r5   r4   z = z: z, )appendr<   	__class__join)r   sfs      r   r   zXError.__str__H   s[    2 	5 	5AHH!!!TZ]]34444>>>499Q<<<88r   N)r   r   r   r   StructCard8Card16Card32Padr:   r   r   r   r   r   r/   r/   ;   s        bi&))!&))"#455"=11">22!.11 GQ Q Q9 9 9 9 9r   r/   c                       e Zd Z ej         ej        d           ej        d           ej        d           ej        d           ej        d           ej        d           ej        d                    Z	dS )	XResourceErrorr0   r1   r2   r3   r4   r5   r6   N)
r   r   r   r   rD   rE   rF   ResourcerH   r:   r   r   r   rJ   rJ   P   s        bi&))!&))"#455$]33">22!.11 GGGr   rJ   c                       e Zd ZdS )
BadRequestNr(   r   r   r   rM   rM   Z   r)   r   rM   c                       e Zd ZdS )BadValueNr(   r   r   r   rO   rO   [   r)   r   rO   c                       e Zd ZdS )	BadWindowNr(   r   r   r   rQ   rQ   \   r)   r   rQ   c                       e Zd ZdS )	BadPixmapNr(   r   r   r   rS   rS   ]   r)   r   rS   c                       e Zd ZdS )BadAtomNr(   r   r   r   rU   rU   ^   r)   r   rU   c                       e Zd ZdS )	BadCursorNr(   r   r   r   rW   rW   _   r)   r   rW   c                       e Zd ZdS )BadFontNr(   r   r   r   rY   rY   `   r)   r   rY   c                       e Zd ZdS )BadMatchNr(   r   r   r   r[   r[   a   r)   r   r[   c                       e Zd ZdS )BadDrawableNr(   r   r   r   r]   r]   b   r)   r   r]   c                       e Zd ZdS )	BadAccessNr(   r   r   r   r_   r_   c   r)   r   r_   c                       e Zd ZdS )BadAllocNr(   r   r   r   ra   ra   d   r)   r   ra   c                       e Zd ZdS )BadColorNr(   r   r   r   rc   rc   e   r)   r   rc   c                       e Zd ZdS )BadGCNr(   r   r   r   re   re   f   r)   r   re   c                       e Zd ZdS )BadIDChoiceNr(   r   r   r   rg   rg   g   r)   r   rg   c                       e Zd ZdS )BadNameNr(   r   r   r   ri   ri   h   r)   r   ri   c                       e Zd ZdS )	BadLengthNr(   r   r   r   rk   rk   i   r)   r   rk   c                       e Zd ZdS )BadImplementationNr(   r   r   r   rm   rm   j   r)   r   rm   c                   ,    e Zd Zd Zd Zd Zd Zd ZdS )
CatchErrorc                 0    || _         d | _        d | _        d S r   )error_typeserrorrequest)r   errorss     r   r   zCatchError.__init__   s    !
r   c                     | j         r-| j         D ]#}t          ||          r|| _        || _         dS $dS || _        || _        dS )Nr8   r   )rq   
isinstancerr   rs   )r   rr   rs   etypes       r   __call__zCatchError.__call__   se     	)  eU++ !&DJ#*DL11
 1DJ"DL1r   c                     | j         S r   )rr   r   s    r   	get_errorzCatchError.get_error   s
    zr   c                     | j         S r   )rs   r   s    r   get_requestzCatchError.get_request   s
    |r   c                 "    d | _         d | _        d S r   )rr   rs   r   s    r   resetzCatchError.reset   s    
r   N)r   r   r   r   rx   rz   r|   r~   r   r   r   ro   ro      s_          
          r   ro   N)"Xlibr   Xlib.protocolr   	Exceptionr   r   r   r!   r'   r+   r-   GetAttrDatar/   rJ   rM   rO   rQ   rS   rU   rW   rY   r[   r]   r_   ra   rc   re   rg   ri   rk   rm   xerror_classro   r   r   r   <module>r      sf  (            3 3 3 3 39 3 3 36 6 6 6 6| 6 6 6O O O O O\ O O O= = = = =I = = = " ! ! ! ! ! ! ! # # # # #9 # # # & & & & &i & & &9 9 9 9 9R^Y 9 9 9*    V                v    % % % % % % % % % % % % % % % %     f    % % % % % % % % # # # # #n # # #     v    ' ' ' ' '. ' ' '             v    $ $ $ $ $~ $ $ $ ! ! ! ! !N ! ! ! ' ' ' ' '. ' ' '     f            % % % % % % % %L*J K K	
 Iw K Iw J M; K J J GU M; Iw  K!" *#*         r   