24 int iBufferHeight, iScrollHeight, iClearFrom, iClearTo, iClearPos;
33 int move_size = ((remaining < rows) ? remaining : rows);
45 dwDest.X = dwDest.Y = 0;
59 if( iBufferHeight <= rows ) {
68 srScroll.Left = dwDest.X;
69 srScroll.Top = (SHORT) (dwDest.Y + rows);
71 iScrollHeight = srScroll.Bottom - srScroll.Top + 1;
72 if( iScrollHeight < rows ) {
75 iClearFrom = dwDest.Y + iScrollHeight;
76 iClearTo = srScroll.Bottom + 1;
78 iClearFrom = iClearTo = 0;
82 FillChar.Char.UnicodeChar = 32;
84 ScrollConsoleScreenBufferW( hnd, &srScroll,
NULL, dwDest, &FillChar );
89 if( iClearFrom!=iClearTo ) {
93 for( iClearPos=iClearFrom; iClearPos!=iClearTo; ++iClearPos ) {
95 COORD coord = { x1, (SHORT) iClearPos };
96 FillConsoleOutputAttribute( hnd, attr, width, coord, &written);
97 FillConsoleOutputCharacterW( hnd,
_LC(
' '), width, coord, &written );
114 CHAR_INFO *lpBuffer = alloca(
sizeof(CHAR_INFO) * length );
116 COORD dwBufferSize = { (SHORT) length, 1 };
117 COORD dwBufferCoord = { 0, 0 };
118 SMALL_RECT srWriteRegion = {
121 (SHORT) (handle->
Coord.
X + length - 1),
127 for( i=0; i!=length; ++i ) {
128 CHAR_INFO *pCharInfo = lpBuffer + i;
129 pCharInfo->Attributes = wAttributes;
130 pCharInfo->Char.UnicodeChar = pachText[i];
133 result = WriteConsoleOutputW( hnd,
149 int win_left, win_top, win_cols, win_rows;
150 int view_top, view_bottom;
167 DWORD dwBytesWritten,
175 pachText += dwBytesWritten;
176 bytes -= dwBytesWritten;
190 hooks.
Border.
Top = win_top + view_top - 1;
203 CONSOLE_SCREEN_BUFFER_INFO screen_info;
215 hooks.
Coord.
X = screen_info.dwCursorPosition.X;
216 hooks.
Coord.
Y = screen_info.dwCursorPosition.Y;
245 COORD dwCoord = { (SHORT) hooks.
Coord.
X, (SHORT) hooks.
Coord.
Y };
246 SetConsoleCursorPosition( info.
hOutput,
255 SMALL_RECT srWindow =
262 SetConsoleWindowInfo( info.
hOutput,
TRUE, &srWindow );