| Module | Curses |
| In: |
curses/curses.c
|
————————- Initialization ————————-
| cbreak | -> | crmode |
| nocbreak | -> | nocrmode |
def close_screen
/* def close_screen */
static VALUE
curses_close_screen()
{
#ifdef HAVE_ISENDWIN
if (!isendwin())
#endif
endwin();
rb_stdscr = 0;
return Qnil;
}
def delelteln
/* def delelteln */
static VALUE
curses_deleteln(obj)
VALUE obj;
{
#if defined(HAVE_DELETELN) || defined(deleteln)
deleteln();
#endif
return Qnil;
}
def init_screen
/* def init_screen */
static VALUE
curses_init_screen()
{
rb_secure(4);
if (rb_stdscr) return rb_stdscr;
initscr();
if (stdscr == 0) {
rb_raise(rb_eRuntimeError, "can't initialize curses");
}
clear();
rb_stdscr = prep_window(cWindow, stdscr);
return rb_stdscr;
}
def stdscr def init_screen
/* def init_screen */
static VALUE
curses_init_screen()
{
rb_secure(4);
if (rb_stdscr) return rb_stdscr;
initscr();
if (stdscr == 0) {
rb_raise(rb_eRuntimeError, "can't initialize curses");
}
clear();
rb_stdscr = prep_window(cWindow, stdscr);
return rb_stdscr;
}
USE_MOUSE
/* USE_MOUSE */
static VALUE
curses_timeout(VALUE obj, VALUE delay)
{
#ifdef HAVE_TIMEOUT
timeout(NUM2INT(delay));
return Qnil;
#else
rb_notimplement();
#endif
}
ruby-doc.org is a service of James Britt and Happy Camper Studios, a Ruby application development company in Phoenix, AZ.
Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.
For more information on the Ruby programming language, visit ruby-lang.org.
Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.