curses.c File Reference
`#include "ruby.h"`
`#include "ruby/io.h"`
`#include <curses.h>`

Go to the source code of this file.

## Data Structures

struct | windata
struct | wgetch_arg
struct | wgetstr_arg

## Macros

#define | NUM2CH NUM2CHR
#define | CH2FIX CHR2FIX
#define | GetWINDOW(obj, winp)
#define | curses_stdscr curses_init_screen
#define | curses_closed rb_f_notimplement
#define | curses_ungetch rb_f_notimplement
#define | GETSTR_BUF_SIZE 1024
#define | curses_use_default_colors rb_f_notimplement
#define | curses_tabsize_set rb_f_notimplement
#define | curses_tabsize_get rb_f_notimplement
#define | curses_escdelay_set rb_f_notimplement
#define | curses_escdelay_get rb_f_notimplement
#define | curses_timeout rb_f_notimplement
#define | curses_def_prog_mode rb_f_notimplement
#define | curses_reset_prog_mode rb_f_notimplement
#define | window_keypad rb_f_notimplement
#define | window_nodelay rb_f_notimplement
#define | window_timeout rb_f_notimplement
#define | rb_curses_define_const(c) rb_define_const(mCurses,#c,UINT2NUM(c))

## Functions

static VALUE | window_attroff (VALUE obj, VALUE attrs)
static VALUE | window_attron (VALUE obj, VALUE attrs)
static VALUE | window_attrset (VALUE obj, VALUE attrs)
static void | no_window (void)
static void | free_window (struct windata *winp)
static VALUE | prep_window (VALUE class, WINDOW *window)
static VALUE | curses_init_screen (void)
static VALUE | curses_close_screen (void)
static void | curses_finalize (VALUE dummy)
static VALUE | curses_clear (VALUE obj)
static VALUE | curses_clrtoeol (void)
static VALUE | curses_refresh (VALUE obj)
static VALUE | curses_doupdate (VALUE obj)
static VALUE | curses_echo (VALUE obj)
static VALUE | curses_noecho (VALUE obj)
static VALUE | curses_raw (VALUE obj)
static VALUE | curses_noraw (VALUE obj)
static VALUE | curses_cbreak (VALUE obj)
static VALUE | curses_nocbreak (VALUE obj)
static VALUE | curses_nl (VALUE obj)
static VALUE | curses_nonl (VALUE obj)
static VALUE | curses_beep (VALUE obj)
static VALUE | curses_flash (VALUE obj)
static int | curses_char (VALUE c)
static VALUE | curses_setpos (VALUE obj, VALUE y, VALUE x)
static VALUE | curses_standout (VALUE obj)
static VALUE | curses_standend (VALUE obj)
static VALUE | curses_inch (VALUE obj)
static VALUE | curses_addch (VALUE obj, VALUE ch)
static VALUE | curses_insch (VALUE obj, VALUE ch)
static VALUE | curses_addstr (VALUE obj, VALUE str)
static VALUE | getch_func (void *arg)
static VALUE | curses_getch (VALUE obj)
static VALUE | getstr_func (void *arg)
static VALUE | curses_getstr (VALUE obj)
static VALUE | curses_delch (VALUE obj)
static VALUE | curses_deleteln (VALUE obj)
static VALUE | curses_insertln (VALUE obj)
static VALUE | curses_keyname (VALUE obj, VALUE c)
static VALUE | curses_lines (void)
static VALUE | curses_cols (void)
static VALUE | curses_curs_set (VALUE obj, VALUE visibility)
static VALUE | curses_scrl (VALUE obj, VALUE n)
static VALUE | curses_setscrreg (VALUE obj, VALUE top, VALUE bottom)
static VALUE | curses_attroff (VALUE obj, VALUE attrs)
static VALUE | curses_attron (VALUE obj, VALUE attrs)
static VALUE | curses_attrset (VALUE obj, VALUE attrs)
static VALUE | curses_bkgdset (VALUE obj, VALUE ch)
static VALUE | curses_bkgd (VALUE obj, VALUE ch)
static VALUE | curses_resizeterm (VALUE obj, VALUE lin, VALUE col)
static VALUE | window_s_allocate (VALUE class)
static VALUE | window_initialize (VALUE obj, VALUE h, VALUE w, VALUE top, VALUE left)
static VALUE | window_subwin (VALUE obj, VALUE height, VALUE width, VALUE top, VALUE left)
static VALUE | window_close (VALUE obj)
static VALUE | window_clear (VALUE obj)
static VALUE | window_clrtoeol (VALUE obj)
static VALUE | window_refresh (VALUE obj)
static VALUE | window_noutrefresh (VALUE obj)
static VALUE | window_move (VALUE obj, VALUE y, VALUE x)
static VALUE | window_setpos (VALUE obj, VALUE y, VALUE x)
static VALUE | window_cury (VALUE obj)
static VALUE | window_curx (VALUE obj)
static VALUE | window_maxy (VALUE obj)
static VALUE | window_maxx (VALUE obj)
static VALUE | window_begy (VALUE obj)
static VALUE | window_begx (VALUE obj)
static VALUE | window_box (int argc, VALUE *argv, VALUE self)
static VALUE | window_standout (VALUE obj)
static VALUE | window_standend (VALUE obj)
static VALUE | window_inch (VALUE obj)
static VALUE | window_addch (VALUE obj, VALUE ch)
static VALUE | window_insch (VALUE obj, VALUE ch)
static VALUE | window_addstr (VALUE obj, VALUE str)
static VALUE | window_addstr2 (VALUE obj, VALUE str)
static VALUE | wgetch_func (void *_arg)
static VALUE | window_getch (VALUE obj)
static VALUE | wgetstr_func (void *_arg)
static VALUE | window_getstr (VALUE obj)
static VALUE | window_delch (VALUE obj)
static VALUE | window_deleteln (VALUE obj)
static VALUE | window_insertln (VALUE obj)
static VALUE | window_scrollok (VALUE obj, VALUE bf)
static VALUE | window_idlok (VALUE obj, VALUE bf)
static VALUE | window_setscrreg (VALUE obj, VALUE top, VALUE bottom)
static VALUE | window_scroll (VALUE obj)
static VALUE | window_scrl (VALUE obj, VALUE n)
static VALUE | window_bkgdset (VALUE obj, VALUE ch)
static VALUE | window_bkgd (VALUE obj, VALUE ch)
static VALUE | window_getbkgd (VALUE obj)
static VALUE | window_resize (VALUE obj, VALUE lin, VALUE col)
void | Init_curses (void)

