§
    ŒŸjî  ã                  ó    — d dl mZ d dlZej        dk    sJ ‚d dlmZ ddlmZ esd dlmZ d dl	m
Z
mZmZ d d	lmZ d
dgZdZdZefdd„Zdd„ZdS )é    )ÚannotationsNÚwin32)Úpointeré   )ÚSPHINX_AUTODOC_RUNNING)Úwindll)ÚBOOLÚDWORDÚHANDLE)ÚSECURITY_ATTRIBUTESÚwait_for_handlesÚcreate_win32_eventi  éÿÿÿÿÚhandlesúlist[HANDLE]ÚtimeoutÚintÚreturnúHANDLE | Nonec                óö   — t           t          | ¦  «        z  } || Ž }t          j                             t          |¦  «        |t          d¦  «        t          |¦  «        ¦  «        }|t          k    rdS | |         S )a˜  
    Waits for multiple handles. (Similar to 'select') Returns the handle which is ready.
    Returns `None` on timeout.
    http://msdn.microsoft.com/en-us/library/windows/desktop/ms687025(v=vs.85).aspx

    Note that handles should be a list of `HANDLE` objects, not integers. See
    this comment in the patch by @quark-zju for the reason why:

        ''' Make sure HANDLE on Windows has a correct size

        Previously, the type of various HANDLEs are native Python integer
        types. The ctypes library will treat them as 4-byte integer when used
        in function arguments. On 64-bit Windows, HANDLE is 8-byte and usually
        a small integer. Depending on whether the extra 4 bytes are zero-ed out
        or not, things can happen to work, or break. '''

    This function returns either `None` or one of the given `HANDLE` objects.
    (The return value can be tested with the `is` operator.)
    FN)r   Úlenr   Úkernel32ÚWaitForMultipleObjectsr	   r
   ÚWAIT_TIMEOUT)r   r   ÚarrtypeÚhandle_arrayÚrets        úk/var/www/finuniver-perm.ru/html/student/venv/lib/python3.11/site-packages/prompt_toolkit/eventloop/win32.pyr   r      sp   € õ( •s˜7‘|”|Ñ#€GØ�7˜GÐ$€LåŒ×5Ò5ÝˆLÑÔ˜<­¨e©¬µe¸G±n´nñô €Cð �lÒÐØˆtà�sŒ|Ðó    r   c            	     óÆ   — t          t          j                             t	          t          ¦   «         ¦  «        t          d¦  «        t          d¦  «        d¦  «        ¦  «        S )z|
    Creates a Win32 unnamed Event .
    http://msdn.microsoft.com/en-us/library/windows/desktop/ms682396(v=vs.85).aspx
    TFN)r   r   r   ÚCreateEventAr   r   r	   © r   r   r   r   <   sR   € õ
 ÝŒ×$Ò$ÝÕ'Ñ)Ô)Ñ*Ô*Ý�‰JŒJÝ�‰KŒKØñ		
ô 	
ñô ð r   )r   r   r   r   r   r   )r   r   )Ú
__future__r   ÚsysÚplatformÚctypesr   Úutilsr   r   Úctypes.wintypesr	   r
   r   Úprompt_toolkit.win32_typesr   Ú__all__r   ÚINFINITEr   r   r"   r   r   ú<module>r,      sø   ðØ "Ð "Ð "Ð "Ð "Ð "à 
€
€
€
à
„|�wÒÐÐÐà Ð Ð Ð Ð Ð à *Ð *Ð *Ð *Ð *Ð *ð ð ØÐÐÐÐÐà /Ð /Ð /Ð /Ð /Ð /Ð /Ð /Ð /Ð /à :Ð :Ð :Ð :Ð :Ð :àÐ3Ð
4€ð €Ø€ð <Dð ð ð ð ð ðBð ð ð ð ð r   