
    J9c                        d Z ddlmZ ddlmZ ddlmZ dZdZdZ	dZ
dZdZdZdZdZd	ZdZdZdZd
ZdZdZdZd	ZdZdZdZdZdZd	ZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1dZ2dZ3dZ4dZ5d
Z6dZ7dZ8dZ9dZ:dZ; G d de      Z< G d d e      Z= G d! d"e      Z> ej~                   ej                  d#       ej                  d$       ej                  d%       ej                  d&            ZA 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.       ej                  d/       ej                  d0       ej                  d1       ej                  d2       ej                  d3            ZC ej~                   ej                  d4d       ej                  d4ej                              ZG ej~                   ej                  d5       ej                  d6       ej                  d7       ej                  d8       ej                  d9       ej                  d:       ej                  d;       ej                  d<       ej                  d=      	      ZH ej~                   ej                  d>       ej                  d?       ej                  d@       ej                  dAd       ej                  dB       ej                  dC       ej                  d#       ej                  d$       ej                  d%       ej                  d&       ej                  dAej                              ZL G dD dEej                        ZNdF ZO G dG dHej                        ZPej                  fdIZR G dJ dKej                        ZSdej                  fdLZT G dM dNej                        ZVdO ZW G dP dQej                        ZXdR ZY G dS dTej                        ZZdU Z[ G dV dWej                        Z\ddYZ] G dZ d[ej                        Z^d\ Z_ G d] d^ej                        Z`d_ Za G d` daej                        Zbdb Zc G dc ddej                        Zdde Ze G df dgej                        Zfdh Zg G di djej                        Zhdk Zi G dl dmej                        Zjdn Zk G do dpej                        ZlddqZm G dr dsej                        Zndt Zo G du dvej                        Zpdw Zq G dx dyej                        Zrdz Zs G d{ d|ej                        Ztd} Zu G d~ dej                        Zvd Zw G d dej                        Zxej                  fdZy G d dej                        Zzd Z{ G d dej                        Z|d Z} G d dej                        Z~d Z G d dej                        Zd Z G d dej                        Zd Z G d dej                        Zd Z G d dej                        Zd Z G d dej                        Zej                  fdZ G d dej                        Zd Z G d dej                        Zd Z G d dej                        ZddZ G d dej                        Zd Z G d dej                        Zd Z G d dej(                        Z G d dej(                        Z G d dej(                        Z G d dej(                        Zd ZyX)a{  RandR - provide access to the RandR extension information.

This implementation is based off version 1.5 of the XRandR protocol, and may
not be compatible with other versions.

Version 1.5 of the protocol is documented at:
http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt

Version 1.3.1 here:
http://www.x.org/releases/X11R7.5/doc/randrproto/randrproto.txt

    )X)rq)XErrorRANDR                      @         i   i   i   i   i    EDIDSignalFormatSignalPropertiesConnectorTypeConnectorNumberCompatibilityList	CloneList   c                       e Zd Zy)BadRROutputErrorN__name__
__module____qualname__     0/usr/lib/python3/dist-packages/Xlib/ext/randr.pyr   r          r    r   c                       e Zd Zy)BadRRCrtcErrorNr   r   r    r!   r$   r$      r"   r    r$   c                       e Zd Zy)BadRRModeErrorNr   r   r    r!   r&   r&      r"   r    r&   width_in_pixelsheight_in_pixelswidth_in_millimetersheight_in_millimetersidwidthheight	dot_clockh_sync_start
h_sync_endh_totalh_skewv_sync_start
v_sync_endv_totalname_lengthflagsratesmatrix11matrix12matrix13matrix21matrix22matrix23matrix31matrix32matrix33nameprimary	automaticcrtcsxyc                      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                          ej                  d       ej                  d       ej                  d            Zy)	QueryVersionopcoder   major_versionminor_versionr   sequence_numberr   N)r   r   r   r   StructCard8OpcodeRequestLengthCard32_request	ReplyCodePadCard16ReplyLength_replyr   r    r!   rI   rI      s    ryy		!		/"		/"
H RYYq			#$		/"		/"r

