예제 #1
0
static bool
test_opaque_keypad(WINDOW *win, int mode)
{
    if (mode >= 0) {
	keypad(win, mode);
    }
    return is_keypad(win);
}
예제 #2
0
파일: readline.c 프로젝트: uhlin/swirc
/**
 * Apply window-options to the readline panels.
 *
 * @param win Window
 * @return Void
 */
static void
apply_readline_options(WINDOW *win)
{
#define KEYPAD(win, b)   ((void) keypad(win, b))
#define NODELAY(win, b)  ((void) nodelay(win, b))
#define SCROLLOK(win, b) ((void) scrollok(win, b))
    if (!is_keypad(win)) {
	KEYPAD(win, 1);
    }
    if (is_nodelay(win)) {
	NODELAY(win, 0);
    }
    if (is_scrollok(win)) {
	SCROLLOK(win, 0);
    }
}