
    i                        d 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Z.dZ/dZ0dZ1dZ2dZ3d	Z4dZ5dZ6dZ7dZ8dZ9 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%            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~                  d0       ej~                  d1       ej                  d2            ZB ej|                   ej                  d3d       ej                  d3ej                              ZF ej|                   ej                  d4       ej                  d5       ej                  d6       ej                  d7       ej                  d8       ej                  d9       ej                  d:       ej                  d;       ej                  d<      	      ZG ej|                   ej                  d=       ej                  d>       ej                  d?       ej                  d@d       ej                  dA       ej                  dB       ej~                  d"       ej~                  d#       ej                  d$       ej                  d%       ej                  d@ej                              ZK G dC dDej                        ZMdE ZN G dF dGej                        ZOej                  fdHZQ G dI dJej                        ZRdej                  fdKZS G dL dMej                        ZUdN ZV G dO dPej                        ZWdQ ZX G dR dSej                        ZYdT ZZ G dU dVej                        Z[ddXZ\ G dY dZej                        Z]d[ Z^ G d\ d]ej                        Z_d^ Z` G d_ d`ej                        Zada Zb G db dcej                        Zcdd Zd G de dfej                        Zedg Zf G dh diej                        Zgdj Zh G dk dlej                        Zidm Zj G dn doej                        ZkddpZl G dq drej                        Zmds Zn G dt duej                        Zodv Zp G dw dxej                        Zqdy Zr G dz d{ej                        Zsd| Zt G d} d~ej                        Zud Zv G d dej                        Zwej                  fdZx G d dej                        Zyd Zz G d dej                        Z{d 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                        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 ZyW)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RANDR                      @         i   i   i   i   i    EDIDSignalFormatSignalPropertiesConnectorTypeConnectorNumberCompatibilityList	CloneList   c                       e Zd Zy)BadRROutputErrorN__name__
__module____qualname__     X/home/obispo/Crisostomo_bridge/mision_env/lib/python3.12/site-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    rH   rH      s    ryy		!		/"		/"
H RYYq			#$		/"		/"r

Fr   rH   c                 n    t        | j                  | j                  j                  t              dd      S )z5Get the current version of the RandR extension.

    r   r   )displayrI   rJ   rK   )rH   rY   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_0SetScreenConfigrI   r   drawable	timestampconfig_timestampsize_idrotationstatusrL   new_timestampnew_config_timestamprootsubpixel_order
   N)r   r   r   r   rM   rN   rO   rP   DrawablerQ   rU   rR   rS   rV   WindowrT   rW   r   r   r    r`   r`      s   ryy		!J		+		$%		)		*	
H RYY		#$		/"		()		&		"#r


Fr   r`   c           	      t    t        | j                  | j                  j                  t              | ||||      S )z9Sets the screen to the specified size and rotation.

    )rY   rI   ra   rb   rc   rd   re   )r`   rY   rZ   r[   )r]   rd   re   rc   rb   s        r    _1_0set_screen_configro      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)SetScreenConfigrI   r   ra   rb   rc   rd   re   raterf   rL   rg   rh   ri   rj   rk   N)r   r   r   r   rM   rN   rO   rP   rl   rQ   rU   rT   rR   rS   rV   rm   rW   r   r   r    rq   rq     s*   ryy		!J		+		$%		)		*		&q	
H RYY		#$		/"		()		&		"#r


Fr   rq   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.

    )rY   rI   ra   rb   rc   rd   re   rr   )rq   rY   rZ   r[   )r]   rd   re   rc   rr   rb   s         r    set_screen_configrt     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)SelectInputrI   r   windowmaskr   N)r   r   r   r   rM   rN   rO   rP   rm   rU   rT   rR   r   r   r    rv   rv   0  sd    ryy		!		(		&q	
Hr   rv   c                 n    t        | j                  | j                  j                  t              | |      S )N)rY   rI   rw   rx   )rv   rY   rZ   r[   )r]   rx   s     r    select_inputrz   :  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)GetScreenInforI   r   rw   set_of_rotationsrL   ri   rb   rc   sizesr   rd   re   rr   n_rate_entsN)r   r   r   r   rM   rN   rO   rP   rm   rR   rS   rU   rV   rQ   LengthOfrT   ListRandR_ScreenSizesrW   r   r   r    r|   r|   C  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.

    rY   rI   rw   )r|   rY   rZ   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)GetScreenSizeRangerI      rw   r   rL   	min_width