Fr    rI   c                 n    t        | j                  | j                  j                  t              dd      S )z5Get the current version of the RandR extension.

    r   r   )displayrJ   rK   rL   )rI   rZ   get_extension_majorextnameselfs    r!   query_versionr_      s0     ||//8	
 
r    c                      e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d       ej                  d       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       ej                  d       ej                  d      	      Zy)_1_0SetScreenConfigrJ   r   drawable	timestampconfig_timestampsize_idrotationstatusrM   new_timestampnew_config_timestamprootsubpixel_order
   N)r   r   r   r   rN   rO   rP   rQ   DrawablerR   rV   rS   rT   rW   WindowrU   rX   r   r    r!   ra   ra      s   ryy		!J		+		$%		)		*	
H RYY		#$		/"		()		&		"#r


Fr    ra   c           	      t    t        | j                  | j                  j                  t              | ||||      S )z9Sets the screen to the specified size and rotation.

    )rZ   rJ   rb   rc   rd   re   rf   )ra   rZ   r[   r\   )r^   re   rf   rd   rc   s        r!   _1_0set_screen_configrp      s9     ||//8)
 
r    c                      e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d       ej                  d       ej                  d       ej                  d       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       ej                  d       ej                  d      	      Zy)SetScreenConfigrJ   r   rb   rc   rd   re   rf   raterg   rM   rh   ri   rj   rk   rl   N)r   r   r   r   rN   rO   rP   rQ   rm   rR   rV   rU   rS   rT   rW   rn   rX   r   r    r!   rr   rr     s*   ryy		!J		+		$%		)		*		&q	
H RYY		#$		/"		()		&		"#r


Fr    rr   c           
      v    t        | j                  | j                  j                  t              | |||||      S )zSets the screen to the specified size, rate, rotation and reflection.

    rate can be 0 to have the server select an appropriate rate.

    )rZ   rJ   rb   rc   rd   re   rf   rs   )rr   rZ   r[   r\   )r^   re   rf   rd   rs   rc   s         r!   set_screen_configru     s<     ||//8)	
 	
r    c            
           e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d       ej                  d       ej                  d            Zy)SelectInputrJ   r	   windowmaskr   N)r   r   r   r   rN   rO   rP   rQ   rn   rV   rU   rS   r   r    r!   rw   rw   1  sd    ryy		!		(		&q	
Hr    rw   c                 n    t        | j                  | j                  j                  t              | |      S )N)rZ   rJ   rx   ry   )rw   rZ   r[   r\   )r^   ry   s     r!   select_inputr{   ;  s.    ||//8	
 
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       ej                  d       ej                  d	d
       ej                  d       ej                  d       ej                  d       ej                  d       ej                  d
       ej                   d	e            Zy)GetScreenInforJ   r   rx   set_of_rotationsrM   rj   rc   rd   sizesr   re   rf   rs   n_rate_entsN)r   r   r   r   rN   rO   rP   rQ   rn   rS   rT   rV   rW   rR   LengthOfrU   ListRandR_ScreenSizesrX   r   r    r!   r}   r}   D  s!   ryy		!		(	
H RYY#$		#$		&		+		$%GQ		)		*		&		- q	*+
Fr    r}   c                 l    t        | j                  | j                  j                  t              |       S )zyRetrieve information about the current and available configurations for
    the screen associated with this window.

    rZ   rJ   rx   )r}   rZ   r[   r\   r]   s    r!   get_screen_infor   ]  s-    
 ||//8
 
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       ej                  d       ej                  d	       ej                  d
      	      Zy)GetScreenSizeRangerJ      rx   r   rM   	min_width
min_height	max_width
max_heightr   N)r   r   r   r   rN   rO   rP   rQ   rn   rS   rT   rU   rV   rW   rX   r   r    r!   r   r   k  s    ryy		!		(	
H RYYq			#$		+		,		+		,r


Fr    r   c                 l    t        | j                  | j                  j                  t              |       S )zhRetrieve the range of possible screen sizes. The screen may be set to
	any size within this range.

    r   )r   rZ   r[   r\   r]   s    r!   get_screen_size_ranger   ~  s-    
 ||//8
 