## Variables

static VALUE | mCurses
static VALUE | mKey
static VALUE | cWindow
static VALUE | rb_stdscr

## Macro Definition Documentation

#define CH2FIX CHR2FIX

Definition at line 61 of file curses.c.

Referenced by curses_inch(), window_getbkgd(), and window_inch().

#define curses_closed rb_f_notimplement

Definition at line 216 of file curses.c.

Referenced by Init_curses().

#define curses_def_prog_mode rb_f_notimplement

Definition at line 1410 of file curses.c.

Referenced by Init_curses().

#define curses_escdelay_get rb_f_notimplement

Definition at line 1018 of file curses.c.

Referenced by Init_curses().

#define curses_escdelay_set rb_f_notimplement

Definition at line 1004 of file curses.c.

Referenced by Init_curses().

#define curses_reset_prog_mode rb_f_notimplement

Definition at line 1429 of file curses.c.

Referenced by Init_curses().

#define curses_stdscr curses_init_screen

Definition at line 151 of file curses.c.

Referenced by curses_addch(), curses_addstr(), curses_attroff(), curses_attron(), curses_attrset(), curses_beep(), curses_bkgd(), curses_bkgdset(), curses_cbreak(), curses_clear(), curses_close_screen(), curses_clrtoeol(), curses_curs_set(), curses_delch(), curses_deleteln(), curses_doupdate(), curses_echo(), curses_flash(), curses_getch(), curses_getstr(), curses_inch(), curses_insch(), curses_insertln(), curses_keyname(), curses_nl(), curses_nocbreak(), curses_noecho(), curses_nonl(), curses_noraw(), curses_raw(), curses_refresh(), curses_resizeterm(), curses_scrl(), curses_setpos(), curses_setscrreg(), curses_standend(), curses_standout(), and Init_curses().

