Lines Matching refs:WINCONSOLE

143 	if (WINCONSOLE.buffered) {  in _nc_console_size()
144 *Lines = (int) (WINCONSOLE.SBI.dwSize.Y); in _nc_console_size()
145 *Cols = (int) (WINCONSOLE.SBI.dwSize.X); in _nc_console_size()
147 *Lines = (int) (WINCONSOLE.SBI.srWindow.Bottom + 1 - in _nc_console_size()
148 WINCONSOLE.SBI.srWindow.Top); in _nc_console_size()
149 *Cols = (int) (WINCONSOLE.SBI.srWindow.Right + 1 - in _nc_console_size()
150 WINCONSOLE.SBI.srWindow.Left); in _nc_console_size()
204 #define OutHandle() ((WINCONSOLE.isTermInfoConsole || WINCONSOLE.progMode) ? WINCONSOLE.hdl : WINCO…
209 if (WINCONSOLE.lastOut != WINCONSOLE.hdl) { in _nc_console_selectActiveHandle()
210 WINCONSOLE.lastOut = WINCONSOLE.hdl; in _nc_console_selectActiveHandle()
211 SetConsoleActiveScreenBuffer(WINCONSOLE.lastOut); in _nc_console_selectActiveHandle()
219 if (hdl == WINCONSOLE.inp) { in _nc_console_fd2handle()
221 } else if (hdl == WINCONSOLE.hdl) { in _nc_console_fd2handle()
223 } else if (hdl == WINCONSOLE.out) { in _nc_console_fd2handle()
233 if (hdl != WINCONSOLE.inp && (!WINCONSOLE.isTermInfoConsole && WINCONSOLE.progMode)) { in _nc_console_fd2handle()
234 if (hdl == WINCONSOLE.out && hdl != WINCONSOLE.hdl) { in _nc_console_fd2handle()
236 hdl = WINCONSOLE.hdl; in _nc_console_fd2handle()
260 if (hdl == WINCONSOLE.inp) { in _nc_console_setmode()
262 if (WINCONSOLE.isTermInfoConsole) in _nc_console_setmode()
271 if (WINCONSOLE.isTermInfoConsole) in _nc_console_setmode()
279 if (WINCONSOLE.isTermInfoConsole) in _nc_console_setmode()
286 alt = WINCONSOLE.inp; in _nc_console_setmode()
288 if (WINCONSOLE.isTermInfoConsole) in _nc_console_setmode()
310 if (hdl == WINCONSOLE.inp) { in _nc_console_getmode()
322 alt = WINCONSOLE.inp; in _nc_console_getmode()
342 if (hdl == WINCONSOLE.hdl || in _nc_console_flush()
343 hdl == WINCONSOLE.inp || in _nc_console_flush()
344 hdl == WINCONSOLE.out) { in _nc_console_flush()
345 if (!FlushConsoleInputBuffer(WINCONSOLE.inp)) in _nc_console_flush()
382 WINCONSOLE.save_region.Top = 0; in save_original_screen()
383 WINCONSOLE.save_region.Left = 0; in save_original_screen()
384 WINCONSOLE.save_region.Bottom = (SHORT) (WINCONSOLE.SBI.dwSize.Y - 1); in save_original_screen()
385 WINCONSOLE.save_region.Right = (SHORT) (WINCONSOLE.SBI.dwSize.X - 1); in save_original_screen()
391 WINCONSOLE.save_region.Top = WINCONSOLE.SBI.srWindow.Top; in save_original_screen()
392 WINCONSOLE.save_region.Left = WINCONSOLE.SBI.srWindow.Left; in save_original_screen()
393 WINCONSOLE.save_region.Bottom = WINCONSOLE.SBI.srWindow.Bottom; in save_original_screen()
394 WINCONSOLE.save_region.Right = WINCONSOLE.SBI.srWindow.Right; in save_original_screen()
396 WINCONSOLE.window_only = TRUE; in save_original_screen()
413 SMALL_RECT save_region = WINCONSOLE.save_region;
416 WINCONSOLE.window_only ? "window" : "entire buffer"));
418 bufferCoord.X = (SHORT) (WINCONSOLE.window_only ?
419 WINCONSOLE.SBI.srWindow.Left : 0);
420 bufferCoord.Y = (SHORT) (WINCONSOLE.window_only ?
421 WINCONSOLE.SBI.srWindow.Top : 0);
423 if (write_screen(WINCONSOLE.hdl,
424 WINCONSOLE.save_screen,
425 WINCONSOLE.save_size,
431 WINCONSOLE.save_size.Y,
432 WINCONSOLE.save_size.X,
451 WINCONSOLE.save_size.X = (SHORT) (WINCONSOLE.save_region.Right in read_screen_data()
452 - WINCONSOLE.save_region.Left + 1); in read_screen_data()
453 WINCONSOLE.save_size.Y = (SHORT) (WINCONSOLE.save_region.Bottom in read_screen_data()
454 - WINCONSOLE.save_region.Top + 1); in read_screen_data()
456 want = (size_t) (WINCONSOLE.save_size.X * WINCONSOLE.save_size.Y); in read_screen_data()
458 if ((WINCONSOLE.save_screen = malloc(want * sizeof(CHAR_INFO))) != 0) { in read_screen_data()
459 bufferCoord.X = (SHORT) (WINCONSOLE.window_only ? in read_screen_data()
460 WINCONSOLE.SBI.srWindow.Left : 0); in read_screen_data()
461 bufferCoord.Y = (SHORT) (WINCONSOLE.window_only ? in read_screen_data()
462 WINCONSOLE.SBI.srWindow.Top : 0); in read_screen_data()
465 WINCONSOLE.window_only ? "window" : "buffer", in read_screen_data()
466 WINCONSOLE.save_size.Y, WINCONSOLE.save_size.X, in read_screen_data()
467 WINCONSOLE.save_region.Top, in read_screen_data()
468 WINCONSOLE.save_region.Left, in read_screen_data()
469 WINCONSOLE.save_region.Bottom, in read_screen_data()
470 WINCONSOLE.save_region.Right, in read_screen_data()
474 if (read_screen(WINCONSOLE.hdl, in read_screen_data()
475 WINCONSOLE.save_screen, in read_screen_data()
476 WINCONSOLE.save_size, in read_screen_data()
478 &WINCONSOLE.save_region)) { in read_screen_data()
482 FreeAndNull(WINCONSOLE.save_screen); in read_screen_data()
493 if (GetConsoleScreenBufferInfo(WINCONSOLE.hdl, &(WINCONSOLE.SBI))) { in _nc_console_get_SBI()
496 WINCONSOLE.SBI.dwSize.X, in _nc_console_get_SBI()
497 WINCONSOLE.SBI.dwSize.Y)); in _nc_console_get_SBI()
499 WINCONSOLE.SBI.dwMaximumWindowSize.X, in _nc_console_get_SBI()
500 WINCONSOLE.SBI.dwMaximumWindowSize.Y)); in _nc_console_get_SBI()
502 WINCONSOLE.SBI.dwCursorPosition.X, in _nc_console_get_SBI()
503 WINCONSOLE.SBI.dwCursorPosition.Y)); in _nc_console_get_SBI()
505 WINCONSOLE.SBI.srWindow.Top, in _nc_console_get_SBI()
506 WINCONSOLE.SBI.srWindow.Bottom, in _nc_console_get_SBI()
507 WINCONSOLE.SBI.srWindow.Left, in _nc_console_get_SBI()
508 WINCONSOLE.SBI.srWindow.Right)); in _nc_console_get_SBI()
509 if (WINCONSOLE.buffered) { in _nc_console_get_SBI()
510 WINCONSOLE.origin.X = 0; in _nc_console_get_SBI()
511 WINCONSOLE.origin.Y = 0; in _nc_console_get_SBI()
513 WINCONSOLE.origin.X = WINCONSOLE.SBI.srWindow.Left; in _nc_console_get_SBI()
514 WINCONSOLE.origin.Y = WINCONSOLE.SBI.srWindow.Top; in _nc_console_get_SBI()
553 if (memcmp(info, &WINCONSOLE.SBI, sizeof(*info)) != 0) { in _nc_console_set_scrollback()
555 WINCONSOLE.SBI = *info; in _nc_console_set_scrollback()
594 SetConsoleScreenBufferSize(WINCONSOLE.hdl, coord); /* dwSize */ in _nc_console_set_scrollback()
595 SetConsoleWindowInfo(WINCONSOLE.hdl, TRUE, &rect); /* srWindow */ in _nc_console_set_scrollback()
652 switch (WINCONSOLE.numButtons) { in decode_mouse()
671 #define AdjustY() (WINCONSOLE.buffered ? 0 : (int) WINCONSOLE.SBI.srWindow.Top)
732 if (!WINCONSOLE.isTermInfoConsole) { in MapKey()
738 WINCONSOLE.map, in MapKey()
758 if (!WINCONSOLE.isTermInfoConsole) { in AnsiKey()
764 WINCONSOLE.ansi_map, in AnsiKey()
791 WINCONSOLE.rmap, in _nc_console_keyok()
816 WINCONSOLE.rmap, in _nc_console_keyExist()
939 if (!WINCONSOLE.isTermInfoConsole && in _nc_console_twait()
1138 WINCONSOLE.isTermInfoConsole = assumeTermInfo; in _nc_console_checkinit()
1140 WINCONSOLE.map = (LPDWORD) malloc(sizeof(DWORD) * MAPSIZE); in _nc_console_checkinit()
1141 WINCONSOLE.rmap = (LPDWORD) malloc(sizeof(DWORD) * MAPSIZE); in _nc_console_checkinit()
1142 WINCONSOLE.ansi_map = (LPDWORD) malloc(sizeof(DWORD) * MAPSIZE); in _nc_console_checkinit()
1146 WINCONSOLE.rmap[i] = WINCONSOLE.map[i] = in _nc_console_checkinit()
1148 WINCONSOLE.ansi_map[i] = (DWORD) ansi_keys[i]; in _nc_console_checkinit()
1150 WINCONSOLE.rmap[i] = WINCONSOLE.map[i] = in _nc_console_checkinit()
1153 WINCONSOLE.ansi_map[i] = in _nc_console_checkinit()
1158 qsort(WINCONSOLE.ansi_map, in _nc_console_checkinit()
1162 qsort(WINCONSOLE.map, in _nc_console_checkinit()
1166 qsort(WINCONSOLE.rmap, in _nc_console_checkinit()
1172 WINCONSOLE.numButtons = (int) num_buttons; in _nc_console_checkinit()
1174 WINCONSOLE.numButtons = 1; in _nc_console_checkinit()
1180 WINCONSOLE.pairs[i] = a; in _nc_console_checkinit()
1183 GetConsoleMode(WINCONSOLE.handle, &WINCONSOLE.originalMode.value) in _nc_console_checkinit()
1185 if (WINCONSOLE.isTermInfoConsole) { in _nc_console_checkinit()
1186 WINCONSOLE.inp = GetStdHandle(STD_INPUT_HANDLE); in _nc_console_checkinit()
1187 WINCONSOLE.out = GetStdHandle(STD_OUTPUT_HANDLE); in _nc_console_checkinit()
1188 WINCONSOLE.hdl = WINCONSOLE.out; in _nc_console_checkinit()
1199 WINCONSOLE.inp = GetDirectHandle("CONIN$", FILE_SHARE_READ); in _nc_console_checkinit()
1200 WINCONSOLE.out = GetDirectHandle("CONOUT$", FILE_SHARE_WRITE); in _nc_console_checkinit()
1206 WINCONSOLE.hdl = WINCONSOLE.out; in _nc_console_checkinit()
1210 WINCONSOLE.hdl = in _nc_console_checkinit()
1230 if (WINCONSOLE.hdl != INVALID_HANDLE_VALUE) { in _nc_console_checkinit()
1231 WINCONSOLE.buffered = buffered; in _nc_console_checkinit()
1233 WINCONSOLE.save_SBI = WINCONSOLE.SBI; in _nc_console_checkinit()
1236 _nc_console_set_scrollback(FALSE, &WINCONSOLE.SBI); in _nc_console_checkinit()
1238 GetConsoleCursorInfo(WINCONSOLE.hdl, &WINCONSOLE.save_CI); in _nc_console_checkinit()
1240 (WINCONSOLE.save_CI.bVisible ? "" : "not-"), in _nc_console_checkinit()
1241 (int) WINCONSOLE.save_CI.dwSize)); in _nc_console_checkinit()
1244 WINCONSOLE.initialized = TRUE; in _nc_console_checkinit()
1247 res = (WINCONSOLE.hdl != INVALID_HANDLE_VALUE); in _nc_console_checkinit()