r    c                   <   e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d       ej                  d       ej                  d       ej                  d       ej                  d            Zy)	SetScreenSizerJ      rx   r,   r-   r)   r*   N)r   r   r   r   rN   rO   rP   rQ   rn   rV   rR   rS   r   r    r!   r   r     s    ryy		!		(		'		(		()		)*	
Hr    r   Nc           	      t    t        | j                  | j                  j                  t              | ||||      S )N)rZ   rJ   rx   r,   r-   r)   r*   )r   rZ   r[   r\   )r^   r,   r-   r)   r*   s        r!   set_screen_sizer     s7    ||//813
 
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       ej                  dd	       ej                  d
d	       ej                  dd	       ej                  dd	       ej                  d       ej                   dej"                         ej                   d
ej"                         ej                   de       ej&                  d            Zy)GetScreenResourcesrJ   r
   rx   r   rM   rc   rd   rE   r   outputsmodes
mode_namesNr   r   r   r   rN   rO   rP   rQ   rn   rS   rT   rU   rV   rW   rR   r   r   	Card32ObjRandR_ModeInfoString8rX   r   r    r!   r   r     s>   ryy		!		(	
H RYYq			#$		+		$%GQIq!GQL!$q	&	2<<((

< 
Fr    r   c                 l    t        | j                  | j                  j                  t              |       S Nr   )r   rZ   r[   r\   r]   s    r!   get_screen_resourcesr     s+    ||//8
 
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                          ej                  d       ej                  d       ej                  d	       ej                  d
       ej
                  d       ej
                  d       ej                  dd       ej                  dd       ej                  d       ej                  dd       ej                  dd       ej                  dej                         ej                  dej                         ej                  dej                         ej                   d            Zy)GetOutputInforJ   	   outputrd   rg   rM   rc   crtcmm_width	mm_height
connectionrk   rE   r   r   num_preferredclonesrB   N)r   r   r   r   rN   rO   rP   rQ   rR   rS   rT   rV   rW   r   r   r   r   rX   r   r    r!   r   r     s   ryy		!		(		$%
H RYY		#$		+		&		*		+!"GQGQ		/"Ha FA&&",,'

6'
Fr    r   c                 n    t        | j                  | j                  j                  t              ||      S )N)rZ   rJ   r   rd   )r   rZ   r[   r\   )r^   r   rd   s      r!   get_output_infor     s.    ||//8)	
 
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d       ej                  d       ej                  dej                               Zy	)
ListOutputPropertiesrJ   rl   r   r   rM   atomsr      N)r   r   r   r   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   r   r   r   rX   r   r    r!   r   r     s    ryy		"		(	
H RYYq			#$GQr
&
Fr    r   c                 l    t        | j                  | j                  j                  t              |      S )N)rZ   rJ   r   )r   rZ   r[   r\   r^   r   s     r!   list_output_propertiesr     s+    ||//8
 
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                          ej                  d       ej                  d       ej                  d	       ej                  d
       ej                  dej                         	      Zy)QueryOutputPropertyrJ      r   propertyr   rM   pendingrange	immutable   valid_valuesN)r   r   r   r   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   Boolr   r   rX   r   r    r!   r   r     s    ryy		"		(		*
H RYYq			#$	r
-

Fr    r   c                 n    t        | j                  | j                  j                  t              ||      S N)rZ   rJ   r   r   )r   rZ   r[   r\   r^   r   r   s      r!   query_output_propertyr     s.    ||//8	
 
r    c                   t   e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d       ej                  d       ej                  d       ej                  d       ej                  d       ej                  dej                        	      Zy	)
ConfigureOutputPropertyrJ      r   r   r   r   r   r   N)r   r   r   r   rN   rO   rP   rQ   rR   r   rU   r   r   rS   r   r    r!   r   r      s    ryy		"		(		*	q	-

Hr    r   c                 n    t        | j                  | j                  j                  t              ||      S r   )r   rZ   r[   r\   r   s      r!   configure_output_propertyr   -  s.    "||//8	
 
r    c                      e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d       ej                  d       ej                  d       ej                  dd       ej
                  d       ej                  d	       ej                  dd
       ej                  d            Zy)ChangeOutputPropertyrJ      r   r   typevaluer   moder   r	   N)r   r   r   r   rN   rO   rP   rQ   rR   FormatrU   r   PropertyDatarS   r   r    r!   r   r   6  s    ryy		"		(		*		&		'1q	GQ 
