
    ^h                        S r SSKJr  SSKJr  SSKJr  SrSrSr	 " S S\R                  5      rS	 r " S
 S\R                  5      rS r " S S\R                  5      rS r " S S\R                  5      rS r " S S\R                  5      rS r " S S\R                  5      rS r " S S\R                  5      rS rS rg)a  Composite extension, allowing windows to be rendered to off-screen
storage.

For detailed description, see the protocol specification at
http://freedesktop.org/wiki/Software/CompositeExt

By itself this extension is not very useful, it is intended to be used
together with the DAMAGE and XFIXES extensions.  Typically you would
also need RENDER or glX or some similar method of creating fancy
graphics.
    )X)rq)drawable	Composite   c                      \ rS rSr\R
                  " \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      \R                  " S5      5      r
\R
                  " \R                  " 5       \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      \R                  " S5      \R                  " S5      5      rS	rg
)QueryVersion*   opcoder   major_versionminor_versionr   sequence_number    N)__name__
__module____qualname____firstlineno__r   StructCard8OpcodeRequestLengthCard32_request	ReplyCodePadCard16ReplyLength_reply__static_attributes__r       D/var/www/html/env/lib/python3.13/site-packages/Xlib/ext/composite.pyr	   r	   *   s    yyHHXIIaLIIo&IIo&H YYLLNFF1III'(NNIIo&IIo&FF2JFr!   r	   c                 d    [        U R                  U R                  R                  [        5      S9$ )N)displayr   )r	   r$   get_extension_majorextname)selfs    r"   query_versionr(   =   s(    ,,11':
 
r!   c                      \ rS rSr\R
                  " \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      \R                  " SS\\45      \R                  " S5      5      rSrg)	RedirectWindowD   r   r   windowupdate   r   Nr   r   r   r   r   r   r   r   r   WindowSetRedirectAutomaticRedirectManualr   r   r    r   r!   r"   r*   r*   D   `    yy

		!

		(
x.?@
q	
Hr!   r*   c                 j    [        U R                  U R                  R                  [        5      U US9  g)zFRedirect the hierarchy starting at this window to off-screen
storage.
r$   r   r,   r-   Nr*   r$   r%   r&   r'   r-   s     r"   redirect_windowr9   N   s*     T\\ LL<<WE "r!   c                      \ rS rSr\R
                  " \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      \R                  " SS\\45      \R                  " S5      5      rSrg	)
RedirectSubwindowsY   r      r,   r-   r   r.   r   Nr/   r   r!   r"   r;   r;   Y   r4   r!   r;   c                 j    [        U R                  U R                  R                  [        5      U US9  g)zkRedirect the hierarchies starting at all current and future
children to this window to off-screen storage.
r6   N)r;   r$   r%   r&   r8   s     r"   redirect_subwindowsr?   c   s*      $ @ @ I $ &r!   c                      \ rS rSr\R
                  " \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      \R                  " SS\\45      \R                  " S5      5      rSrg)	UnredirectWindown   r   r.   r,   r-   r   r   Nr/   r   r!   r"   rA   rA   n   r4   r!   rA   c                 j    [        U R                  U R                  R                  [        5      U US9  g)z,Stop redirecting this window hierarchy.
    r6   N)rA   r$   r%   r&   r8   s     r"   unredirect_windowrD   x   s*     t||"ll>>wG"$r!   c                      \ rS rSr\R
                  " \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      \R                  " SS\\45      \R                  " S5      5      rSrg	)
UnredirectSubindows   r      r,   r-   r   r.   r   Nr/   r   r!   r"   rF   rF      r4   r!   rF   c                 j    [        U R                  U R                  R                  [        5      U US9  g)zAStop redirecting the hierarchies of children to this window.
    r6   Nr7   r8   s     r"   unredirect_subwindowsrJ      s*     T\\ LL<<WE "r!   c            	           \ rS rSr\R
                  " \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      \R                  " S5      5      rSrg)CreateRegionFromBorderClip   r      regionr,   r   N)r   r   r   r   r   r   r   r   r   r   r0   r   r    r   r!   r"   rL   rL      K    yy

		!

		(
		(
Hr!   rL   c                     U R                   R                  5       n[        U R                   U R                   R                  [        5      UU S9  U$ )z{Create a region of the border clip of the window, i.e. the area
that is not clipped by the parent and any sibling windows.
)r$   r   rO   r,   )r$   allocate_resource_idrL   r%   r&   )r'   rids     r"   create_region_from_border_cliprT      sD    
 ,,
+
+
-C,,11':	
 Jr!   c            	           \ rS rSr\R
                  " \R                  " S5      \R                  " S5      \R                  " 5       \R                  " S5      \R                  " S5      5      rSrg)NameWindowPixmap   r      r,   pixmapr   N)r   r   r   r   r   r   r   r   r   r0   Pixmapr   r    r   r!   r"   rV   rV      rP   r!   rV   c                    U R                   R                  5       n[        U R                   U R                   R                  [        5      U US9  U R                   R                  S[        R                  5      nU" U R                   USS9$ )am  Create a new pixmap that refers to the off-screen storage of
the window, including its border.

This pixmap will remain allocated until freed whatever happens
with the window.  However, the window will get a new off-screen
pixmap every time it is mapped or resized, so to keep track of the
contents you must listen for these events and get a new pixmap
after them.
)r$   r   r,   rY   rY   r   )owner)r$   rR   rV   r%   r&   get_resource_classr   rZ   )r'   pidclss      r"   name_window_pixmapr`      sk     ,,
+
+
-Ct||"ll>>wG"! ,,
)
)(HOO
DCt||S!,,r!   c                 F   U R                  SS[        5        U R                  SS[        5        U R                  SS[        5        U R                  SS[        5        U R                  SS[
        5        U R                  SS[        5        U R                  SS	[        5        g )
Nr$   composite_query_versionr,   composite_redirect_windowcomposite_redirect_subwindowscomposite_unredirect_windowcomposite_unredirect_subwindows(composite_create_region_from_border_clipcomposite_name_window_pixmap)extension_add_methodr(   r9   r?   rD   rJ   rT   r`   )dispinfos     r"   initrl      s    i7+- 	h9-/ 	h=13 	h;/1 	h?35 	hH<> 	h<02r!   N)__doc__Xlibr   Xlib.protocolr   Xlib.xobjectr   r&   r2   r3   ReplyRequestr	   r(   Requestr*   r9   r;   r?   rA   rD   rF   rJ   rL   rT   rV   r`   rl   r   r!   r"   <module>rs      s   *
   !
 2?? &

RZZ 

 

rzz 

"** 

 
"
rzz 
-,2r!   