
    ȡcR                     d   d Z ddlmZ ddlmZmZ dZ G d dej                  Zd Z	 G d d	ej                  Z
d
 Z G d dej                  Zd Z G d dej                  Zd Z G d dej                  Zd Z G d dej                  Zd Z G d dej                  Zd Zd ZdS )a  Xinerama - provide access to the Xinerama extension information.

There are at least there different - and mutually incomparable -
Xinerama extensions available. This uses the one bundled with XFree86
4.6 and/or Xorg 6.9 in the ati/radeon driver. It uses the include
files from that X distribution, so should work with it as well.  I
provide code for the lone Sun 1.0 request that isn't part of 1.1, but
this is untested because I don't have a server that implements it.

The functions loosely follow the libXineram functions. Mostly, they
return an rq.Struct in lieue of passing in pointers that get data from
the rq.Struct crammed into them. The exception is isActive, which
returns the state information - because that's what libXinerama does.    )X)rqstructsXINERAMAc                      e Zd Z ej         ej        d           ej        d           ej                     ej        d           ej        d           ej        d                    Z	 ej         ej
                     ej        d           ej        d           ej                     ej        d           ej        d           ej        d                    Zd	S )
QueryVersionopcoder   major_versionminor_version      sequence_number   N)__name__
__module____qualname__r   StructCard8OpcodeRequestLengthPad_request	ReplyCodeCard16ReplyLength_reply     T/var/www/api.educacionweb.es/myenv/lib/python3.11/site-packages/Xlib/ext/xinerama.pyr   r   *   s        ry	!!!!!q		
 
H RYBLNNBF1IIBI'((BNBIo&&BIo&&BF2JJ FFFr   r   c                 l    t          | j        | j                            t                    dd          S )Nr   )displayr	   r
   r   )r   r!   get_extension_majorextnameselfs    r   query_versionr&   >   s6    #|??HH&'&') ) ) )r   c            
       p   e Zd Z ej         ej        d           ej        d           ej                     ej        d                    Z	 ej         ej
                     ej        d           ej        d           ej                     ej        d           ej        d                    ZdS )GetStater	   r   windowstater   r   N)r   r   r   r   r   r   r   r   Windowr   r   Boolr   r   r   r   r   r   r   r(   r(   E   s        ry	!	(	
 
H RY	#$$	(r


 
FFFr   r(   c                 t    t          | j        | j                            t                    | j                  S N)r!   r	   r)   )r(   r!   r"   r#   idr$   s    r   	get_stater0   U   s5    DL<;;GDD7   r   c            
       p   e Zd Z ej         ej        d           ej        d           ej                     ej        d                    Z	 ej         ej
                     ej        d           ej        d           ej                     ej        d           ej        d                    ZdS )GetScreenCountr	   r   r)   screen_countr   r   N)r   r   r   r   r   r   r   r   r+   r   r   r   r   r   r   r   r   r   r2   r2   \   s        ry	!	(	
 
H RY  	#$$	(r


 
FFFr   r2   c                 t    t          | j        | j                            t                    | j                  S r.   )r2   r!   r"   r#   r/   r$   s    r   get_screen_countr5   l   s5    $,!%!A!A'!J!J!%   r   c                      e Zd Z ej         ej        d           ej        d           ej                     ej        d           ej	        d                    Z
 ej         ej                     ej        d           ej        d           ej	        d           ej	        d           ej	        d	           ej        d           ej	        d           ej        d
          	  	        ZdS )GetScreenSizer	      r)   screenr   r   lengthwidthheight   N)r   r   r   r   r   r   r   r   r+   Card32r   r   r   r   r   r   r   r   r7   r7   s   s        ry	!	(	(
 
H RYq			#$$	(	'	(	(	(q		

 

FFFr   r7   c                 v    t          | j        | j                            t                    | j        |          S )z+Returns the size of the given screen number)r!   r	   r)   r9   )r7   r!   r"   r#   r/   )r%   	screen_nos     r   get_screen_sizerA      s8     $ @ @ I I $ )   r   c            
       R   e Zd Z ej         ej        d           ej        d           ej                              Z ej         ej	                     ej
        d           ej        d           ej                     ej        d           ej
        d                    ZdS )IsActiver	      r   r   r*   r   N)r   r   r   r   r   r   r   r   r   r   r   r   r   r>   r   r   r   r   rC   rC      s        ry	!
 
H
 RYq			#$$	'r


 
FFFr   rC   c                 v    t          | j        | j                            t                              }|j        S N)r!   r	   )rC   r!   r"   r#   r*   )r%   rs     r   	is_activerH      s6    88AA	 	 	A 7Nr   c                   |   e Zd Z ej         ej        d           ej        d           ej                              Z ej         ej	                     ej
        d           ej        d           ej                     ej        d           ej
        d           ej        dej                            ZdS )	QueryScreensr	      r   r   numberr   screensN)r   r   r   r   r   r   r   r   r   r   r   r   r   r>   Listr   	Rectangler   r   r   r   rJ   rJ      s        ry	!
 
H
 RYq			#$$	(r

	7,--
 
FFFr   rJ   c                 h    t          | j        | j                            t                              S rF   )rJ   r!   r"   r#   r$   s    r   query_screensrQ      s0    #|??HH   r   c            	       R   e Zd Z ej         ej        d           ej        d           ej                     ej        d                    Z	 ej         ej
                     ej        d           ej        d           ej                     ej        d                    ZdS )GetInfor	   rD   visualr   r   r)   N)r   r   r   r   r   r   r   r   r>   r   r   r   r   r   r+   r   r   r   r   rS   rS      s        ry	!	(	
 
H RYq			#$$	(
 
FFFr   rS   c                 n    t          | j        | j                            t                    |          }d S )N)r!   r	   rT   )rS   r!   r"   r#   )r%   rT   rG   s      r   get_inforV      s4    L44W==	 	 	AAAr   c                    |                      ddt                     |                      ddt                     |                      ddt                     |                      ddt                     |                      ddt
                     |                      ddt                     |                      dd	t                     d S )
Nr!   xinerama_query_versionr)   xinerama_get_statexinerama_get_screen_countxinerama_get_screen_sizexinerama_is_activexinerama_query_screensxinerama_get_info)extension_add_methodr&   r0   r5   rA   rH   rQ   rV   )dispinfos     r   initrb      s    i)A=QQQh(<iHHHh(CEUVVVh(BOTTTi)=yIIIi)A=QQQi)<hGGGGGr   N)__doc__Xlibr   Xlib.protocolr   r   r#   ReplyRequestr   r&   r(   r0   r2   r5   r7   rA   rC   rH   rJ   rQ   rS   rV   rb   r   r   r   <module>rg      s  *I I       % % % % % % % %
    2?   () ) )
 
 
 
 
r 
 
 
   
 
 
 
 
R_ 
 
 
   
 
 
 
 
BO 
 
 
(  
 
 
 
 
r 
 
 
  
 
 
 
 
2? 
 
 
   
 
 
 
 
bo 
 
 
   
H H H H Hr   