#define curses_tabsize_get rb_f_notimplement

Definition at line 988 of file curses.c.

Referenced by Init_curses().

#define curses_tabsize_set rb_f_notimplement

Definition at line 975 of file curses.c.

Referenced by Init_curses().

#define curses_timeout rb_f_notimplement

Definition at line 1391 of file curses.c.

Referenced by Init_curses().

#define curses_ungetch rb_f_notimplement

Definition at line 505 of file curses.c.

Referenced by Init_curses().

#define curses_use_default_colors rb_f_notimplement

Definition at line 958 of file curses.c.

Referenced by Init_curses().

#define GETSTR_BUF_SIZE 1024

Definition at line 653 of file curses.c.

Referenced by curses_getstr(), getstr_func(), and wgetstr_func().

#define GetWINDOW | ( |  | obj,
|  |  | winp
| ) |  |

Value:
do {\
if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)\
rb_raise(rb_eSecurityError, "Insecure: operation on untainted window");\
Data_Get_Struct((obj), struct windata, (winp));\
if ((winp)->window == 0) no_window();\
} while (0)

Definition at line 86 of file curses.c.

Referenced by window_addch(), window_addstr(), window_attroff(), window_attron(), window_attrset(), window_begx(), window_begy(), window_bkgd(), window_bkgdset(), window_box(), window_clear(), window_close(), window_clrtoeol(), window_curx(), window_cury(), window_delch(), window_deleteln(), window_getbkgd(), window_getch(), window_getstr(), window_idlok(), window_inch(), window_insch(), window_insertln(), window_maxx(), window_maxy(), window_move(), window_noutrefresh(), window_refresh(), window_resize(), window_scrl(), window_scroll(), window_scrollok(), window_setpos(), window_setscrreg(), window_standend(), window_standout(), and window_subwin().

#define NUM2CH NUM2CHR

Definition at line 60 of file curses.c.

Referenced by curses_addch(), curses_bkgd(), curses_bkgdset(), curses_insch(), window_addch(), window_bkgd(), window_bkgdset(), window_box(), and window_insch().

#define rb_curses_define_const | ( |  | c | ) | rb_define_const(mCurses,#c,UINT2NUM(c))

Referenced by Init_curses().

#define window_keypad rb_f_notimplement

Definition at line 2403 of file curses.c.

Referenced by Init_curses().

#define window_nodelay rb_f_notimplement

Definition at line 2431 of file curses.c.

Referenced by Init_curses().

#define window_timeout rb_f_notimplement

Definition at line 2455 of file curses.c.

Referenced by Init_curses().

## Function Documentation

static VALUE curses_addch | ( | VALUE | obj,
|  | VALUE | ch
| ) |  |

static

Definition at line 579 of file curses.c.

References curses_stdscr, NUM2CH, and Qnil.

Referenced by Init_curses().

static VALUE curses_addstr | ( | VALUE | obj,
|  | VALUE | str
| ) |  |

static

Definition at line 609 of file curses.c.

References curses_stdscr, NIL_P, Qnil, rb_str_export_locale(), StringValue, and StringValueCStr.

Referenced by Init_curses().

static VALUE curses_attroff | ( | VALUE | obj,
|  | VALUE | attrs
| ) |  |

static

Definition at line 858 of file curses.c.

References curses_stdscr, rb_stdscr, and window_attroff().

Referenced by Init_curses().

static VALUE curses_attron | ( | VALUE | obj,
|  | VALUE | attrs
| ) |  |

static

Definition at line 875 of file curses.c.

References curses_stdscr, rb_stdscr, and window_attron().

Referenced by Init_curses().

static VALUE curses_attrset | ( | VALUE | obj,
|  | VALUE | attrs
| ) |  |

static

Definition at line 892 of file curses.c.

