+
    }c"  c            	       s   R t ^ RIHt ^t^tRt^ t^t^t^t	^t
^t ! R R]P                  4      t]]3R lt]P                  ! ]P                   ! R4      ]P                   ! R4      4      t ! R R	]P                  4      tR
 t]P                  ! ]P                   ! R4      ]P                   ! R4      4      t ! R R]P                  4      tR t ! R R]P                  4      tR t ! R R]P2                  4      t^t^t]P                  ! ]P                   ! R4      ]P                   ! R4      4      t]P                  ! ]P<                  ! R]4      ]! R^^4      ]P>                  ! R]P@                  4      4      t! ! R R]P                  4      t"R t#]P                  ! ]P                   ! R4      ]P                   ! R4      4      t$]P                  ! ]P                   ! R4      ]P                   ! R4      ]P                   ! R4      ]P                   ! R4      ]P                   ! R 4      4      t%]P                  ! ]P<                  ! R!]%4      ]P2                  ! R"^4      ]P>                  ! R"]%4      4      t& ! R# R$]P                  4      t'R% t(R& t)R'# )(aU  X-Resource extension allows a client to query the X server about its usage
of various resources.

For detailed description see any of the following documents.
Protocol specification:
    https://www.x.org/releases/current/doc/resourceproto/resproto.txt
XCB Protocol specification:
    https://cgit.freedesktop.org/xcb/proto/tree/src/res.xml
)rqz
X-Resourcec                   s   ] tR t^0t]P
                  ! ]P                  ! R4      ]P                  ! ]4      ]P                  ! 4       ]P                  ! R4      ]P                  ! R4      ]P                  ! ^4      4      t]P
                  ! ]P                  ! 4       ]P                  ! ^4      ]P                  ! R4      ]P                  ! 4       ]P                  ! R4      ]P                  ! R4      ]P                  ! ^4      4      tRtR# )	QueryVersionopcodeclient_majorclient_minorsequence_numberZserver_majorZserver_minor N)__name__
__module____qualname____firstlineno__r    StructCard8OpcodeResQueryVersionRequestLengthPad_request	ReplyCodeCard16ReplyLength_reply__static_attributes__r       1/usr/lib/python3.14/site-packages/Xlib/ext/res.pyr   r   0   s    yyHHXIIo&HH^$HH^$FF1IH YYLLNFF1III'(NNIIn%IIn%FF2JFr   r   c                n    \        V P                  V P                  P                  \        4      VVR7      # )zQuery the protocol version supported by the X server.

The client sends the highest supported version to the server and the
server sends the highest version it supports, but no higher than the
requested version.)displayr   r   r   )r   r   get_extension_majorextname)selfr   r      &&&r   query_versionr   B   s0     LL<<33G<%%	' 'r   Zresource_baseZresource_maskc                   s   ] tR t^Ut]P
                  ! ]P                  ! R4      ]P                  ! ]4      ]P                  ! 4       4      t
]P
                  ! ]P                  ! 4       ]P                  ! ^4      ]P                  ! R4      ]P                  ! 4       ]P                  ! R^4      ]P                  ! ^4      ]P                   ! R]4      4      tRtR# )QueryClientsr   r   Zclientsr   N)r   r   r	   r
   r    r   r   r   ResQueryClientsr   r   r   r   r   r   LengthOfListClientr   r   r   r   r   r    r    U   s    yyHHXIIo& H YYLLNFF1III'(NNKK	1%FF2JGGIv&(Fr   r    c                sj    \        V P                  V P                  P                  \        4      R7      # )z4Request the list of all currently connected clients.)r   r   )r    r   r   r   )r   s   &r   query_clientsr%   d   s(    LL<<33G<> >r   Zresource_typeZcountc                   s   ] tR t^pt]P
                  ! ]P                  ! R4      ]P                  ! ]4      ]P                  ! 4       ]P                  ! R4      4      t]P
                  ! ]P                  ! 4       ]P                  ! ^4      ]P                  ! R4      ]P                  ! 4       ]P                   ! R^4      ]P                  ! ^4      ]P"                  ! R]4      4      tRtR# )QueryClientResourcesr   clientr   Ztypesr   N)r   r   r	   r
   r    r   r   r   ResQueryClientResourcesr   Card32r   r   r   r   r   r"   r#   Typer   r   r   r   r   r&   r&   p   s    yyHHXII-.IIh	!H
 YYLLNFF1III'(NNKK#FF2JGGGT"$Fr   r&   c                l    \        V P                  V P                  P                  \        4      VR7      # )zpRequest the number of resources owned by a client.

The server will return the counts of each type of resource.
r   r   r'   )r&   r   r   r   r   r'      &&r   query_client_resourcesr/      s-    
  LL<<33G< r   c                   s   ] tR t^t]P
                  ! ]P                  ! R4      ]P                  ! ]4      ]P                  ! 4       ]P                  ! R4      4      t]P
                  ! ]P                  ! 4       ]P                  ! ^4      ]P                  ! R4      ]P                  ! 4       ]P                  ! R4      ]P                  ! R4      ]P                  ! ^4      4      tRtR# )QueryClientPixmapBytesr   r'   r   bytesZbytes_overflowr   N)r   r   r	   r
   r    r   r   r   ResQueryClientPixmapBytesr   r)   r   r   r   r   r   r   r   r   r   r   r0   r0      s    yyHHXII/0IIh	!H
 YYLLNFF1III'(NNIIgII&'FF2JFr   r0   c                r+   )zQuery the pixmap usage of some client.