min_height	max_width
max_heightr   N)r   r   r   r   rM   rN   rO   rP   rm   rR   rS   rT   rU   rV   rW   r   r   r    r   r   j  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   rY   rZ   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)	SetScreenSizerI      rw   r+   r,   r(   r)   N)r   r   r   r   rM   rN   rO   rP   rm   rU   rQ   rR   r   r   r    r   r     s    ryy		!		(		'		(		()		)*	
Hr   r   Nc           	      t    t        | j                  | j                  j                  t              | ||||      S )N)rY   rI   rw   r+   r,   r(   r)   )r   rY   rZ   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)GetScreenResourcesrI   r	   rw   r   rL   rb   rc   rD   r   outputsmodes
mode_namesNr   r   r   r   rM   rN   rO   rP   rm   rR   rS   rT   rU   rV   rQ   r   r   	Card32ObjRandR_ModeInfoString8rW   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   rY   rZ   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)GetOutputInforI   	   outputrc   rf   rL   rb   crtcmm_width	mm_height
connectionrj   rD   r   r   num_preferredclonesrA   N)r   r   r   r   rM   rN   rO   rP   rQ   rR   rS   rU   rV   r   r   r   r   rW   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)rY   rI   r   rc   )r   rY   rZ   r[   )r]   r   rc   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	)
ListOutputPropertiesrI   rk   r   r   rL   atomsr      N)r   r   r   r   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   r   r   r   rW   r   r   r    r   r     s    ryy		"		(	
H RYYq			#$GQr
&
Fr   r   c                 l    t        | j                  | j                  j                  t              |      S )N)rY   rI   r   )r   rY   rZ   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)QueryOutputPropertyrI      r   propertyr   rL   pendingrange	immutable   valid_valuesN)r   r   r   r   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   Boolr   r   rW   r   r   r    r   r     s    ryy		"		(		*
H RYYq			#$	r
-

Fr   r   c                 n    t        | j                  | j                  j                  t              ||      S N)rY   rI   r   r   )r   rY   rZ   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	)
ConfigureOutputPropertyrI      r   r   r   r   r   r   N)r   r   r   r   rM   rN   rO   rP   rQ   r   rT   r   r   rR   r   r   r    r   r     s    ryy		"		(		*	q	-

Hr   r   c                 n    t        | j                  | j                  j                  t              ||      S r   )r   rY   rZ   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)ChangeOutputPropertyrI      r   r   typevaluer   moder   r   N)r   r   r   r   rM   rN   rO   rP   rQ   FormatrT   r   PropertyDatarR   r   r   r    r   r   5  s    ryy		"		(		*		&		'1q	GQ 
Hr   r   c           	      t    t        | j                  | j                  j                  t              |||||      S )N)rY   rI   r   r   r   r   r   )r   rY   rZ   r[   )r]   r   r   r   r   r   s         r    change_output_propertyr   D  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)DeleteOutputPropertyrI      r   r   N
r   r   r   r   rM   rN   rO   rP   rQ   rR   r   r   r    r   r   P  sW    ryy		"		(		*
Hr   r   c                 n    t        | j                  | j                  j                  t              ||      S r   )r   rY   rZ   r[   r   s      r    delete_output_propertyr   Y  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)GetOutputPropertyrI      r   r   r   long_offsetlong_lengthdeleter   r   r   r   rL   property_typebytes_afterr   r   N)r   r   r   r   rM   rN   rO   rP   rQ   r   rT   rR   rS   r   rU   rV   r   r   Card8ObjrW   r   r   r    r   r   b  s?   ryy		"		(		*		&		- 		- 	q	
H RYY		'1		#$		/"		- GQr
%

Fr   r   c                 x    t        | j                  | j                  j                  t              |||||||	      S )N)	rY   rI   r   r   r   r   r   r   r   )r   rY   rZ   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	)

CreateModerI   r   rw   r   rA   r   rL      N)r   r   r   r   rM   rN   rO   rP   rm   Objectr   r   rR   rS   rT   rU   rV   rQ   rW   r   r   r    r   r     s    ryy		"		(		&.)

6
H RYYq			#$		&r