References curses_stdscr, rb_stdscr, and window_attrset().

Referenced by Init_curses().

static VALUE curses_beep | ( | VALUE | obj | ) |

static

Definition at line 438 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static VALUE curses_bkgd | ( | VALUE | obj,
|  | VALUE | ch
| ) |  |

static

Definition at line 934 of file curses.c.

References curses_stdscr, NUM2CH, Qfalse, and Qtrue.

Referenced by Init_curses().

static VALUE curses_bkgdset | ( | VALUE | obj,
|  | VALUE | ch
| ) |  |

static

Definition at line 913 of file curses.c.

References curses_stdscr, NUM2CH, and Qnil.

Referenced by Init_curses().

static VALUE curses_cbreak | ( | VALUE | obj | ) |

static

Definition at line 369 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static int curses_char | ( | VALUE | c | ) |

static

Definition at line 466 of file curses.c.

References FIXNUM_P, NUM2INT, rb_eArgError, rb_raise(), RSTRING_LEN, RSTRING_PTR, and StringValue.

Referenced by curses_keyname().

static VALUE curses_clear | ( | VALUE | obj | ) |

static

Definition at line 227 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static VALUE curses_close_screen | ( | void |  | ) |

static

Definition at line 167 of file curses.c.

References curses_stdscr, Qnil, and rb_stdscr.

Referenced by Init_curses().

static VALUE curses_clrtoeol | ( | void |  | ) |

static

Definition at line 240 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static VALUE curses_cols | ( | void |  | ) |

static

Definition at line 772 of file curses.c.

References INT2FIX.

Referenced by Init_curses().

static VALUE curses_curs_set | ( | VALUE | obj,
|  | VALUE | visibility
| ) |  |

static

Definition at line 787 of file curses.c.

References curses_stdscr, ERR, INT2FIX, NUM2INT, and Qnil.

Referenced by Init_curses().

static VALUE curses_delch | ( | VALUE | obj | ) |

static

Definition at line 690 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static VALUE curses_deleteln | ( | VALUE | obj | ) |

static

Definition at line 704 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static VALUE curses_doupdate | ( | VALUE | obj | ) |

static

Definition at line 270 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static VALUE curses_echo | ( | VALUE | obj | ) |

static

Definition at line 288 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static void curses_finalize | ( | VALUE | dummy | ) |

static

Definition at line 186 of file curses.c.

References HAVE_ISENDWIN, rb_gc_unregister_address(), and rb_stdscr.

Referenced by Init_curses().

static VALUE curses_flash | ( | VALUE | obj | ) |

static

Definition at line 456 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static VALUE curses_getch | ( | VALUE | obj | ) |

static

Definition at line 637 of file curses.c.

References curses_stdscr, EOF, getch_func(), Qnil, rb_isprint(), rb_locale_str_new(), rb_thread_blocking_region(), RUBY_UBF_IO, and UINT2NUM().

Referenced by Init_curses().

static VALUE curses_getstr | ( | VALUE | obj | ) |

static

Definition at line 674 of file curses.c.

References curses_stdscr, GETSTR_BUF_SIZE, getstr_func(), rb_locale_str_new_cstr(), rb_thread_blocking_region(), and RUBY_UBF_IO.

Referenced by Init_curses().

static VALUE curses_inch | ( | VALUE | obj | ) |

static

Definition at line 564 of file curses.c.

References CH2FIX, and curses_stdscr.

Referenced by Init_curses().

static VALUE curses_init_screen | ( | void |  | ) |

static

Definition at line 128 of file curses.c.

References cWindow, prep_window(), rb_eRuntimeError, rb_raise(), rb_secure(), and rb_stdscr.

Referenced by Init_curses(), and window_initialize().

static VALUE curses_insch | ( | VALUE | obj,
|  | VALUE | ch
| ) |  |

static

Definition at line 594 of file curses.c.

References curses_stdscr, NUM2CH, and Qnil.

Referenced by Init_curses().

static VALUE curses_insertln | ( | VALUE | obj | ) |

static

