+
    JV-j•  ã                  ó„   € ^ RI Ht ^RIHt  ! R R4      t ! R R4      t ! R R4      t ! R	 R
4      t ! R R]4      tR# )é    )Úannotations)ÚImagec                  ó2   € ] tR t^tRtR R ltR R ltRtR# )ÚHDCz”
Wraps an HDC integer. The resulting object can be passed to the
:py:meth:`~PIL.ImageWin.Dib.draw` and :py:meth:`~PIL.ImageWin.Dib.expose`
methods.
c               ó    € V ^8„  d   QhRRRR/# )é   ÚdcÚintÚreturnÚNone© )Úformats   "Ú]/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/PIL/ImageWin.pyÚ__annotate__ÚHDC.__annotate__   s   € ÷ ñ ˜3ð  4ñ ó    c                	ó   € Wn         R # ©N©r	   )Úselfr	   s   &&r   Ú__init__ÚHDC.__init__   s   € ØŽr   c               ó   € V ^8„  d   QhRR/# ©r   r   r
   r   )r   s   "r   r   r   "   s   € ÷ ñ ˜ñ r   c                	ó   € V P                   # r   r   ©r   s   &r   Ú__int__ÚHDC.__int__"   s   € Ø�w‰wˆr   r   N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   Ú__static_attributes__r   r   r   r   r      s   † ñõ÷ñ r   r   c                  ó2   € ] tR t^&tRtR R ltR R ltRtR# )ÚHWNDz¦
Wraps an HWND integer. The resulting object can be passed to the
:py:meth:`~PIL.ImageWin.Dib.draw` and :py:meth:`~PIL.ImageWin.Dib.expose`
methods, instead of a DC.
c               ó    € V ^8„  d   QhRRRR/# )r   Úwndr
   r   r   r   )r   s   "r   r   ÚHWND.__annotate__-   s   € ÷ ñ ˜Cð  Dñ r   c                	ó   € Wn         R # r   ©r)   )r   r)   s   &&r   r   ÚHWND.__init__-   s   € ØŽr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r*   0   s   € ÷ ñ ˜ñ r   c                	ó   € V P                   # r   r,   r   s   &r   r   ÚHWND.__int__0   s   € Ø�x‰xˆr   r,   Nr   r   r   r   r'   r'   &   s   † ñõ÷ñ r   r'   c                  óz   € ] tR t^4tRtRR R lltR R ltRR R lltR	 R
 ltRR R llt	R R lt
R R ltRtR# )ÚDibaî  
A Windows bitmap with the given mode and size.  The mode can be one of "1",
"L", "P", or "RGB".

If the display requires a palette, this constructor creates a suitable
palette and associates it with the image. For an "L" image, 128 graylevels
are allocated. For an "RGB" image, a 6x6x6 colour cube is used, together
with 20 graylevels.

To make sure that palettes work properly under Windows, you must call the
``palette`` method upon certain events from Windows.

:param image: Either a PIL image, or a mode string. If a mode string is
              used, a size must also be given.  The mode can be one of "1",
              "L", "P", or "RGB".
:param size: If the first argument is a mode string, this
             defines the size of the image.
Nc               ó$   € V ^8„  d   QhRRRRRR/# )r   ÚimagezImage.Image | strÚsizeztuple[int, int] | Noner   r   r   )r   s   "r   r   ÚDib.__annotate__H   s$   € ÷ ñ Ø&ðØ.Dðà	ñr   c                	óŽ  € \        V\        4      '       d   TpR pVf   Rp\        V4      hMVP                  pVP                  pVR9  d   \
        P                  ! V4      p\
        P                  P                  W24      V n	        W0n        W n        V'       d,   \        V\        4      '       d   Q hV P                  V4       R# R# )Ú Nz+If first argument is mode, size is required)Ú1ÚLÚPÚRGB)Ú