Hr    r   c           	      t    t        | j                  | j                  j                  t              |||||      S )N)rZ   rJ   r   r   r   r   r   )r   rZ   r[   r\   )r^   r   r   r   r   r   s         r!   change_output_propertyr   E  s7    ||//8
 
r    c            	           e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d       ej                  d            Z	y)DeleteOutputPropertyrJ      r   r   N
r   r   r   r   rN   rO   rP   rQ   rR   rS   r   r    r!   r   r   Q  sW    ryy		"		(		*
Hr    r   c                 n    t        | j                  | j                  j                  t              ||      S r   )r   rZ   r[   r\   r   s      r!   delete_output_propertyr   Z  s.    ||//8	
 
r    c                      e Zd Z ej                   ej
                  d       ej                  d       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 ej                   ej                          ej                  dd       ej                  d       ej                          ej                  d       ej                  d       ej                   dd       ej                  d       ej"                  dej$                        	      Zy)GetOutputPropertyrJ      r   r   r   long_offsetlong_lengthdeleter   r   r   r   rM   property_typebytes_afterr	   r   N)r   r   r   r   rN   rO   rP   rQ   rR   r   rU   rS   rT   r   rV   rW   r   r   Card8ObjrX   r   r    r!   r   r   c  s?   ryy		"		(		*		&		- 		- 	q	
H RYY		'1		#$		/"		- GQr
%

Fr    r   c                 x    t        | j                  | j                  j                  t              |||||||	      S )N)	rZ   rJ   r   r   r   r   r   r   r   )r   rZ   r[   r\   )r^   r   r   r   r   r   r   r   s           r!   get_output_propertyr   }  s=    ||//8

 

r    c            
          e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d       ej                  de
       ej                  d            Z ej                   ej                          ej                  d       ej                  d       ej                           ej"                  d       ej                  d            Zy	)

CreateModerJ   r   rx   r   rB   r   rM      N)r   r   r   r   rN   rO   rP   rQ   rn   Objectr   r   rS   rT   rU   rV   rW   rR   rX   r   r    r!   r   r     s    ryy		"		(		&.)

6
H RYYq			#$		&r

Fr    r   c                 p    t        | j                  | j                  j                  t              | ||      S )N)rZ   rJ   rx   r   rB   )r   rZ   r[   r\   )r^   r   rB   s      r!   create_moder     s1    ||//8
 
r    c                       e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d            Z	y)DestroyModerJ      r   Nr   r   r    r!   r   r     sI    ryy		"		&	
Hr    r   c                 l    t        | j                  | j                  j                  t              |      S )N)rZ   rJ   r   )r   rZ   r[   r\   )r^   r   s     r!   destroy_moder     s+    ||//8
 
r    c            	           e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d       ej                  d            Z	y)AddOutputModerJ      r   r   Nr   r   r    r!   r   r     W    ryy		"		(		&
Hr    r   c                 n    t        | j                  | j                  j                  t              ||      S N)rZ   rJ   r   r   )r   rZ   r[   r\   r^   r   r   s      r!   add_output_moder     s.    ||//8	
 
r    c            	           e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d       ej                  d            Z	y)DeleteOutputModerJ      r   r   Nr   r   r    r!   r   r     r   r    r   c                 n    t        | j                  | j                  j                  t              ||      S r   )r   rZ   r[   r\   r   s      r!   delete_output_moder     s.    ||//8	
 
r    c                   D   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                          ej                  d       ej                  d       ej                  d	       ej                  d
       ej                  d       ej                  d       ej                  d       ej                  d       ej                  dd       ej                  dd       ej                  dej                          ej                  dej                               Zy)GetCrtcInforJ   r   r   rd   rg   rM   rc   rF   rG   r,   r-   r   rf   possible_rotationsr   r   possible_outputsN)r   r   r   r   rN   rO   rP   rQ   rR   rS   rT   rV   rW   Int16r   r   r   rX   r   r    r!   r   r     sW   ryy		"		&		$%
H RYY		#$		+		'		(		&		*		&'Iq!&*	2<<("BLL1!
Fr    r   c                 n    t        | j                  | j                  j                  t              ||      S )N)rZ   rJ   r   rd   )r   rZ   r[   r\   )r^   r   rd   s      r!   get_crtc_infor     s.    ||//8)	
 
