
    i                     r   d 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y)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 lieu 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.    )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y	)
QueryVersionopcoder   major_versionminor_version      sequence_number   N)__name__
__module____qualname__r   StructCard8OpcodeRequestLengthPad_request	ReplyCodeCard16ReplyLength_reply     [/home/obispo/Crisostomo_bridge/mision_env/lib/python3.12/site-packages/Xlib/ext/xinerama.pyr   r   +   s    ryy		!!!q	
H RYYBLLNBFF1IBII'(BNNBIIo&BIIo&BFF2JFr   r   c                 n    t        | j                  | j                  j                  t              dd      S )Nr   )displayr   r	   r
   )r   r    get_extension_majorextnameselfs    r   query_versionr%   ?   s-    #||??H&'&') )r   c            
          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y)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'   F   s    ryy		!		(	
H RYY		#$		(r

Fr   r'   c                     t        | j                  | j                  j                  t              | j                        S N)r    r   r(   )r'   r    r!   r"   idr#   s    r   	get_stater/   V   s.    DLL<<;;GD77 r   c            
          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y)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   r1   r1   ]   s    ryy		!		(	
H RYY 		#$		(r

Fr   r1   c                     t        | j                  | j                  j                  t              | j                        S r-   )r1   r    r!   r"   r.   r#   s    r   get_screen_countr4   m   s.    $,,!%!A!A'!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y)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   r6   r6   t   s    ryy		!		(		(
H RYYq			#$		(		'		(		(		(q	

Fr   r6   c                     t        | j                  | j                  j                  t              | j                  |      S )z+Returns the size of the given screen number)r    r   r(   r8   )r6   r    r!   r"   r.   )r$   	screen_nos     r   get_screen_sizer@      s1     $ @ @ I $ ) r   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            Zy)IsActiver      r   r   r)   r   N)r   r   r   r   r   r   r   r   r   r   r   r   r   r=   r   r   r   r   rB   rB      s    ryy		!
H
 RYYq			#$		'r

Fr   rB   c                     t        | j                  | j                  j                  t                    }|j                  S N)r    r   )rB   r    r!   r"   r)   )r$   rs     r   	is_activerG      s/    88A	A 77Nr   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y)	QueryScreensr      r   r   numberr   screensN)r   r   r   r   r   r   r   r   r   r   r   r   r   r=   Listr   	Rectangler   r   r   r   rI   rI      s    ryy		!
H
 RYYq			#$		(r
	7,,-
Fr   rI   c                 j    t        | j                  | j                  j                  t                    S rE   )rI   r    r!   r"   r#   s    r   query_screensrP      s'    #||??H r   c            	       |   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y)GetInfor   rC   visualr   r   r(   N)r   r   r   r   r   r   r   r   r=   r   r   r   r   r   r*   r   r   r   r   rR   rR      s    ryy		!		(	
H RYYq			#$		(
Fr   rR   c                 n    t        | j                  | j                  j                  t              |      }y )N)r    r   rS   )rR   r    r!   r"   )r$   rS   rF   s      r   get_inforU      s'    LL44W=	Ar   c                 F   | j                  ddt               | j                  ddt               | j                  ddt               | j                  ddt               | j                  ddt
               | j                  ddt               | j                  dd	t               y )
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%   r/   r4   r@   rG   rP   rU   )dispinfos     r   initra      s    i)A=Qh(<iHh(CEUVh(BOTi)=yIi)A=Qi)<hGr   N)__doc__Xlib.protocolr   r   r"   ReplyRequestr   r%   r'   r/   r1   r4   r6   r@   rB   rG   rI   rP   rR   rU   ra   r   r   r   <module>re      s   .I &
2?? ()
r 
 
R__ 
 
BOO 
(
r 

2?? 
 
boo 
 
Hr   