
    i                        d 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 G d dej                        Zd	 Z G d
 dej"                        Zd Z G d dej"                        Zd Z G d dej"                        Zd Z G d dej0                        Z G d de      Z G d de      Z G d de      Z G d dej"                        Zd Z G d dej                        Zd  Z  G d! d"ej0                        Z!d# Z"y$)%z
A partial implementation of the XFIXES extension.  Only the HideCursor and
ShowCursor requests and SelectionNotify events are provided.
    )rqXFIXES         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            Zy)	QueryVersionopcoder   major_versionminor_versionr   sequence_number   N)__name__
__module____qualname__r   StructCard8OpcodeRequestLengthCard32_request	ReplyCodePadCard16ReplyLength_reply     Y/home/obispo/Crisostomo_bridge/mision_env/lib/python3.12/site-packages/Xlib/ext/xfixes.pyr	   r	   -   s    ryy(+"1)))+"?3"?3	H RYY|r||~rvvay ryy!23%r~~' ryy1 ryy1rvvbzFr   r	   c                 n    t        | j                  | j                  j                  t              dd      S )Nr   r   )displayr
   r   r   )r	   r!   get_extension_majorextnameselfs    r   query_versionr&   >   s-    #||??H&'&') )r   c                       e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d            Z	y)
HideCursorr
      windowN
r   r   r   r   r   r   r   r   Windowr   r   r   r   r(   r(   E   H    ryy(+"2)))+"8,Hr   r(   c                 n    t        | j                  | j                  j                  t              |        y N)r!   r
   r*   )r(   r!   r"   r#   r$   s    r   hide_cursorr0   L   %    t||ll66w?r   c                       e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d            Z	y)
ShowCursorr
      r*   Nr+   r   r   r   r3   r3   R   r-   r   r3   c                 n    t        | j                  | j                  j                  t              |        y r/   )r3   r!   r"   r#   r$   s    r   show_cursorr6   Z   r1   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)SelectSelectionInputr
   r   r*   	selectionmaskNr   r   r   r   r   r   r   r   r,   r   r   r   r   r   r8   r8   _   sd    ryy(+"1)))+"8,";/"6*Hr   r8   c                 p    t        | j                  j                  t              | j                  |||      S )N)r
   r!   r*   r9   r:   )r8   r!   r"   r#   )r%   r*   r9   r:   s       r   select_selection_inputr=   h   s0    t||'G'G'P(,'-*3%)	+ +r   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)SelectionNotifyNtypesub_coder   r*   ownerr9   	timestampselection_timestamp   )r   r   r   _coder   r   r   r   r,   r   r   _fieldsr   r   r   r?   r?   p   s    Ebii( ,!		"34!		(+!		'*!		+.!		+.!		"78q	#Gr   r?   c                       e Zd Zy)SetSelectionOwnerNotifyNr   r   r   r   r   r   rI   rI   }       r   rI   c                       e Zd Zy)SelectionWindowDestroyNotifyNrJ   r   r   r   rM   rM      rK   r   rM   c                       e Zd Zy)SelectionClientCloseNotifyNrJ   r   r   r   rO   rO      rK   r   rO   c            	           e Zd Z ej                   ej
                  d       ej                  d       ej                          ej                  d       ej                  d            Z
y)SelectCursorInputr
      r*   r:   Nr;   r   r   r   rQ   rQ      sV    ryy(+"1)))+"8,"6*	Hr   rQ   c                 p    t        | j                  j                  t              | j                  |d|      S )Nr   )r
   r!   r*   cursor_serialr:   )rQ   r!   r"   r#   )r%   r*   r:   s      r   select_cursor_inputrU      s0    DLL$D$DW$M%)\\$*+,"&	( (r   c                      e Zd Z ej                   ej
                  d       ej                  d       ej                               Z ej                   ej                          ej                  d       ej                  d       ej                          ej                  d       ej                  d       ej                  d       ej                  d       ej                  d	       ej                  d
       ej                  d       ej                  d       ej                  dej                              Zy)GetCursorImager
   r   r   r   xywidthheightxhotyhotrT   rE   cursor_imageN)r   r   r   r   r   r   r   r   r   r   r   r   r   Int16r   Listr   r   r   r   rW   rW      s    ryy(+"1)))+H RYY|r||~rvvay ryy!23%r~~'rxx}rxx} ryy) ryy* ryy( ryy( ryy1rvvayrww~ryy9Fr   rW   c                 j    t        | j                  j                  t              | j                        S )N)r
   r!   )rW   r!   r"   r#   )r%   r*   s     r   get_cursor_imagerb      s'    !A!A'!J"&,, 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            Z
y)DisplayCursorNotifyNr@   rA   r   r*   rT   rC   )r   r   r   rF   r   r   r   r   r,   r   rG   r   r   r   rd   rd      sk    Ebii( ,!		"34!		(+!		/2!		+.0Gr   rd   c                 x   | 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                  |j                  t        z   t        t               | j                  |j                  t        z   t        t               | j                  |j                  t        z   t        t               | j                  |j                  t         z   t"        t$               y )	Nr!   xfixes_select_selection_inputxfixes_query_versionr*   xfixes_hide_cursorxfixes_show_cursorxfixes_select_cursor_inputxfixes_get_cursor_image)extension_add_methodr=   r&   r0   r6   rU   rb   extension_add_subeventfirst_eventXFixesSelectionNotifyXFixesSetSelectionOwnerNotifyrI   "XFixesSelectionWindowDestroyNotifyrM    XFixesSelectionClientCloseNotifyrO   XFixesCursorNotifyXFixesDisplayCursorNotifyrd   )dispinfos     r   initrw      s   i)HJ`ai)?Oh(<kJh(<kJi)EGZ[i)BDTU 0 03H HJg  jA  B 0 03H HJl  oK  L 0 03H HJj  mG  H 0 03E EG`buvr   N)#__doc__Xlib.protocolr   r#   ro   rs   !XFixesSetSelectionOwnerNotifyMask&XFixesSelectionWindowDestroyNotifyMask$XFixesSelectionClientCloseNotifyMaskXFixesDisplayCursorNotifyMaskrp   rq   rr   rt   ReplyRequestr	   r&   Requestr(   r0   r3   r6   r8   r=   Eventr?   rI   rM   rO   rQ   rU   rW   rb   rd   rw   r   r   r   <module>r      s  .
 
*+ *+ +1 !+1 &+1 $+1 *+ *+ "*+  *+ 2?? ")  
2:: +
#bhh 
#	o 		? 		 	

 (R__ (0"(( 0wr   