r    c                      e Zd Z ej                   ej
                  d       ej                  d       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
       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)SetCrtcConfigrJ   r   r   rc   rd   rF   rG   r   rf   r   r   rg   rM   rh   r   N)r   r   r   r   rN   rO   rP   rQ   rR   r   rV   rU   r   r   rS   rT   rW   rX   r   r    r!   r  r    s   ryy		"		&		+		$%		&		*q		2<<(
H RYY		#$		/"r

Fr    r  c	                 z    t        | j                  | j                  j                  t              ||||||||
      S )N)
rZ   rJ   r   rd   rF   rG   r   rf   r   rc   )r  rZ   r[   r\   )	r^   r   rd   rF   rG   r   rf   r   rc   s	            r!   set_crtc_configr    s@    ||//8)


 
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)GetCrtcGammaSizerJ   r   r   rg   rM   sizeN)r   r   r   r   rN   rO   rP   rQ   rR   rS   rT   rV   rW   rU   rX   r   r    r!   r  r  &  s    ryy		"		&	
H RYY		#$		&r

Fr    r  c                 l    t        | j                  | j                  j                  t              |      S N)rZ   rJ   r   )r  rZ   r[   r\   r^   r   s     r!   get_crtc_gamma_sizer  6  +    ||//8
 
r    c                   H   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d       ej                  d       ej                  d	ej                          ej                  d
ej                          ej                  dej                         	      Zy)GetCrtcGammarJ      r   rg   rM   )redgreenbluer   r   r  r  r  N)r   r   r   r   rN   rO   rP   rQ   rR   rS   rT   rV   rW   r   rU   r   	Card16ObjrX   r   r    r!   r  r  >  s    ryy		"		&	
H RYY		#$,a0r
r||$&%

Fr    r  c                 l    t        | j                  | j                  j                  t              |      S r	  )r  rZ   r[   r\   r
  s     r!   get_crtc_gammar  Q  s+    ||//8
 
r    c                      e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d       ej                  d       ej                  d       ej                  dej                         ej                  dej                         ej                  dej                        	      Zy	)
SetCrtcGammarJ      r   r  r   r  r  r  N)r   r   r   r   rN   rO   rP   rQ   rR   rV   rU   r   r  rS   r   r    r!   r  r  Y  s    ryy		"		&		&q	r||$&%

Hr    r  c           	      t    t        | j                  | j                  j                  t              |||||      S )N)rZ   rJ   r   r  r  r  r  )r  rZ   r[   r\   )r^   r   r  r  r  r  s         r!   set_crtc_gammar  f  s7    ||//8
 
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       ej                  dd	       ej                  d
d	       ej                  dd	       ej                  dd	       ej                  d       ej                   dej"                         ej                   d
ej"                         ej                   de       ej&                  d            Zy)GetScreenResourcesCurrentrJ      rx   r   rM   rc   rd   rE   r   r   r   namesr
   Nr   r   r    r!   r  r  t  s>   ryy		"		(	
H RYYq			#$		+		$%GQIq!GQGQq	&	2<<((

7
Fr    r  c                 l    t        | j                  | j                  j                  t              |       S r   )r  rZ   r[   r\   r]   s    r!   get_screen_resources_currentr     s+    $||//8
 
r    c                   x   e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d       ej                  de
       ej                  dd       ej                  d       ej                  d       ej                  dej                        	      Zy)	SetCrtcTransformrJ      r   	transformfilter_namer   filter_paramsN)r   r   r   r   rN   rO   rP   rQ   rR   r   Render_Transformr   rU   r   r   r   rS   r   r    r!   r"  r"    s    ryy		"		&		+/0M1%q	

=!.

Hr    r"  c                 n    t        | j                  | j                  j                  t              ||      S )N)rZ   rJ   r   n_bytes_filter)r"  rZ   r[   r\   )r^   r   r)  s      r!   set_crtc_transformr*    s.    ||//8%	
 