Fr   r   c                 p    t        | j                  | j                  j                  t              | ||      S )N)rY   rI   rw   r   rA   )r   rY   rZ   r[   )r]   r   rA   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)DestroyModerI      r   Nr   r   r   r    r   r     sI    ryy		"		&	
Hr   r   c                 l    t        | j                  | j                  j                  t              |      S )N)rY   rI   r   )r   rY   rZ   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)AddOutputModerI      r   r   Nr   r   r   r    r   r     W    ryy		"		(		&
Hr   r   c                 n    t        | j                  | j                  j                  t              ||      S N)rY   rI   r   r   )r   rY   rZ   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)DeleteOutputModerI      r   r   Nr   r   r   r    r   r     r   r   r   c                 n    t        | j                  | j                  j                  t              ||      S r   )r   rY   rZ   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)GetCrtcInforI   r   r   rc   rf   rL   rb   rE   rF   r+   r,   r   re   possible_rotationsr   r   possible_outputsN)r   r   r   r   rM   rN   rO   rP   rQ   rR   rS   rU   rV   Int16r   r   r   rW   r   r   r    r   r     sW   ryy		"		&		$%
H RYY		#$		+		'		(		&		*		&'Iq!&*	2<<("BLL1!
Fr   r   c                 n    t        | j                  | j                  j                  t              ||      S )N)rY   rI   r   rc   )r   rY   rZ   r[   )r]   r   rc   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)SetCrtcConfigrI   r   r   rb   rc   rE   rF   r   re   r   r   rf   rL   rg   r   N)r   r   r   r   rM   rN   rO   rP   rQ   r   rU   rT   r   r   rR   rS   rV   rW   r   r   r    r  r    s   ryy		"		&		+		$%		&		*q		2<<(
H RYY		#$		/"r

Fr   r  c	                 z    t        | j                  | j                  j                  t              ||||||||
      S )N)
rY   rI   r   rc   rE   rF   r   re   r   rb   )r  rY   rZ   r[   )	r]   r   rc   rE   rF   r   re   r   rb   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)GetCrtcGammaSizerI   r   r   rf   rL   sizeN)r   r   r   r   rM   rN   rO   rP   rQ   rR   rS   rU   rV   rT   rW   r   r   r    r  r  %  s    ryy		"		&	
H RYY		#$		&r

Fr   r  c                 l    t        | j                  | j                  j                  t              |      S N)rY   rI   r   )r  rY   rZ   r[   r]   r   s     r    get_crtc_gamma_sizer
  5  +    ||//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)GetCrtcGammarI      r   rf   rL   )redgreenbluer   r   r  r  r  N)r   r   r   r   rM   rN   rO   rP   rQ   rR   rS   rU   rV   r   rT   r   	Card16ObjrW   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  rY   rZ   r[   r	  s     r    get_crtc_gammar  P  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	)
SetCrtcGammarI      r   r  r   r  r  r  N)r   r   r   r   rM   rN   rO   rP   rQ   rU   rT   r   r  rR   r   r   r    r  r  X  s    ryy		"		&		&q	r||$&%

Hr   r  c           	      t    t        | j                  | j                  j                  t              |||||      S )N)rY   rI   r   r  r  r  r  )r  rY   rZ   r[   )r]   r   r  r  r  r  s         r    set_crtc_gammar  e  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)GetScreenResourcesCurrentrI      rw   r   rL   rb   rc   rD   r   r   r   namesr	   Nr   r   r   r    r  r  s  s>   ryy		"		(	
H RYYq			#$		+		$%GQIq!GQGQq	&	2<<((

7
Fr   r  c                 l    t        | j                  | j                  j                  t              |       S r   )r  rY   rZ   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)	SetCrtcTransformrI      r   	transformfilter_namer   filter_paramsN)r   r   r   r   rM   rN   rO   rP   rQ   r   Render_Transformr   rT   r   r   r   rR   r   r   r    r!  r!    s    ryy		"		&		+/0M1%q	

=!.

Hr   r!  c                 n    t        | j                  | j                  j                  t              ||      S )N)rY   rI   r   n_bytes_filter)r!  rY   rZ   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)GetCrtcTransformrI      r   rf   rL   pending_transformhas_transformsr
   current_transformr   pending_filter_namer   pending_filter_paramscurrent_filter_namecurrent_filter_paramsN)r   r   r   r   rM   rN   rO   rP   rQ   rR   rS   rU   rV   r   r&  r   rT   r   r   r   r   rW   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+  rY   rZ   r[   r	  s     r    get_crtc_transformr5    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)
