
    ^h                     ~   S r SSKJr  SSKJrJr  Sr " S S\R                  5      rS r	 " S S	\R                  5      r
S
 r " S S\R                  5      rS r " S S\R                  5      rS r " S S\R                  5      rS r " S S\R                  5      rS r " S S\R                  5      rS rS rg)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                      \ rS rSr\R
                  " \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      \R                  " S5      \R                  " S5      5      r
\R
                  " \R                  " 5       \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      \R                  " S5      \R                  " S	5      5      rS
rg)QueryVersion*   opcoder   major_versionminor_version      sequence_number    N)__name__
__module____qualname____firstlineno__r   StructCard8OpcodeRequestLengthPad_request	ReplyCodeCard16ReplyLength_reply__static_attributes__r       C/var/www/html/env/lib/python3.13/site-packages/Xlib/ext/xinerama.pyr   r   *   s    yy

		!

!
!
q	
H YYLLNFF1III'(NNIIo&IIo&FF2JFr!   r   c                 h    [        U R                  U R                  R                  [        5      SSS9$ )Nr   )displayr
   r   r   )r   r$   get_extension_majorextnameselfs    r"   query_versionr)   >   s-    #||??H&'&') )r!   c            
          \ rS rSr\R
                  " \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      5      r
\R
                  " \R                  " 5       \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      \R                  " S5      5      rSrg	)
GetStateE   r
   r   windowstater   r   r   N)r   r   r   r   r   r   r   r   r   Windowr   r   Boolr   r   r   r   r    r   r!   r"   r+   r+   E   s    yy

		!

		(	
H YY


		#$

		(
r

Fr!   r+   c                 z    [        U R                  U R                  R                  [        5      U R                  S9$ N)r$   r
   r-   )r+   r$   r%   r&   idr'   s    r"   	get_stater4   U   s.    DLL<<;;GD77 r!   c            
          \ rS rSr\R
                  " \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      5      r
\R
                  " \R                  " 5       \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      \R                  " S5      5      rSrg	)
GetScreenCount\   r
   r   r-   screen_countr   r   r   N)r   r   r   r   r   r   r   r   r   r/   r   r   r   r   r   r   r    r   r!   r"   r6   r6   \   s    yy

		!

		(	
H YY

 
		#$

		(
r

Fr!   r6   c                 z    [        U R                  U R                  R                  [        5      U R                  S9$ r2   )r6   r$   r%   r&   r3   r'   s    r"   get_screen_countr:   l   s.    $,,!%!A!A'!J!% r!   c                   0   \ rS rSr\R
                  " \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      \R                  " S5      5      r\R
                  " \R                  " 5       \R                  " S5      \R                  " S5      \R                  " S5      \R                  " S	5      \R                  " S
5      \R                  " S5      \R                  " S5      \R                  " S5      5	      rSrg)GetScreenSizes   r
      r-   screenr   r   lengthwidthheight   r   N)r   r   r   r   r   r   r   r   r   r/   Card32r   r   r   r   r   r    r   r!   r"   r<   r<   s   s    yy

		!

		(
		(
H YY

q	
		#$
		(
		'
		(
		(
		(
q	

Fr!   r<   c                 |    [        U R                  U R                  R                  [        5      U R                  US9$ )z+Returns the size of the given screen number)r$   r
   r-   r?   )r<   r$   r%   r&   r3   )r(   	screen_nos     r"   get_screen_sizerG      s1     $ @ @ I $ ) r!   c            
          \ rS rSr\R
                  " \R                  " S5      \R                  " S5      \R                  " 5       5      r	\R
                  " \R                  " 5       \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      \R                  " S5      5      rSrg	)
IsActive   r
      r   r   r.   r   r   N)r   r   r   r   r   r   r   r   r   r   r   r   r   r   rD   r   r    r   r!   r"   rI   rI      s    yy

		!

H
 YY

q	
		#$

		'
r

Fr!   rI   c                 |    [        U R                  U R                  R                  [        5      S9nUR                  $ N)r$   r
   )rI   r$   r%   r&   r.   )r(   rs     r"   	is_activerO      s/    88A	A 77Nr!   c                      \ rS rSr\R
                  " \R                  " S5      \R                  " S5      \R                  " 5       5      r	\R
                  " \R                  " 5       \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      \R                  " S5      \R                  " S\R"                  5      5      rS	rg
)QueryScreens   r
      r   r   numberr   screensr   N)r   r   r   r   r   r   r   r   r   r   r   r   r   r   rD   Listr   	Rectangler   r    r   r!   r"   rQ   rQ      s    yy

		!

H
 YY

q	
		#$

		(
r

	7,,-
Fr!   rQ   c                 d    [        U R                  U R                  R                  [        5      S9$ rM   )rQ   r$   r%   r&   r'   s    r"   query_screensrY      s'    #||??H r!   c            	          \ rS rSr\R
                  " \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      5      r
\R
                  " \R                  " 5       \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      5      rSrg	)
GetInfo   r
   rK   visualr   r   r-   r   N)r   r   r   r   r   r   r   r   r   rD   r   r   r   r   r   r/   r   r    r   r!   r"   r[   r[      s    yy

		!

		(	
H YY

q	
		#$

		(
Fr!   r[   c                 h    [        U R                  U R                  R                  [        5      US9ng )N)r$   r
   r]   )r[   r$   r%   r&   )r(   r]   rN   s      r"   get_infor_      s'    LL44W=	Ar!   c                 F   U R                  SS[        5        U R                  SS[        5        U R                  SS[        5        U R                  SS[        5        U R                  SS[
        5        U R                  SS[        5        U R                  SS	[        5        g )
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)   r4   r:   rG   rO   rY   r_   )dispinfos     r"   initrk      s    i)A=Qh(<iHh(CEUVh(BOTi)=yIi)A=Qi)<hGr!   N)__doc__Xlibr   Xlib.protocolr   r   r&   ReplyRequestr   r)   r+   r4   r6   r:   r<   rG   rI   rO   rQ   rY   r[   r_   rk   r   r!   r"   <module>rp      s   *I  %
2?? ()
r 
 
R__ 
 
BOO 
(
r 

2?? 
 
boo 
 
Hr!   