isinstanceÚstrÚ
ValueErrorÚmoder5   r   ÚgetmodebaseÚcoreÚdisplayr4   Úpaste)r   r4   r5   r@   Úmsgs   &&&  r   r   ÚDib.__init__H   s¨   € ô �eœS×!Ò!ØˆDØˆEØŠ|ØC�Ü  “oÐ%ð ð —:‘:ˆDØ—:‘:ˆDØÐ-Ô-Ü×$Ò$ TÓ*ˆDÜ—Z‘Z×'Ñ'¨Ó3ˆŒ
ØŒ	ØŒ	ßÜ! %¬×-Ò-Ð-Ð-Ø�J‰J�uÖñ r   c               ó    € V ^8„  d   QhRRRR/# )r   Úhandleúint | HDC | HWNDr   r   r   )r   s   "r   r   r6   ]   s   € ÷ *ñ *Ð-ð *°$ñ *r   c                óf  € \        V4      p\        V\        4      '       dU   V P                  P	                  V4      p V P                  P                  V4       V P                  P                  W#4       R# V P                  P                  V4       R#   T P                  P                  Y#4       i ; i)zø
Copy the bitmap contents to a device context.

:param handle: Device context (HDC), cast to a Python integer, or an
               HDC or HWND instance.  In PythonWin, you can use
               ``CDC.GetHandleAttrib()`` to get a suitable handle.
N)r
   r=   r'   r4   ÚgetdcÚexposeÚ	releasedc)r   rH   Ú
handle_intr	   s   &&  r   rL   Ú
Dib.expose]   s   € ô ˜“[ˆ
Ü�fœd×#Ò#Ø—‘×!Ñ! *Ó-ˆBð5Ø—
‘
×!Ñ! "Ô%à—
‘
×$Ñ$ ZÖ4à�J‰J×Ñ˜jÖ)øð —
‘
×$Ñ$ ZÕ4úó   ¾B ÂB0c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   rH   rI   Údstztuple[int, int, int, int]Úsrcú tuple[int, int, int, int] | Noner   r   r   )r   s   "r   r   r6   o   s2   € ÷ 2ñ 2à ð2ð 'ð2ð .ð	2ð
 
ñ2r   c                ó˜  € Vf   RV P                   ,           p\        V4      p\        V\        4      '       dV   V P                  P                  V4      p V P                  P                  WRV4       V P                  P                  WE4       R# V P                  P                  WBV4       R#   T P                  P                  YE4       i ; i)a5  
Same as expose, but allows you to specify where to draw the image, and
what part of it to draw.

The destination and source areas are given as 4-tuple rectangles. If
the source is omitted, the entire image is copied. If the source and
the destination have different sizes, the image is resized as
necessary.
N)r   r   )r5   r
   r=   r'   r4   rK   ÚdrawrM   )r   rH   rR   rS   rN   r	   s   &&&&  r   rV   ÚDib.drawo   s’   € ð Š;Ø˜4Ÿ9™9Õ$ˆCÜ˜“[ˆ
Ü�fœd×#Ò#Ø—‘×!Ñ! *Ó-ˆBð5Ø—
‘
—‘ ¨Ô-à—
‘
×$Ñ$ ZÖ4à�J‰J�O‰O˜J¨SÖ1øð —
‘
×$Ñ$ ZÕ4ús   ÁB, Â,C	c               ó    € V ^8„  d   QhRRRR/# )r   rH   rI   r   r
   r   )r   s   "r   r   r6   Š   s   € ÷ ñ Ð$4ð ¸ñ r   c                óf  € \        V4      p\        V\        4      '       dU   V P                  P	                  V4      p V P                  P                  V4      pV P                  P                  W4       V# V P                  P                  V4      pV#   T P                  P                  Y4       i ; i)a  
Installs the palette associated with the image in the given device
context.

This method should be called upon **QUERYNEWPALETTE** and
**PALETTECHANGED** events from Windows. If this method returns a
non-zero value, one or more display palette entries were changed, and
the image should be redrawn.

:param handle: Device context (HDC), cast to a Python integer, or an
               HDC or HWND instance.
:return: The number of entries that were changed (if one or more entries,
         this indicates that the image should be redrawn).
)r
   r=   r'   r4   rK   Úquery_paletterM   )r   rH   rN   Úresults   &&  r   rZ   ÚDib.query_paletteŠ   s‘   € ô ˜“[ˆ