GetPanningrI      r   rf   rL   rb   lefttopr+   r,   
track_left	track_toptrack_widthtrack_heightborder_left
border_topborder_rightborder_bottomN)r   r   r   r   rM   rN   rO   rP   rQ   rR   rS   rU   rV   r   rW   r   r   r    r7  r7    sE   ryy		"		&	
H RYY		#$		+		&		%		'		(		,		+		- 		.! !#
Fr   r7  c                 l    t        | j                  | j                  j                  t              |      S r  )r7  rY   rZ   r[   r	  s     r    get_panningrD    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)
SetPanningrI      r   rb   r9  r:  r+   r,   r;  r<  r=  r>  r?  r@  rA  rB  rf   rL   rg   r   N)r   r   r   r   rM   rN   rO   rP   rQ   rU   r   rR   rS   rV   rT   rW   r   r   r    rF  rF    s`   ryy		"		&		+		&		%		'		(		,		+		- 		.! !#
H& RYY		#$		/"r

Fr   rF  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 )NrY   rI   r   r9  r:  r+   r,   r;  r<  r=  r>  r?  r@  border_widthborder_heightrb   r   )rF  rY   rZ   r[   )r]   r   r9  r:  r+   r,   r;  r<  r=  r>  r?  r@  rI  rJ  rb   s                  r    set_panningrK    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)SetOutputPrimaryrI      rw   r   Nr   r   r   r   rM   rN   rO   rP   rm   rQ   rR   r   r   r    rM  rM  "  sW    ryy		"		(		(
Hr   rM  c                 n    t        | j                  | j                  j                  t              | |      S )N)rY   rI   rw   r   )rM  rY   rZ   r[   r   s     r    set_output_primaryrQ  +  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)	GetOutputPrimaryrI      rw   r   rL   r   r   N)r   r   r   r   rM   rN   rO   rP   rm   rR   rS   rT   rU   rV   rQ   rW   r   r   r    rS  rS  4  s    ryy		"		(	
H RYYq			#$		(r

Fr   rS  c                 l    t        | j                  | j                  j                  t              |       S r   )rS  rY   rZ   r[   r\   s    r    get_output_primaryrV  D  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)GetMonitorsrI   *   rw   	is_activer
   r   rL   rb   monitorsr   r   r   N)r   r   r   r   rM   rN   rO   rP   rm   r   rT   rR   rS   rU   rV   rQ   r   r   MonitorInforW   r   r   r    rX  rX  N  s    ryy		"		(q	H RYYq			#$		+J"		)r

K(
Fr   rX  c                 n    t        | j                  | j                  j                  t              | |      S )N)rY   rI   rw   rZ  )rX  rY   rZ   r[   )r]   rZ  s     r    get_monitorsr^  e  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)
SetMonitorrI   +   rw   monitor_infoN)r   r   r   r   rM   rN   rO   rP   rm   r   r\  rR   r   r   r    r`  r`  m  sY    ryy		"		(		.+.Hr   r`  c                 n    t        | j                  | j                  j                  t              | |      S )N)rY   rI   rw   rb  )r`  rY   rZ   r[   )r]   rb  s     r    set_monitorrd  w  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)DeleteMonitorrI   ,   rw   rA   NrO  r   r   r    rf  rf    sW    ryy		"		(		&Hr   rf  c                 n    t        | j                  | j                  j                  t              | |      S )N)rY   rI   rw   rA   )rf  rY   rZ   r[   )r]   rA   s     r    delete_monitorri    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   re   rL   rb   rc   ri   rw   rd   rj   r&   r'   r(   r)   r   r   r   _coder   rM   rN   rU   rQ   rm   _fieldsr   r   r    rk  rk    s    Ebii		#$		+		$%		&		(		)		"#		#$		$%		()		)*
Gr   rk  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_coderL   rb   rw   r   r   re   r   rE   rF   r+   r,   )r   r   r   rm  r   rM   rN   rU   rQ   rm   rT   r   rn  r   r   r    rp  rp    s    Ebii		#$		+		(		&		&		*q			'		(
Gr   rp  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   rq  rL   rb   rc   rw   r   r   r   re   r   rj   rl  r   r   r    rs  rs    s    Ebii		#$		+		$%		(		(		&		&		*!"
Gr   rs  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   rq  rL   rw   r   atomrb   stater   )r   r   r   rm  r   rM   rN   rU   rm   rQ   rT   rn  r   r   r    ru  ru    s    Ebii		#$		(		(		&		+r


Gr   ru  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 )(NrY   xrandr_query_versionrw   xrandr_select_inputxrandr_get_screen_infora   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^   rz   r   ro   rt   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r
  r  r  r  r)  r5  rQ  rV  rD  rK  rJ   rK   r^  rd  ri  extension_add_eventfirst_eventRRScreenChangeNotifyrk  extension_add_subeventRRNotifyRRNotify_CrtcChangerp  RRNotify_OutputChangers  RRNotify_OutputPropertyru  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   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  	Exceptionr   r#   r%   rM   rU   r   rQ   r   r   r   r  RandR_Ratesr&  r   r   r   r\  ReplyRequestrH   r^   r`   CurrentTimero   rq   rt   Requestrv   rz   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+  r5  r7  rD  rF  rK  rM  rQ  rS  rV  rX  r^  r`  rd  rf  ri  Eventrk  rp  rs  ru  r  r   r   r    <module>r     sE  .  
            &   & % %        	

 !	 	 )((((	(
((((((((  	  % , 0 - / 1 )         		 (y ' %Y % %Y % 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   