Definition at line 720 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static VALUE curses_keyname | ( | VALUE | obj,
|  | VALUE | c
| ) |  |

static

Definition at line 736 of file curses.c.

References curses_char(), curses_stdscr, name, Qnil, and rb_str_new_cstr().

Referenced by Init_curses().

static VALUE curses_lines | ( | void |  | ) |

static

Definition at line 761 of file curses.c.

References INT2FIX.

Referenced by Init_curses().

static VALUE curses_nl | ( | VALUE | obj | ) |

static

Definition at line 406 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static VALUE curses_nocbreak | ( | VALUE | obj | ) |

static

Definition at line 384 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static VALUE curses_noecho | ( | VALUE | obj | ) |

static

Definition at line 302 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static VALUE curses_nonl | ( | VALUE | obj | ) |

static

Definition at line 422 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static VALUE curses_noraw | ( | VALUE | obj | ) |

static

Definition at line 339 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static VALUE curses_raw | ( | VALUE | obj | ) |

static

Definition at line 324 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static VALUE curses_refresh | ( | VALUE | obj | ) |

static

Definition at line 254 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static VALUE curses_resizeterm | ( | VALUE | obj,
|  | VALUE | lin,
|  | VALUE | col
| ) |  |

static

Definition at line 1037 of file curses.c.

References curses_stdscr, NUM2INT, Qfalse, Qnil, and Qtrue.

Referenced by Init_curses().

static VALUE curses_scrl | ( | VALUE | obj,
|  | VALUE | n
| ) |  |

static

Definition at line 811 of file curses.c.

References curses_stdscr, NUM2INT, Qfalse, and Qtrue.

Referenced by Init_curses().

static VALUE curses_setpos | ( | VALUE | obj,
|  | VALUE | y,
|  | VALUE | x
| ) |  |

static

Definition at line 517 of file curses.c.

References curses_stdscr, NUM2INT, and Qnil.

Referenced by Init_curses().

static VALUE curses_setscrreg | ( | VALUE | obj,
|  | VALUE | top,
|  | VALUE | bottom
| ) |  |

static

Definition at line 838 of file curses.c.

References curses_stdscr, NUM2INT, Qfalse, and Qtrue.

Referenced by Init_curses().

static VALUE curses_standend | ( | VALUE | obj | ) |

static

Definition at line 551 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static VALUE curses_standout | ( | VALUE | obj | ) |

static

Definition at line 534 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static void free_window | ( | struct windata * | winp | ) |

static

Definition at line 94 of file curses.c.

References windata::window, and xfree().

Referenced by window_s_allocate().

static VALUE getch_func | ( | void * | arg | ) |

static

Definition at line 621 of file curses.c.

References Qnil.

Referenced by curses_getch().

static VALUE getstr_func | ( | void * | arg | ) |

static

Definition at line 656 of file curses.c.

References GETSTR_BUF_SIZE, and Qnil.

Referenced by curses_getstr().

void Init_curses | ( | void |  | ) |

Definition at line 2490 of file curses.c.

