
    
3jG0                    v   % S SK Jr  S SKrS SKJrJrJr  S SKJrJ	r	  S SK
Jr  S SKJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJ r J!r!J"r"J#r#J$r$J%r%J&r&J'r'J(r(J)r)J*r*J+r+J,r,J-r-J.r.J/r/J0r0J1r1J2r2J3r3J4r4J5r5J6r6J7r7J8r8J9r9J:r:J;r;J<r<J=r=J>r>J?r?J@r@JArAJBrBJCrCJDrDJErEJFrFJGrGJHrHJIrIJJrJJKrKJLrLJMrMJNrNJOrOJPrPJQrQJRrRJSrSJTrTJUrUJVrVJWrWJXrXJYrYJZrZJ[r[J\r\J]r]J^r^J_r_J`r`JaraJbrbJcrcJdrdJereJfrfJgrgJhrhJiriJjrjJkrkJlrlJmrmJnrnJoroJprpJqrqJrrrJsrsJtrtJuruJvrvJwrwJxrxJyryJzrzJ{r{J|r|J}r}J~r~JrJrJr  S SKJrJrJrJrJrJrJr  SrS	rS
rSrSrSrSr\S\S\S\S\S\S\S0r\" S 5      r0 S\" S5      _S\" S	5      _S\" S
5      _S\" S5      _S\" S5      _S\" S5      _S\" S5      _S\" S5      _S\" S 5      _S!\" S"5      _S#\" S$5      _S%\" S&5      _S'\" S(5      _S)\" S*5      _S+\" S,5      _S-\" S.5      _S/\" S05      _0 S1\" S25      _S3\" S45      _S5\" S65      _S7\" S85      _S9\" S:5      _S;\" S<5      _S=\" S>5      _S?\" S@5      _SA\" SB5      _SC\" SD5      _SE\" SF5      _SG\" SH5      _SI\" SJ5      _SK\" SL5      _SM\" SN5      _SO\" SP5      _SQ\" SR5      _E0 SS\" ST5      _SU\" SV5      _SW\" SX5      _SY\" SZ5      _S[\" S\5      _S]\" S^5      _S_\" S`5      _Sa\" Sb5      _Sc\" Sd5      _Se\" Sf5      _Sg\" Sh5      _Si\" Sj5      _Sk\" Sl5      _Sm\" Sn5      _So\" Sp5      _Sq\" Sr5      _Ss\" St5      _E0 Su\" Sv5      _Sw\" Sx5      _Sy\" Sz5      _S{\" S|5      _S}\" S~5      _S\" S5      _S\" S5      _S\" S5      _S\" S5      _S\" S5      _S\" S5      _S\" S5      _S\" S5      _S\" S5      _S\" S5      _S\" S5      _S\" S5      _Er0 rS\S'   \	SS.       SS jj5       r\	SS.       SS jj5       r\	        SS j5       rSS.       SS jjr      SS jr      SS jrSS jrSS jrSS jrSSS jjrSS jrg)    )annotationsN)_Pointer	addressofc_int)Literaloverload)xcbgen)uRANDR_MAJOR_VERSIONRANDR_MINOR_VERSIONRENDER_MAJOR_VERSIONRENDER_MINOR_VERSIONSHM_MAJOR_VERSIONSHM_MINOR_VERSIONXFIXES_MAJOR_VERSIONXFIXES_MINOR_VERSIONAtomBackingStoreColormapDepthDepthIteratorDrawableFormatGetGeometryReplyGetImageReplyGetPropertyReplyImageFormat
ImageOrderKeycodePixmapRandrConnection	RandrCrtcRandrGetCrtcInfoReplyRandrGetMonitorsReplyRandrGetOutputInfoReplyRandrGetOutputPrimaryReplyRandrGetOutputPropertyReply#RandrGetScreenResourcesCurrentReplyRandrGetScreenResourcesReply	RandrModeRandrModeInfoRandrMonitorInfoRandrMonitorInfoIteratorRandrOutputRandrQueryVersionReplyRandrSetConfigRenderDirectformatRenderPictdepthRenderPictdepthIteratorRenderPictformatRenderPictforminfoRenderPictscreenRenderPictscreenIteratorRenderPictTypeRenderPictvisualRenderQueryPictFormatsReplyRenderQueryVersionReplyRenderSubPixelScreenScreenIteratorSetupSetupIteratorShmCreateSegmentReplyShmGetImageReplyShmQueryVersionReplyShmSeg	TimestampVisualClassVisualid
VisualtypeWindowXfixesGetCursorImageReplyXfixesQueryVersionReplydepth_visualsget_geometry	get_imageget_image_dataget_propertyget_property_valueno_operationrandr_get_crtc_inforandr_get_crtc_info_outputsrandr_get_crtc_info_possiblerandr_get_monitorsrandr_get_monitors_monitorsrandr_get_output_inforandr_get_output_info_clonesrandr_get_output_info_crtcsrandr_get_output_info_modesrandr_get_output_info_namerandr_get_output_primaryrandr_get_output_propertyrandr_get_output_property_datarandr_get_screen_resources randr_get_screen_resources_crtcs"randr_get_screen_resources_current(randr_get_screen_resources_current_crtcs(randr_get_screen_resources_current_modes(randr_get_screen_resources_current_names*randr_get_screen_resources_current_outputs randr_get_screen_resources_modes randr_get_screen_resources_names"randr_get_screen_resources_outputsrandr_monitor_info_outputsrandr_query_versionrender_pictdepth_visualsrender_pictscreen_depthsrender_query_pict_formats!render_query_pict_formats_formats!render_query_pict_formats_screens#render_query_pict_formats_subpixelsrender_query_versionscreen_allowed_depthssetup_pixmap_formatssetup_rootssetup_vendorshm_attach_fdshm_create_segmentshm_create_segment_reply_fds
shm_detachshm_get_imageshm_query_versionxfixes_get_cursor_image$xfixes_get_cursor_image_cursor_imagexfixes_query_version)LIBXID
ConnectionInternAtomReplyQueryExtensionReplyXcbExtensionXError                     z+connection lost or could not be establishedzextension not supportedzmemory exhaustedz)request length longer than server acceptsz,display is unset or invalid (check $DISPLAY)z<server does not have a screen matching the requested displayzcould not pass file descriptorPRIMARY	SECONDARYARCATOMBITMAPCARDINALCOLORMAPCURSOR   CUT_BUFFER0	   CUT_BUFFER1
   CUT_BUFFER2   CUT_BUFFER3   CUT_BUFFER4   CUT_BUFFER5   CUT_BUFFER6   CUT_BUFFER7   DRAWABLE   FONT   INTEGER   PIXMAP   POINT   	RECTANGLE   RESOURCE_MANAGER   RGB_COLOR_MAP   RGB_BEST_MAP   RGB_BLUE_MAP   RGB_DEFAULT_MAP   RGB_GRAY_MAP   RGB_GREEN_MAP   RGB_RED_MAP   STRING   VISUALID    WINDOW!   