The returned number is a sum of memory usage of each pixmap that can be
attributed to the given client.
r,   )r0   r   r   r   r-   r.   r   query_client_pixmap_bytesr3      s-     "LL<<33G< r   c                   s0   a  ] tR t^t o RtR tR tRtV tR# )SizeOfzUA SizeOf stores the size in bytes of some other Field whose size
may vary, e.g. List
c                sR    \         P                  P                  WV4       W0n        R # N)r    r"   __init__	item_size)r   Znamesizer7   s   &&&&r   r6   ZSizeOf.__init__   s    
T."r   c                s&    WP                   ,          # r5   r7   )r   Zlengthr   r   r   parse_valueZSizeOf.parse_value   s    ''r   r9   N)	r   r   r	   r
   __doc__r6   r:   r   Z__classdictcell__)Z__classdict__s   @r   r4   r4      s     #( (r   r4   r'   ZmaskZspecZvaluec                   s   ] tR t^t]P
                  ! ]P                  ! R4      ]P                  ! ]4      ]P                  ! 4       ]P                  ! R^4      ]P                  ! R]4      4      t]P
                  ! ]P                  ! 4       ]P                  ! ^4      ]P                   ! R4      ]P"                  ! 4       ]P                  ! R^4      ]P                  ! ^4      ]P                  ! R]4      4      tRtR# )QueryClientIdsr   specsr   Zidsr   N)r   r   r	   r
   r    r   r   r   ResQueryClientIdsr   r"   r#   ClientIdSpecr   r   r   r   r   ClientIdValuer   r   r   r   r   r<   r<      s    yyHHXII'(KK#GGG\*,H YYLLNFF1III'(NNKKq!FF2JGGE=)+Fr   r<   c                r+   )ak  Request to identify a given set of clients with some identification method.

The request sends a list of specifiers that select clients and
identification methods to server. The server then tries to identify the
chosen clients using the identification methods specified for each client.
The server returns IDs for those clients that were successfully identified.
)r   r   r=   )r<   r   r   r   )r   r=   r.   r   query_client_idsrA      s-     LL<<33G< r   ZresourceZtyper1   Z	ref_countZ	use_countr8   Zcross_referencesc                   s   ] tR t^t]P
                  ! ]P                  ! R4      ]P                  ! ]4      ]P                  ! 4       ]P                  ! R4      ]P                  ! R^4      ]P                  ! R]4      4      t]P
                  ! ]P                  ! 4       ]P                   ! ^4      ]P"                  ! R4      ]P$                  ! 4       ]P                  ! R^4      ]P                   ! ^4      ]P                  ! R]4      4      tRtR# )QueryResourceBytesr   r'   r=   r   Zsizesr   N)r   r   r	   r
   r    r   r   r   ResQueryResourceBytesr   r)   r"   r#   ResourceIdSpecr   r   r   r   r   ResourceSizeValuer   r   r   r   r   rB   rB      s    yyHHXII+,IIhKK#GGG^,.H YYLLNFF1III'(NNKK#FF2JGGG./1Fr   rB   c                r   )a	  Query the sizes of resources from X server.

The request sends a list of specifiers that selects resources for size
calculation. The server tries to calculate the sizes of chosen resources
and returns an estimate for a resource only if the size could be determined
)r   r   r'   r=   )rB   r   r   r   )r   r'   r=   r   r   query_resource_bytesrF     s0     LL<<33G<	 r   c                 s   V P                  R R\        4       V P                  R R\        4       V P                  R R\        4       V P                  R R\        4       V P                  R R\
        4       V P                  R R\        4       R# )r   Zres_query_versionZres_query_clientsZres_query_client_resourcesZres_query_client_pixmap_bytesZres_query_client_idsZres_query_resource_bytesN)Zextension_add_methodr   r%   r/   r3   rA   rF   )ZdispZinfor.   r   initrG     s    i)<mLi)<mLi)E46i)H79i)?.0i)C24r   N)*r;   ZXlib.protocolr    ZRES_MAJOR_VERSIONZRES_MINOR_VERSIONr   r   r!   r(   r2   r>   rC   ZReplyRequestr   r   r   r)   r$   r    r%   r*   r&   r/   r0   r3   r"   r4   ZClientXIDMaskZLocalClientPIDMaskr?   ZObjectr#   Z	Card32Objr@   r<   rA   rD   ZResourceSizeSpecrE   rB   rF   rG   r   r   r   <module>rH      sV  ,   
     2?? $ &70' 

		/"
		/"
$
(2?? (> 
yy
		/"
		'
$2?? $ R__  		(R[[ 	(   yy
		(
		&
 		
		&,'w1
&(+R__ +" 
		*
		&
 99 			*
		&
		'
		+
		+   II
		&*+
&*
"$457 1 1$
4r   