References CLASS_OF, curses_addch(), curses_addstr(), curses_attroff(), curses_attron(), curses_attrset(), curses_beep(), curses_bkgd(), curses_bkgdset(), curses_cbreak(), curses_clear(), curses_close_screen(), curses_closed, curses_clrtoeol(), curses_cols(), curses_curs_set(), curses_def_prog_mode, curses_delch(), curses_deleteln(), curses_doupdate(), curses_echo(), curses_escdelay_get, curses_escdelay_set, curses_finalize(), curses_flash(), curses_getch(), curses_getstr(), curses_inch(), curses_init_screen(), curses_insch(), curses_insertln(), curses_keyname(), curses_lines(), curses_nl(), curses_nocbreak(), curses_noecho(), curses_nonl(), curses_noraw(), curses_raw(), curses_refresh(), curses_reset_prog_mode, curses_resizeterm(), curses_scrl(), curses_setpos(), curses_setscrreg(), curses_standend(), curses_standout(), curses_stdscr, curses_tabsize_get, curses_tabsize_set, curses_timeout, curses_ungetch, curses_use_default_colors, cWindow, i, INT2FIX, INT2NUM(), mCurses, mKey, name, rb_cData, rb_cObject, rb_curses_define_const, rb_define_alloc_func(), rb_define_class_under(), rb_define_const(), rb_define_method(), rb_define_module(), rb_define_module_function(), rb_define_module_under(), rb_gc_register_address(), rb_set_end_proc(), rb_stdscr, rb_undef_method(), window_addch(), window_addstr(), window_addstr2(), window_attroff(), window_attron(), window_attrset(), window_begx(), window_begy(), window_bkgd(), window_bkgdset(), window_box(), window_clear(), window_close(), window_clrtoeol(), window_curx(), window_cury(), window_delch(), window_deleteln(), window_getbkgd(), window_getch(), window_getstr(), window_idlok(), window_inch(), window_initialize(), window_insch(), window_insertln(), window_keypad, window_maxx(), window_maxy(), window_move(), window_nodelay, window_noutrefresh(), window_refresh(), window_resize(), window_s_allocate(), window_scrl(), window_scroll(), window_scrollok(), window_setpos(), window_setscrreg(), window_standend(), window_standout(), window_subwin(), and window_timeout.

static void no_window | ( | void |  | ) |

static

Definition at line 81 of file curses.c.

References rb_eRuntimeError, and rb_raise().

static VALUE prep_window | ( | VALUE | class,
|  | WINDOW * | window
| ) |  |

static

Definition at line 102 of file curses.c.

References Data_Get_Struct, NULL, rb_eRuntimeError, rb_obj_alloc(), rb_raise(), and windata::window.

Referenced by curses_init_screen(), and window_subwin().

static VALUE wgetch_func | ( | void * | _arg | ) |

static

Definition at line 1920 of file curses.c.

References arg, wgetch_arg::c, Qnil, and wgetch_arg::win.

Referenced by window_getch().

static VALUE wgetstr_func | ( | void * | _arg | ) |

static

Definition at line 1961 of file curses.c.

References arg, GETSTR_BUF_SIZE, Qnil, wgetstr_arg::rtn, and wgetstr_arg::win.

Referenced by window_getstr().

static VALUE window_addch | ( | VALUE | obj,
|  | VALUE | ch
| ) |  |

static

Definition at line 1848 of file curses.c.

References GetWINDOW, NUM2CH, Qnil, and windata::window.

Referenced by Init_curses().

static VALUE window_addstr | ( | VALUE | obj,
|  | VALUE | str
| ) |  |

static

Definition at line 1884 of file curses.c.

References GetWINDOW, NIL_P, Qnil, rb_str_export_locale(), StringValue, StringValueCStr, and windata::window.

Referenced by Init_curses(), and window_addstr2().

static VALUE window_addstr2 | ( | VALUE | obj,
|  | VALUE | str
| ) |  |

static

Definition at line 1908 of file curses.c.

References window_addstr().

Referenced by Init_curses().

static VALUE window_attroff | ( | VALUE | obj,
|  | VALUE | attrs
| ) |  |

static

Definition at line 2193 of file curses.c.

References GetWINDOW, INT2FIX, NUM2INT, Qtrue, and windata::window.

Referenced by curses_attroff(), and Init_curses().

static VALUE window_attron | ( | VALUE | obj,
|  | VALUE | attrs
| ) |  |

static

Definition at line 2215 of file curses.c.

References GetWINDOW, INT2FIX, NUM2INT, Qtrue, rb_block_given_p(), rb_yield(), and windata::window.

Referenced by curses_attron(), and Init_curses().

static VALUE window_attrset | ( | VALUE | obj,
|  | VALUE | attrs
| ) |  |

static

Definition at line 2263 of file curses.c.

References GetWINDOW, INT2FIX, NUM2INT, Qtrue, and windata::window.

Referenced by curses_attrset(), and Init_curses().

static VALUE window_begx | ( | VALUE | obj | ) |

static

Definition at line 1729 of file curses.c.

References GetWINDOW, INT2FIX, and windata::window.

Referenced by Init_curses().