WM_COMMAND"   WM_HINTS#   WM_CLIENT_MACHINE$   WM_ICON_NAME%   WM_ICON_SIZE&   WM_NAME'   WM_NORMAL_HINTS(   WM_SIZE_HINTS)   WM_ZOOM_HINTS*   	MIN_SPACE+   
NORM_SPACE,   	MAX_SPACE-   	END_SPACE.   SUPERSCRIPT_X/   SUPERSCRIPT_Y0   SUBSCRIPT_X1   SUBSCRIPT_Y2   UNDERLINE_POSITION3   UNDERLINE_THICKNESS4   STRIKEOUT_ASCENT5   STRIKEOUT_DESCENT6   ITALIC_ANGLE7   X_HEIGHT8   
QUAD_WIDTH9   WEIGHT:   
POINT_SIZE;   
RESOLUTION<   	COPYRIGHT=   NOTICE>   	FONT_NAME?   FAMILY_NAME@   	FULL_NAMEA   
CAP_HEIGHTB   WM_CLASSC   WM_TRANSIENT_FORD   zdict[int, dict[str, Atom]]_ATOM_CACHEF)only_if_existsc                   g N xcb_connnamer  s      G/home/wildlama/miniconda3/lib/python3.13/site-packages/mss/linux/xcb.pyintern_atomr     s         Tc                   g r  r  r  s      r  r  r          r  c                   g r  r  r  s      r  r  r     r  r  c               4   U[         ;   a	  [         U   $ [        U [        5      (       a  U R                  n [	        U 5      nU[
        ;  a  Sn[        U5      eU[
        U   ;   a  [
        U   U   $ UR                  SSS9n[        R                  R                  X(       a  SOS[        U5      U5      nUR                  U 5      R                  nUR                  S:X  a  U(       d  SU S3n[        U5      eg [        UR                  5      nU[
        U   U'   U$ )	Nz Connection to X server is closedlatin_1strict)errorsr   r   z X server failed to intern atom '')_PREDEFINED_ATOMS
isinstancer   contentsr   r  r   encoder   xcbxcb_intern_atomlenreplyatomvaluer   )	r  r  r  	cache_keymsgname_encodedcookieatom_as_xidr)  s	            r  r  r    s       &&(H%%$$(#I# 1Sk{9%%9%d++ ;;y;:LWW$$XNq3|K\^jkF,,x(--KA4TF!<C+!!"D#'K	4 Kr  c                X    [         R                  R                  X5      nUR                  $ )zGet extension data for the given extension.

Returns the extension data, which includes whether the extension is present
and its opcode information.
)r   r%  xcb_get_extension_datar#  )r  extreply_ps      r  get_extension_datar4  +  s$     gg,,X;Gr  c                B    [         R                  R                  X5        g)zPrefetch extension data for the given extension.

This is a performance hint to XCB to fetch the extension data
asynchronously.
N)r   r%  xcb_prefetch_extension_data)r  r2  s     r  prefetch_extension_datar7  7  s     GG''6r  c                @    [         R                  R                  U 5      $ )zaGenerate a new unique X resource ID.

Returns an XID that can be used to create new X resources.
)r   r%  xcb_generate_id)r  s    r  generate_idr:  B  s    
 77""8,,r  c                X    [         R                  R                  U 5      nUR                  $ )zGet the connection setup information.

Returns the setup structure containing information about the X server,
including available screens, pixmap formats, etc.
)r   r%  xcb_get_setupr#  )r  setup_ps     r  	get_setupr>  J  s$     gg##H-Gr  c                 J    [         R                  " [        R                  /S9  g )N)	callbacks)r   
initializer	   r  r  r  rA  rA  W  s    NNf//01r  c                   [        U [        5      (       a  U R                  S5      n [        5         [	        5       n[
        R                  R                  X5      n[
        R                  R                  U5      nUS:w  aQ  [
        R                  R                  U5        Sn[        R                  U5      nXE=(       d    SU 3-  n[        U5      e[        U[
        R                  5        [        U[
        R                  5        [        U[
        R                   5        [        U[
        R"                  5        0 [$        ['        UR(                  5      '   UR(                  UR*                  4$ )Nzutf-8r   zCannot connect to display: error code )r"  strr$  rA  r   r   r%  xcb_connectxcb_connection_has_errorxcb_disconnectXCB_CONN_ERRMSGgetr   r7  randr_id	render_idshm_id	xfixes_idr  r   r#  r*  )displaypref_screen_numconn_pconn_errr,  conn_errmsgs         r  connectrS  [  s   '3..)LgOWW  :F ww//7H1}v&+%))(36H:66Sk FCLL1FCMM2FCJJ/FCMM2.0K	&//*+??O1111r  c                   [        U [        5      (       a  U R                  n [        R                  " [
        5         [        [        U 5      	 S S S 5        [        R                  R                  U 5      n[        R                  R                  U 5        US:w  a2  Sn[        R                  U5      nX#=(       d    SU 3-  n[        U5      eg ! , (       d  f       N= f)Nr   zConnection to X server closed: rC  )r"  r   r#  
contextlibsuppressKeyErrorr  r   r   r%  rF  rG  rH  rI  r   )r  rQ  r,  rR  s       r  
disconnectrX  x  s    (H%%$$ 
		X	&	(+, 
' ww//9HGG8$1}/%))(36H:66Sk	  
'	&s   C
C)r  !Connection | _Pointer[Connection]r  rD  r  zLiteral[False]returnr   )r  rY  r  rD  r  zLiteral[True]rZ  Atom | None)r  rY  r  rD  r  boolrZ  r[  )r  rY  r2  %XcbExtension | _Pointer[XcbExtension]rZ  r   )r  rY  r2  r]  rZ  None)r  rY  rZ  r   )r  rY  rZ  r>   )rZ  r^  r  )rN  zstr | bytes | NonerZ  ztuple[Connection, int])r  rY  rZ  r^  )
__future__r   rU  ctypesr   r   r   typingr   r   	mss.linuxr	   mss.linux.xcbgenr
   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/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   mss.linux.xcbhelpersr   r   r   r   r   r   r   XCB_CONN_ERROR XCB_CONN_CLOSED_EXT_NOTSUPPORTED XCB_CONN_CLOSED_MEM_INSUFFICIENTXCB_CONN_CLOSED_REQ_LEN_EXCEEDXCB_CONN_CLOSED_PARSE_ERRXCB_CONN_CLOSED_INVALID_SCREEN XCB_CONN_CLOSED_FDPASSING_FAILEDrH  XCB_NONEr!  r  __annotations__r  r4  r7  r:  r>  rA  rS  rX  r  r  r  <module>rn     sT   "  - - $ v v v v v v v v v v v v v v v v v v v v v v v v v v v v v vr r q q#$  #$  !"  !" #$  
 A$&?$&8"$OM"$b$&F 7EtAwEaE 
47E DG	E
 d1gE QE QE d1gE 47E 48E 48E 48E 48E 48E 48E  48!E" R#E$ DH%E& tBx'E( d2h)E* T"X+E, b-E. R/E0 T"X1E2 DH3E4 DH5E6 tBx7E8 DH9E: T"X;E< 48=E> d2h?E@ RAEB d2hCED $r(EEF RGEH bIEJ DHKEL DHMEN tBxOEP tBxQER T"XSET T"XUEV bWEX $r(YEZ b[E\ b]E^ T"X_E` T"XaEb 48cEd 48eEf $r(gEh 48iEj RkEl bmEn DHoEp RqEr $r(sEt d2huEv $r(wEx $r(yEz b{E| d2h}E~ bE@ 48AEB bCED $r(EEF RGEH RIE R +-' , 

 &+	/
 #	
 
 
 

 %)	/
 "	
  
 
/
 	
  
 !	$/$
$ 	$
 $N	/	6[		7/76[7	7-22:r  