Lines Matching +full:row +full:- +full:delay
2 * Copyright (C) 1984-2024 Mark Nudelman
13 * Uses termcap to be as terminal-independent as possible.
191 public int vt_enabled = -1; /* Is virtual terminal processing available? */
223 *sc_deinit; /* Exit terminal de-initialization */
225 static int attrcolor = -1;
234 public int kill_char; /* The user's line-kill char */
235 public int werase_char; /* The user's word-erase char */
250 static int termcap_debug = -1;
308 s->c_lflag &= ~(0
326 s->c_oflag |= (0
346 s->c_oflag &= ~(0
370 * 5. Signal-causing characters such as ctrl-C (interrupt),
680 /* MS-DOS, Windows, or OS2 */
723 for (p = envs; p != NULL; p = p->next)
724 if (strcmp(p->name, capname) == 0)
725 return p->value;
727 p->name = save(capname);
728 p->value = (char *) ecalloc(strlen(capname)+3, sizeof(char));
729 sprintf(p->value, "<%s>", capname);
730 p->next = envs;
732 return p->value;
756 return (-1);
818 sys_height = scr.srWindow.Bottom - scr.srWindow.Top + 1;
819 sys_width = scr.srWindow.Right - scr.srWindow.Left + 1;
929 * Figure out how many empty loops it takes to delay a millisecond.
956 * Delay for a specified number of milliseconds.
958 static void delay(int msec)
962 while (msec-- > 0)
1301 * The user can turn it back on with -g,
1308 * Get various string-valued capabilities.
1368 * We need it only if we don't have home or lower-left.
1421 strcpy(sp, tgoto(sc_move, 0, sc_height-1));
1534 * terminal-specific screen manipulation.
1541 static void _settextposition(int row, int col)
1547 cpos.X = csbi.srWindow.Left + (col - 1);
1548 cpos.Y = csbi.srWindow.Top + (row - 1);
1568 int row;
1579 for (row = 0; row < sc_height; row++)
1614 * Termcap-like init with a private win32 console.
1640 size.X = scr.srWindow.Right - scr.srWindow.Left + 1;
1641 size.Y = scr.srWindow.Bottom - scr.srWindow.Top + 1;
1674 * Like tputs but we handle $<...> delay strings here because
1689 int delay;
1695 /* Perform the delay. */
1696 delay = lstrtoic(str, &str, 10);
1698 if (ckd_mul(&delay, delay, affcnt))
1699 delay = INT_MAX;
1701 sleep_ms(delay);
1702 /* Skip past closing ">" at end of delay string. */
1783 * but with saved scrolled-off-the-top lines. This way,
1903 movetext(1,1, sc_width,sc_height-1, 1,2);
1924 rcSrc.Bottom--;
1926 /* Move the top left corner of the source window down one row. */
1947 * into the scrollback buffer when we go down-one-line (in WIN32).
1957 if (n >= sc_height - 1)
1968 /* Get the extent of all-visible-rows-but-the-last. */
1982 new_org.Y = rcSrc.Top - n;
1992 goto_line(sc_height - n - 1);
2018 winsz = csbi.dwSize.X * (csbi.srWindow.Bottom - csbi.srWindow.Top + 1);
2044 if (n >= sc_height - 1)
2078 topleft.Y = rcSrc.Bottom - n;
2079 size = (n * csbi.dwSize.X) + (rcSrc.Right - topleft.X);
2087 csbi.dwCursorPosition.Y -= n;
2116 int row;
2122 row = scr.dwCursorPosition.Y - scr.srWindow.Top + 1;
2126 row = wherey();
2130 row = tpos.row;
2134 _settextposition(row, 1);
2154 size.Y = scr.srWindow.Bottom - scr.srWindow.Top + 1;
2155 size.X = scr.srWindow.Right - scr.srWindow.Left + 1;
2195 int row, col;
2210 for (row = w.numtextrows; row > 0; row--)
2258 delay(100);
2278 delay(100);
2369 _settextwindow(tpos.row, tpos.col, tpos.row, sc_width);
2375 _settextposition(tpos.row, tpos.col);
2393 scr.dwSize.X - cpos.X, cpos, &nchars);
2395 scr.dwSize.X - cpos.X, cpos, &nchars);
2404 * Clear the screen if there's off-screen memory below the display.
2426 * If we're in a non-normal attribute mode, temporarily exit
2448 * Color string may be "x[y]" where x and y are 4-bit color chars,
2450 * Any of x,y,N,M may also be "-" to mean "unchanged".
2454 * Parse a 4-bit color char.
2476 case '-': return CV_NOCHANGE;
2486 if (**ps == '-')
2631 tput_fmt(ESCS"[m", -1, f_putc);
2848 int row, col;
2855 row = tpos.row;
2859 row = wherey();
2865 row = scr.dwCursorPosition.Y - scr.srWindow.Top + 1;
2866 col = scr.dwCursorPosition.X - scr.srWindow.Left + 1;
2873 _settextposition(row, col-1);
2912 wch->wc_ch = ch;
2913 wch->wc_next = NULL;
2919 for (pch = win32_queue; pch->wc_next != NULL; pch = pch->wc_next)
2921 pch->wc_next = wch;
2932 wch->wc_ch = ch;
2933 wch->wc_next = win32_queue;
2943 char ch = wch->wc_ch;
2944 win32_queue = wch->wc_next;
2956 if (!mousecap || xip->ir.EventType != MOUSE_EVENT ||
2957 xip->ir.Event.MouseEvent.dwEventFlags == MOUSE_MOVED)
2961 /* TODO: switch to the 1006 protocol to allow specific-button-up reports */
2962 switch (xip->ir.Event.MouseEvent.dwEventFlags)
2965 if (xip->ir.Event.MouseEvent.dwButtonState == 0)
2967 else if (xip->ir.Event.MouseEvent.dwButtonState == 1) /* leftmost */
2969 else if (xip->ir.Event.MouseEvent.dwButtonState == 2) /* rightmost */
2971 else if (xip->ir.Event.MouseEvent.dwButtonState == 4) /* middle ("next-to-leftmost") */
2977 b = X11MOUSE_OFFSET + (((int)xip->ir.Event.MouseEvent.dwButtonState < 0) ? X11MOUSE_WHEEL_DOWN : X11MOUSE_WHEEL_UP);
2987 win32_enqueue(X11MOUSE_OFFSET + xip->ir.Event.MouseEvent.dwMousePosition.X + 1);
2988 win32_enqueue(X11MOUSE_OFFSET + xip->ir.Event.MouseEvent.dwMousePosition.Y + 1);
3010 * Get an input char from an INPUT_RECORD and store in xip->ichar.
3015 LWCHAR ch = xip->ir.Event.KeyEvent.uChar.UnicodeChar;
3016 xip->ichar = ch;
3019 int is_down = xip->ir.Event.KeyEvent.bKeyDown;
3025 xip->ir.Event.KeyEvent.bKeyDown = 1;
3032 hi_surr = 0x10000 + ((ch - 0xD800) << 10);
3036 xip->ichar = hi_surr + (ch - 0xDC00);
3044 * Handle a scan code (non-ASCII) key input.
3048 int scan = -1;
3049 if (xip->ir.Event.KeyEvent.dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED))
3051 switch (xip->ir.Event.KeyEvent.wVirtualScanCode)
3063 } else if (xip->ir.Event.KeyEvent.dwControlKeyState & SHIFT_PRESSED)
3065 if (xip->ichar == '\t')
3068 if (scan < 0 && xip->ichar == 0)
3069 scan = xip->ir.Event.KeyEvent.wVirtualScanCode;
3090 if (xip->ir.EventType != KEY_EVENT ||
3091 ((xip->ir.Event.KeyEvent.dwControlKeyState & (RIGHT_ALT_PRESSED|LEFT_CTRL_PRESSED)) == (RIGHT_ALT_PRESSED|LEFT_CTRL_PRESSED) && xip->ir.Event.KeyEvent.uChar.UnicodeChar == 0) ||
3092 (xip->ir.Event.KeyEvent.wVirtualScanCode == 0 && xip->ir.Event.KeyEvent.uChar.UnicodeChar == 0) ||
3093 xip->ir.Event.KeyEvent.wVirtualScanCode == PCK_CAPS_LOCK ||
3094 xip->ir.Event.KeyEvent.wVirtualScanCode == PCK_NUM_LOCK ||
3095 (xip->ir.Event.KeyEvent.wVirtualKeyCode == VK_MENU && xip->ir.Event.KeyEvent.uChar.UnicodeChar == 0) ||
3096 xip->ir.Event.KeyEvent.wVirtualKeyCode == VK_KANJI ||
3097 xip->ir.Event.KeyEvent.wVirtualKeyCode == VK_SHIFT ||
3098 xip->ir.Event.KeyEvent.wVirtualKeyCode == VK_CONTROL)
3103 if (!xip->ir.Event.KeyEvent.bKeyDown)
3109 repeat = xip->ir.Event.KeyEvent.wRepeatCount;
3113 put_wchar(&up, xip->ichar);
3114 for (; repeat > 0; --repeat)
3194 * We've got UTF-8 text in a non-UTF-8 console. Convert it to
3198 * "static" wtext is not a state - only avoid 16K on stack.
3208 len = sizeof(buf) - 1;