static bool test_opaque_keypad(WINDOW *win, int mode) { if (mode >= 0) { keypad(win, mode); } return is_keypad(win); }
/** * 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); } }