r    c                   L   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       ej                  d       ej                   d       ej                  d	e       ej                   d
       ej"                  dd       ej"                  dd       ej"                  dd       ej"                  dd       ej$                  d       ej&                  dej(                         ej$                  d       ej&                  dej(                              Zy)GetCrtcTransformrJ      r   rg   rM   pending_transformhas_transformsr   current_transformr	   pending_filter_namer   pending_filter_paramscurrent_filter_namecurrent_filter_paramsN)r   r   r   r   rN   rO   rP   rQ   rR   rS   rT   rV   rW   r   r'  r   rU   r   r   r   r   rX   r   r    r!   r,  r,    sh   ryy		"		&	
H RYY		#$		%'78 !q			%'78q	)1-+Q/)1-+Q/

()'6

()'6#
Fr    r,  c                 l    t        | j                  | j                  j                  t              |      S r	  )r,  rZ   r[   r\   r
  s     r!   get_crtc_transformr6    r  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       ej                  d       ej                  d	       ej                  d
       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)
GetPanningrJ      r   rg   rM   rc   lefttopr,   r-   
track_left	track_toptrack_widthtrack_heightborder_left
border_topborder_rightborder_bottomN)r   r   r   r   rN   rO   rP   rQ   rR   rS   rT   rV   rW   r   rX   r   r    r!   r8  r8    sE   ryy		"		&	
H RYY		#$		+		&		%		'		(		,		+		- 		.! !#
Fr    r8  c                 l    t        | j                  | j                  j                  t              |      S r	  )r8  rZ   r[   r\   r
  s     r!   get_panningrE    s+    ||//8
 
r    c                   X   e Zd Z ej                   ej
                  d       ej                  d       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
       ej                  d       ej                  d       ej                  d       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            Zy)