Ü�fœd×#Ò#Ø—Z‘Z×%Ñ% jÓ1ˆFð5ØŸ™×1Ñ1°&Ó9�à—
‘
×$Ñ$ VÔ4ð ˆð —Z‘Z×-Ñ-¨jÓ9ˆFØˆøð —
‘
×$Ñ$ VÕ4úrP   c               ó$   € V ^8„  d   QhRRRRRR/# )r   ÚimzImage.ImageÚboxrT   r   r   r   )r   s   "r   r   r6   ¤   s$   € ÷ $ñ $Øð$Ø$Dð$à	ñ$r   c                ó<  € VP                  4        V P                  VP                  8w  d   VP                  V P                  4      pV'       d)   V P                  P	                  VP
                  V4       R# V P                  P	                  VP
                  4       R# )a­  
Paste a PIL image into the bitmap image.

:param im: A PIL image.  The size must match the target region.
           If the mode does not match, the image is converted to the
           mode of the bitmap image.
:param box: A 4-tuple defining the left, upper, right, and
            lower pixel coordinate.  See :ref:`coordinate-system`. If
            None is given instead of a tuple, all of the image is
            assumed.
N)Úloadr@   Úconvertr4   rD   r^   )r   r^   r_   s   &&&r   rD   Ú	Dib.paste¤   s`   € ð 	�‰Œ	Ø�9‰9˜Ÿ™ÔØ—‘˜DŸI™IÓ&ˆBßØ�J‰J×Ñ˜RŸU™U CÖ(à�J‰J×Ñ˜RŸU™UÖ#r   c               ó    € V ^8„  d   QhRRRR/# )r   ÚbufferÚbytesr   r   r   )r   s   "r   r   r6   º   s   € ÷ %ñ % ð %¨$ñ %r   c                ó<   € V P                   P                  V4       R# )z°
Load display memory contents from byte data.

:param buffer: A buffer containing display data (usually
               data returned from :py:func:`~PIL.ImageWin.Dib.tobytes`)
N)r4   Ú	frombytes)r   re   s   &&r   rh   ÚDib.frombytesº   s   € ð 	�
‰
×Ñ˜VÖ$r   c               ó   € V ^8„  d   QhRR/# )r   r   rf   r   )r   s   "r   r   r6   Ã   s   € ÷ $ñ $˜ñ $r   c                ó6   € V P                   P                  4       # )za
Copy display memory contents to bytes object.

:return: A bytes object containing display data.
)r4   Útobytesr   s   &r   rl   ÚDib.tobytesÃ   s   € ð �z‰z×!Ñ!Ó#Ð#r   )r4   r@   r5   r   )r    r!   r"   r#   r$   r   rL   rV   rZ   rD   rh   rl   r%   r   r   r   r2   r2   4   s/   † ñ÷&õ**÷$2õ6÷4$õ,%÷$ñ $r   r2   c                  ó~   € ] tR t^ÌtRtRR R lltR R ltR R ltR	 R
 ltR R lt	R R lt
R R ltR R ltRtR# )ÚWindowz*Create a Window with the given title size.Nc               ó(   € V ^8„  d   QhRRRRRRRR/# )r   Útitler>   Úwidthz
int | NoneÚheightr   r   r   )r   s   "r   r   ÚWindow.__annotate__Ï   s,   € ÷ 
ñ 
Øð
Ø)3ð
ØDNð
à	ñ
r   c                	óŽ   € \         P                  P                  YP                  T;'       g    ^ T;'       g    ^ 4      V n        R# )r   N)r   rB   ÚcreatewindowÚ_Window__dispatcherÚhwnd)r   rq   rr   rs   s   &&&&r   r   ÚWindow.__init__Ï   s3   € ô —J‘J×+Ñ+Ø×$Ñ$ e§j j¨q°&·+°+¸Aó
ˆŽ	r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úactionr>   Úargsr
   r   r   r   )r   s   "r   r   rt   Ö   s!   € ÷ 4ñ 4 3ð 4¨sð 4°tñ 4r   c                	ó,   € \        V R V 24      ! V!   R# )Ú
ui_handle_N)Úgetattr)r   r{   r|   s   &&*r   Ú__dispatcherÚWindow.__dispatcherÖ   s   € Ü�˜
 6 (Ð+Ô,¨dÔ3r   c               ó0   € V ^8„  d   QhRRRRRRRRRRRR/# ©	r   r	   r
   Úx0Úy0Úx1Úy1r   r   r   )r   s   "r   r   rt   Ù   s6   € ÷ ñ  #ð ¨3ð °Cð ¸Sð Àcð Èdñ r   c                	ó   € R # r   r   ©r   r	   r„   r…   r†   r‡   s   &&&&&&r   Úui_handle_clearÚWindow.ui_handle_clearÙ   ó   € Ùr   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )r   r„   r
   r…   r†   r‡   r   r   r   )r   s   "r   r   rt   Ü   s/   € ÷ ñ  3ð ¨Cð °Sð ¸cð Àdñ r   c                	ó   € R # r   r   )r   r„   r…   r†   r‡   s   &&&&&r   Úui_handle_damageÚWindow.ui_handle_damageÜ   rŒ   r   c               ó   € V ^8„  d   QhRR/# ©r   r   r   r   )r   s   "r   r   rt   ß   s   € ÷ ñ  4ñ r   c                	ó   € R # r   r   r   s   &r   Úui_handle_destroyÚWindow.ui_handle_destroyß   rŒ   r   c               ó0   € V ^8„  d   QhRRRRRRRRRRRR/# rƒ   r   )r   s   "r   r   rt   â   s6   € ÷ ñ  3ð ¨Cð °Sð ¸cð Àsð Ètñ r   c                	ó   € R # r   r   r‰   s   &&&&&&r   Úui_handle_repairÚWindow.ui_handle_repairâ   rŒ   r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   rr   r
   rs   r   r   r   )r   s   "r   r   rt   å   s!   € ÷ ñ  cð °3ð ¸4ñ r   c                	ó   € R # r   r   )r   rr   rs   s   &&&r   Úui_handle_resizeÚWindow.ui_handle_resizeå   rŒ   r   c               ó   € V ^8„  d   QhRR/# r’   r   )r   s   "r   r   rt   è   s   € ÷ ñ ˜$ñ r   c                	óB   € \         P                  P                  4        R # r   )r   rB   Ú	eventloopr   s   &r   ÚmainloopÚWindow.mainloopè   s   € Ü�
‰
×ÑÖr   )rx   )ÚPILNN)r    r!   r"   r#   r$   r   rw   rŠ   r�   r”   r˜   rœ   r¡   r%   r   r   r   ro   ro   Ì   s2   † Ù4÷
õ4õõõõõ÷ñ r   ro   c                  óB   a € ] tR t^ìtRtRR V 3R llltR R ltRtV ;t# )ÚImageWindowz6Create an image window which displays the given image.c               ó$   € V ^8„  d   QhRRRRRR/# )r   r4   zImage.Image | Dibrq   r>   r   r   r   )r   s   "r   r   ÚImageWindow.__annotate__ï   s"   € ÷ <ñ <Ð/ð <¸ð <Èñ <r   c                	ó”   <€ \        V\        4      '       g   \        V4      pWn        VP                  w  r4\        SV `  W#VR 7       R# ))rr   rs   N)r=   r2   r4   r5   Úsuperr   )r   r4   rq   rr   rs   Ú	__class__s   &&&  €r   r   ÚImageWindow.__init__ï   s;   ø€ Ü˜%¤×%Ò%Ü˜“JˆEØŒ
ØŸ
™
‰ˆÜ‰Ñ˜°FÐÖ;r   c               ó0   € V ^8„  d   QhRRRRRRRRRRRR/# rƒ   r   )r   s   "r   r   r§   ö   s6   € ÷ .ñ . 3ð .¨Cð .°Sð .¸cð .Àsð .Ètñ .r   c                	óB   € V P                   P                  WW4V34       R # r   )r4   rV   r‰   s   &&&&&&r   r˜   ÚImageWindow.ui_handle_repairö   s   € Ø�
‰
�‰˜ ¨Ð,Ö-r   )r4   )r£   )	r    r!   r"   r#   r$   r   r˜   r%   Ú__classcell__)rª   s   @r   r¥   r¥   ì   s   ø† Ù@÷<ò <÷.ó .r   r¥   N)	Ú
__future__r   r8   r   r   r'   r2   ro   r¥   r   r   r   Ú<module>r±      sE   ðõ& #å ÷ñ ÷ñ ÷U$ñ U$÷pñ ô@.�&ö .r   