Method: Curses::Window#nodelay=
- Defined in:
- ext/curses/curses.c
#nodelay=(bool) ⇒ Object
When in no-delay mode Curses::Window#getch is a non-blocking call. If no input is ready #getch returns ERR.
When in delay mode (bool is false which is the default), Curses::Window#getch blocks until a key is pressed.
3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 |
# File 'ext/curses/curses.c', line 3175 static VALUE window_nodelay(VALUE obj, VALUE val) { struct windata *winp; GetWINDOW(obj,winp); /* nodelay() of NetBSD's libcurses returns no value */ #if defined(__NetBSD__) && !defined(NCURSES_VERSION) nodelay(winp->window, RTEST(val) ? TRUE : FALSE); return Qnil; #else return nodelay(winp->window,RTEST(val) ? TRUE : FALSE) == OK ? Qtrue : Qfalse; #endif } |