static VALUE window_begy | ( | VALUE | obj | ) |

static

Definition at line 1709 of file curses.c.

References GetWINDOW, INT2FIX, and windata::window.

Referenced by Init_curses().

static VALUE window_bkgd | ( | VALUE | obj,
|  | VALUE | ch
| ) |  |

static

Definition at line 2306 of file curses.c.

References GetWINDOW, NUM2CH, Qfalse, Qtrue, and windata::window.

Referenced by Init_curses().

static VALUE window_bkgdset | ( | VALUE | obj,
|  | VALUE | ch
| ) |  |

static

Definition at line 2285 of file curses.c.

References GetWINDOW, NUM2CH, Qnil, and windata::window.

Referenced by Init_curses().

static VALUE window_box | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |

static

Definition at line 1755 of file curses.c.

References GetWINDOW, NIL_P, NUM2CH, NUM2INT, Qnil, rb_scan_args(), windata::window, window_maxx(), and window_maxy().

Referenced by Init_curses().

static VALUE window_clear | ( | VALUE | obj | ) |

static

Definition at line 1521 of file curses.c.

References GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

static VALUE window_close | ( | VALUE | obj | ) |

static

Definition at line 1504 of file curses.c.

References GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

static VALUE window_clrtoeol | ( | VALUE | obj | ) |

static

Definition at line 1537 of file curses.c.

References GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

static VALUE window_curx | ( | VALUE | obj | ) |

static

Definition at line 1645 of file curses.c.

References GetWINDOW, INT2FIX, and windata::window.

Referenced by Init_curses().

static VALUE window_cury | ( | VALUE | obj | ) |

static

Definition at line 1629 of file curses.c.

References GetWINDOW, INT2FIX, and windata::window.

Referenced by Init_curses().

static VALUE window_delch | ( | VALUE | obj | ) |

static

Definition at line 1997 of file curses.c.

References GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

static VALUE window_deleteln | ( | VALUE | obj | ) |

static

Definition at line 2013 of file curses.c.

References GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

static VALUE window_getbkgd | ( | VALUE | obj | ) |

static

Definition at line 2324 of file curses.c.

References CH2FIX, ERR, GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

static VALUE window_getch | ( | VALUE | obj | ) |

static

Definition at line 1936 of file curses.c.

References wgetch_arg::c, EOF, GetWINDOW, Qnil, rb_isprint(), rb_locale_str_new(), rb_thread_blocking_region(), RUBY_UBF_IO, UINT2NUM(), wgetch_func(), wgetch_arg::win, and windata::window.

Referenced by Init_curses().

static VALUE window_getstr | ( | VALUE | obj | ) |

static

Definition at line 1979 of file curses.c.

References GetWINDOW, rb_locale_str_new_cstr(), rb_thread_blocking_region(), wgetstr_arg::rtn, RUBY_UBF_IO, wgetstr_func(), wgetstr_arg::win, and windata::window.

Referenced by Init_curses().

static VALUE window_idlok | ( | VALUE | obj,
|  | VALUE | bf
| ) |  |

static

Definition at line 2084 of file curses.c.

References FALSE, GetWINDOW, Qnil, RTEST, TRUE, and windata::window.

Referenced by Init_curses().

static VALUE window_inch | ( | VALUE | obj | ) |

static

Definition at line 1831 of file curses.c.

References CH2FIX, GetWINDOW, and windata::window.

Referenced by Init_curses().

static VALUE window_initialize | ( | VALUE | obj,
|  | VALUE | h,
|  | VALUE | w,
|  | VALUE | top,
|  | VALUE | left
| ) |  |

static

Definition at line 1455 of file curses.c.

References curses_init_screen(), Data_Get_Struct, NUM2INT, rb_secure(), and windata::window.

Referenced by Init_curses().

static VALUE window_insch | ( | VALUE | obj,
|  | VALUE | ch
| ) |  |

static

Definition at line 1866 of file curses.c.

References GetWINDOW, NUM2CH, Qnil, and windata::window.

Referenced by Init_curses().