SetPanningrJ      r   rc   r:  r;  r,   r-   r<  r=  r>  r?  r@  rA  rB  rC  rg   rM   rh   r   N)r   r   r   r   rN   rO   rP   rQ   rR   rV   r   rS   rT   rW   rU   rX   r   r    r!   rG  rG    s`   ryy		"		&		+		&		%		'		(		,		+		- 		.! !#
H& RYY		#$		/"r

Fr    rG  c                     t        di d| j                  d| j                  j                  t              d|d|d|d|d|d|d	|d
|d|	d|
d|d|d|d|S )NrZ   rJ   r   r:  r;  r,   r-   r<  r=  r>  r?  r@  rA  border_widthborder_heightrc   r   )rG  rZ   r[   r\   )r^   r   r:  r;  r,   r-   r<  r=  r>  r?  r@  rA  rJ  rK  rc   s                  r!   set_panningrL    s     

||//8
 
 	

 
 
 
 
 
  
 "
  
 
 "
 $
  !
 
r    c            	           e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d       ej                  d            Z
y)SetOutputPrimaryrJ      rx   r   Nr   r   r   r   rN   rO   rP   rQ   rn   rR   rS   r   r    r!   rN  rN  #  sW    ryy		"		(		(
Hr    rN  c                 n    t        | j                  | j                  j                  t              | |      S )N)rZ   rJ   rx   r   )rN  rZ   r[   r\   r   s     r!   set_output_primaryrR  ,  s.    ||//8	
 
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)	GetOutputPrimaryrJ      rx   r   rM   r   r   N)r   r   r   r   rN   rO   rP   rQ   rn   rS   rT   rU   rV   rW   rR   rX   r   r    r!   rT  rT  5  s    ryy		"		(	
H RYYq			#$		(r

Fr    rT  c                 l    t        | j                  | j                  j                  t              |       S r   )rT  rZ   r[   r\   r]   s    r!   get_output_primaryrW  E  s+    ||//8
 
r    c                   L   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	d
       ej                  d       ej                  d       ej"                  d	e      	      Zy)GetMonitorsrJ   *   rx   	is_activer   r   rM   rc   monitorsr	   r   r   N)r   r   r   r   rN   rO   rP   rQ   rn   r   rU   rS   rT   rV   rW   rR   r   r   MonitorInforX   r   r    r!   rY  rY  O  s    ryy		"		(q	H RYYq			#$		+J"		)r

K(
Fr    rY  c                 n    t        | j                  | j                  j                  t              | |      S )N)rZ   rJ   rx   r[  )rY  rZ   r[   r\   )r^   r[  s     r!   get_monitorsr_  f  s.    ||//8	 r    c            
           e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d       ej                  de
            Zy)
SetMonitorrJ   +   rx   monitor_infoN)r   r   r   r   rN   rO   rP   rQ   rn   r   r]  rS   r   r    r!   ra  ra  n  sY    ryy		"		(		.+.Hr    ra  c                 n    t        | j                  | j                  j                  t              | |      S )N)rZ   rJ   rx   rc  )ra  rZ   r[   r\   )r^   rc  s     r!   set_monitorre  x  s.    ||//8!	 r    c            	           e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d       ej                  d            Z
y)DeleteMonitorrJ   ,   rx   rB   NrP  r   r    r!   rg  rg    sW    ryy		"		(		&Hr    rg  c                 n    t        | j                  | j                  j                  t              | |      S )N)rZ   rJ   rx   rB   )rg  rZ   r[   r\   )r^   rB   s     r!   delete_monitorrj    s.    ||//8	 r    c                      e Zd 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       ej                  d	       ej                  d
       ej                  d       ej                  d       ej                  d       ej                  d            Z
y)ScreenChangeNotifyNr   rf   rM   rc   rd   rj   rx   re   rk   r'   r(   r)   r*   r   r   r   _coder   rN   rO   rV   rR   rn   _fieldsr   r    r!   rl  rl    s    Ebii		#$		+		$%		&		(		)		"#		#$		$%		()		)*
Gr    rl  c                      e Zd 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       ej                  d	       ej                  d
       ej                  d       ej                  d       ej                  d       ej                  d            Zy)CrtcChangeNotifyNr   sub_coderM   rc   rx   r   r   rf   r   rF   rG   r,   r-   )r   r   r   rn  r   rN   rO   rV   rR   rn   rU   r   ro  r   r    r!   rq  rq    s    Ebii		#$		+		(		&		&		*q			'		(
Gr    rq  c                      e Zd 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       ej                  d	       ej                  d
       ej                  d       ej                  d       ej                  d            Z
y)OutputChangeNotifyNr   rr  rM   rc   rd   rx   r   r   r   rf   r   rk   rm  r   r    r!   rt  rt    s    Ebii		#$		+		$%		(		(		&		&		*!"
Gr    rt  c                   d   e Zd 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       ej                  d	       ej                  d
      	      Zy)OutputPropertyNotifyNr   rr  rM   rx   r   atomrc   stater   )r   r   r   rn  r   rN   rO   rV   rn   rR   rU   ro  r   r    r!   rv  rv    s    Ebii		#$		(		(		&		+r


Gr    rv  c                 l   | 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               | 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               | 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*               | j                  ddt,               | j                  ddt.               | j                  ddt0               | j                  ddt2               | j                  ddt4               | j                  ddt6               | j                  ddt8               | j                  dd t:               | j                  dd!t<               | j                  dd"t>               t        |       }|j@                  d#k(  rP|jB                  d$k\  r?| j                  dd%tD               | j                  dd&tF               | j                  dd'tH               | jK                  |jL                  tN        z   tP               | jS                  |jL                  tT        z   tV        tX               | jS                  |jL                  tT        z   tZ        t\               | jS                  |jL                  tT        z   t^        t`               | jc                  td        tf               | jc                  th        tj               | jc                  tl        tn               y y y )(NrZ   xrandr_query_versionrx   xrandr_select_inputxrandr_get_screen_inforb   xrandr_1_0set_screen_configxrandr_set_screen_configxrandr_get_screen_size_rangexrandr_set_screen_sizexrandr_get_screen_resourcesxrandr_get_output_infoxrandr_list_output_propertiesxrandr_query_output_propertyz!xrandr_configure_output_property xrandr_change_output_propertyxrandr_delete_output_propertyxrandr_get_output_propertyxrandr_create_modexrandr_destroy_modexrandr_add_output_modexrandr_delete_output_modexrandr_get_crtc_infoxrandr_set_crtc_configxrandr_get_crtc_gamma_sizexrandr_get_crtc_gammaxrandr_set_crtc_gamma#xrandr_get_screen_resources_currentxrandr_set_crtc_transformxrandr_get_crtc_transformxrandr_set_output_primaryxrandr_get_output_primaryxrandr_get_panningxrandr_set_panningr   r   xrandr_get_monitorsxrandr_set_monitorxrandr_delete_monitor)8extension_add_methodr_   r{   r   rp   ru   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r   r*  r6  rR  rW  rE  rL  rK   rL   r_  re  rj  extension_add_eventfirst_eventRRScreenChangeNotifyrl  extension_add_subeventRRNotifyRRNotify_CrtcChangerq  RRNotify_OutputChangert  RRNotify_OutputPropertyrv  extension_add_errorBadRROutputr   	BadRRCrtcr$   	BadRRModer&   )dispinfoversions      r!   initr    st   i)?Oh(=|Lh(@/Rj*GI^_j*DFWXh(FH]^h(@/Rh(EG[\i)A?Si)HJ`ai)GI^_i)LNgii)HJ`ai)HJ`ai)EGZ[h(<kJi)>Mi)A?Si)DFXYi)?Oi)A?Si)EGZ[i)@.Qi)@.Qh(MOkli)DFXYi)DFXYh(CEWXh(CEWXi)={Ki)={K D!G!g&;&;q&@!!(,A<P!!(,@+N!!(,C^T  !1!14H!HJ\]##D$4$4x$?ATVfg##D$4$4x$?AVXjk##D$4$4x$?AXZno  .>?  N;  N; 'A!r    )NN)FF)T)__doc__Xlibr   Xlib.protocolr   
Xlib.errorr   r\   r  r  r  r  r  RRScreenChangeNotifyMaskRRCrtcChangeNotifyMaskRROutputChangeNotifyMaskRROutputPropertyNotifyMaskSetConfigSuccessSetConfigInvalidConfigTimeSetConfigInvalidTimeSetConfigFailedRotate_0	Rotate_90
Rotate_180
Rotate_270	Reflect_X	Reflect_YHSyncPositiveHSyncNegativeVSyncPositiveVSyncNegative	Interlace
DoubleScanCSyncCSyncPositiveCSyncNegativeHSkewPresentBCastPixelMultiplexDoubleClockClockDivideBy2	ConnectedDisconnectedUnknownConnectionPROPERTY_RANDR_EDIDPROPERTY_SIGNAL_FORMATPROPERTY_SIGNAL_PROPERTIESPROPERTY_CONNECTOR_TYPEPROPERTY_CONNECTOR_NUMBERPROPERTY_COMPATIBILITY_LISTPROPERTY_CLONE_LISTSubPixelUnknownSubPixelHorizontalRGBSubPixelHorizontalBGRSubPixelVerticalRGBSubPixelVerticalBGRSubPixelNoner  r  r  r   r$   r&   rN   rV   r   rR   r   r   r   r  RandR_Ratesr'  r   r   r   r]  ReplyRequestrI   r_   ra   CurrentTimerp   rr   ru   Requestrw   r{   r}   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r  r  r  r   r"  r*  r,  r6  r8  rE  rG  rL  rN  rR  rT  rW  rY  r_  ra  re  rg  rj  Eventrl  rq  rt  rv  r  r   r    r!   <module>r     sH  .   
            &   & % %        	

 !	 	 )((((	(
((((((((  	  % , 0 - / 1 )         		 %v $ "V " "V " BII		#$		$%		()		)*	
  		$		'		(		+		.!		,		)		(		.!		,		)		- 		'
  biiGQ&
 299		*		*		*		*		*		*		*		*		*

  biiBIIfBGGIBGGKBKKBHHSMBHHSMBII BII !BII$%BII%&BGGGR\\" 
2?? 
$	

"// 
. PQ}} 

boo 
2 GHSTS`S` 
$
"** 


BOO 
2	

 
&	


BJJ 

	

 
2

BOO 
<

2?? 
"

"// 
(

rzz 


2:: 
	

2:: 


 
4

 
$

"** 


BJJ 


rzz 


"// 
6

BOO 
0 \][h[h 

r 
 

2?? 
&

2:: 
	

 
2

rzz 


r 
6

 
6

 
: ij  iv  iv 
*
rzz 


r 
 
"// . BJJ 
 
&
rxx 
&
 
$
288 
1<r    