U
ʗRe
@ sV d dl mZmZmZmZ d dlmZmZ d dlm Z m
Z
mZ ee eddddZdS ) )IterableSequenceTuplecast)LegacyWindowsTermWindowsCoordinates)ControlCodeControlTypeSegmentN)buffertermreturnc C s | D ]\}}}|s2|r&| || n
|| q|}|D ]}|d }|tjkrtttttf |\}} }
|t|
d | d d q:|tj kr|d q:|tj
kr|tdd q:|tjkr| q:|tj
kr| q:|tjk r| q:|tjkr| q:|tjkr@ttttf |\}}||d q:|tjkrV| q:|tjkrl| q:|tjkrttttf |\}}|dkr| n&|dkr| n|dkr| q:|tjkr:ttttf |\}}
||
q:qdS )a Makes appropriate Windows Console API calls based on the segments in the buffer.
Args:
buffer (Iterable[Segment]): Iterable of Segments to convert to Win32 API calls.
term (LegacyWindowsTerm): Used to call the Windows Console API.
r )rowcol
N) Zwrite_styled
write_textr CURSOR_MOVE_TOr r intZmove_cursor_tor CARRIAGE_RETURNHOME CURSOR_UPZmove_cursor_upCURSOR_DOWNZmove_cursor_downCURSOR_FORWARDZmove_cursor_forwardCURSOR_BACKWARDZmove_cursor_backwardCURSOR_MOVE_TO_COLUMNZmove_cursor_to_columnHIDE_CURSORhide_cursorSHOW_CURSORshow_cursor
ERASE_IN_LINEZerase_end_of_lineZerase_start_of_lineZ
erase_lineSET_WINDOW_TITLEstr set_title)r r textstylecontrol
control_codesZcontrol_codeZcontrol_type_xycolumnmodetitle r/ /builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/rich/_windows_renderer.pylegacy_windows_render sR
r1 )
typingr r r r pip._vendor.rich._win32_consoler r Zpip._vendor.rich.segmentr r r
r1 r/ r/ r/ r0