Yohohohohohooho | Sanrei Aya
Sanrei Aya


Server : LiteSpeed
System : Linux barito.iixcp.rumahweb.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : elvh3918 ( 1528)
PHP Version : 8.2.31
Disable Function : mail
Directory :  /usr/local/lib/python3.9/site-packages/prompt_toolkit/output/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/lib/python3.9/site-packages/prompt_toolkit/output/__pycache__/windows10.cpython-39.pyc
a

��Sh
�@s�ddlmZddlZejdks"J�ddlmZmZddlmZm	Z	ddl
mZmZddl
mZddlmZd	d
lmZd	dlmZd	dlmZd	d
lmZdgZd	ZdZGdd�d�Ze�e�dd�dd�ZdS)�)�annotationsN�win32)�byref�windll)�DWORD�HANDLE)�Any�TextIO��Size)�STD_OUTPUT_HANDLE�)�Output)�
ColorDepth)�Vt100_Output)�Win32Output�Windows10_Output�c@sbeZdZdZddddd�dd�Zdd	�d
d�Zedd	�d
d��Zddd�dd�Zdd	�dd�Z	dS)rzV
    Windows 10 output abstraction. This enables and uses vt100 escape sequences.
    Nr	zColorDepth | None�None)�stdout�default_color_depth�returncCs>||_t||d�|_t|dd�|d�|_ttj�t	��|_
dS)N)rcSs
tdd�S)Nrr
�rr�I/usr/local/lib/python3.9/site-packages/prompt_toolkit/output/windows10.py�<lambda>'�z+Windows10_Output.__init__.<locals>.<lambda>)rr�win32_outputr�vt100_outputrr�kernel32�GetStdHandler�	_hconsole)�selfrrrrr�__init__!s
�zWindows10_Output.__init__�rc
Csjtd�}tj�|jt|��tj�|jtttB��z|j	�
�Wtj�|j|�ntj�|j|�0dS)z3
        Write to output stream and flush.
        rN)rrr�GetConsoleModer r�SetConsoleMode�ENABLE_PROCESSED_INPUT�"ENABLE_VIRTUAL_TERMINAL_PROCESSINGr�flush)r!�
original_moderrrr(+s
�zWindows10_Output.flush�boolcCsdS)NFr�r!rrr�responds_to_cpr@sz Windows10_Output.responds_to_cpr�strr)�namercCs$|dvrt|j|�St|j|�SdS)N)�get_sizeZget_rows_below_cursor_positionZscroll_buffer_to_promptZget_win32_screen_buffer_info)�getattrrr)r!r.rrr�__getattr__Ds
zWindows10_Output.__getattr__rcCs|jdur|jStjS)z�
        Return the default color depth for a windows terminal.

        Contrary to the Vt100 implementation, this doesn't depend on a $TERM
        variable.
        N)rrZ
TRUE_COLORr+rrr�get_default_color_depthXs
	z(Windows10_Output.get_default_color_depth)N)
�__name__�
__module__�__qualname__�__doc__r"r(�propertyr,r1r2rrrrrs�
r*r#c
Cs|tjdkrdSttj�t��}td�}tj�|t	|��z.tj�
|tttB��}|dkWtj�
||�Stj�
||�0dS)z_
    Returns True when we're running Windows and VT100 escape sequences are
    supported.
    rFrr
N)
�sys�platformrrrrrrr$rr%r&r')Zhconsoler)�resultrrr�is_win_vt100_enabledos
��r;)�
__future__rr8r9�ctypesrrZctypes.wintypesrr�typingrr	Zprompt_toolkit.data_structuresrZprompt_toolkit.win32_typesr�baserZcolor_depthrZvt100rrr�__all__r&r'r�registerr;rrrr�<module>s$�P


Yohohohohohooho | Sanrei Aya