static VALUE window_insertln | ( | VALUE | obj | ) |

static

Definition at line 2031 of file curses.c.

References GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

static VALUE window_maxx | ( | VALUE | obj | ) |

static

Definition at line 1685 of file curses.c.

References GetWINDOW, INT2FIX, and windata::window.

Referenced by Init_curses(), and window_box().

static VALUE window_maxy | ( | VALUE | obj | ) |

static

Definition at line 1661 of file curses.c.

References GetWINDOW, INT2FIX, and windata::window.

Referenced by Init_curses(), and window_box().

static VALUE window_move | ( | VALUE | obj,
|  | VALUE | y,
|  | VALUE | x
| ) |  |

static

Definition at line 1594 of file curses.c.

References GetWINDOW, NUM2INT, Qnil, and windata::window.

Referenced by Init_curses().

static VALUE window_noutrefresh | ( | VALUE | obj | ) |

static

Definition at line 1573 of file curses.c.

References GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

static VALUE window_refresh | ( | VALUE | obj | ) |

static

Definition at line 1554 of file curses.c.

References GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

static VALUE window_resize | ( | VALUE | obj,
|  | VALUE | lin,
|  | VALUE | col
| ) |  |

static

Definition at line 2345 of file curses.c.

References GetWINDOW, NUM2INT, Qfalse, Qnil, Qtrue, and windata::window.

Referenced by Init_curses().

static VALUE window_s_allocate | ( | VALUE | class | ) |

static

Definition at line 1436 of file curses.c.

References Data_Make_Struct, and free_window().

Referenced by Init_curses().

static VALUE window_scrl | ( | VALUE | obj,
|  | VALUE | n
| ) |  |

static

Definition at line 2171 of file curses.c.

References GetWINDOW, NUM2INT, Qfalse, Qtrue, and windata::window.

Referenced by Init_curses().

static VALUE window_scroll | ( | VALUE | obj | ) |

static

Definition at line 2149 of file curses.c.

References GetWINDOW, Qfalse, Qtrue, and windata::window.

Referenced by Init_curses().

static VALUE window_scrollok | ( | VALUE | obj,
|  | VALUE | bf
| ) |  |

static

Definition at line 2058 of file curses.c.

References FALSE, GetWINDOW, Qnil, RTEST, TRUE, and windata::window.

Referenced by Init_curses().

static VALUE window_setpos | ( | VALUE | obj,
|  | VALUE | y,
|  | VALUE | x
| ) |  |

static

Definition at line 1614 of file curses.c.

References GetWINDOW, NUM2INT, Qnil, and windata::window.

Referenced by Init_curses().

static VALUE window_setscrreg | ( | VALUE | obj,
|  | VALUE | top,
|  | VALUE | bottom
| ) |  |

static

Definition at line 2108 of file curses.c.

References GetWINDOW, NUM2INT, Qfalse, Qtrue, and windata::window.

Referenced by Init_curses().

static VALUE window_standend | ( | VALUE | obj | ) |

static

Definition at line 1816 of file curses.c.

References GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

static VALUE window_standout | ( | VALUE | obj | ) |

static

Definition at line 1797 of file curses.c.

References GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

static VALUE window_subwin | ( | VALUE | obj,
|  | VALUE | height,
|  | VALUE | width,
|  | VALUE | top,
|  | VALUE | left
| ) |  |

static

Definition at line 1480 of file curses.c.

References GetWINDOW, NUM2INT, prep_window(), rb_obj_class(), and windata::window.

Referenced by Init_curses().

## Variable Documentation

VALUE cWindow

static

Definition at line 65 of file curses.c.

Referenced by curses_init_screen(), and Init_curses().

VALUE mCurses

static

Definition at line 63 of file curses.c.

Referenced by Init_curses().

VALUE mKey

static

Definition at line 64 of file curses.c.

Referenced by Init_curses().

VALUE rb_stdscr

static

Definition at line 70 of file curses.c.

Referenced by curses_attroff(), curses_attron(), curses_attrset(), curses_close_screen(), curses_finalize(), curses_init_screen(), and Init_curses().