Ruby 2.0.0p247(2013-06-27revision41674)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros | Functions | Variables
curses.c File Reference
`#include "ruby.h"`
`#include "ruby/io.h"`
`#include "ruby/thread.h"`
`#include <curses.h>`
Include dependency graph for curses.c:

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 | window_free (void *p)
static size_t | window_memsize (const void *p)
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 void * | getch_func (void *arg)
static VALUE | curses_getch (VALUE obj)
static void * | 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 void * | wgetch_func (void *_arg)
static VALUE | window_getch (VALUE obj)
static void * | 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 | cPad
static VALUE | rb_stdscr
static const rb_data_type_t | windata_type

## Macro Definition Documentation

#define CH2FIX CHR2FIX

Definition at line 62 of file curses.c.

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

#define curses_closed rb_f_notimplement

Definition at line 234 of file curses.c.

Referenced by Init_curses().

#define curses_def_prog_mode rb_f_notimplement

Definition at line 1444 of file curses.c.

Referenced by Init_curses().

#define curses_escdelay_get rb_f_notimplement

Definition at line 1036 of file curses.c.

Referenced by Init_curses().

#define curses_escdelay_set rb_f_notimplement

Definition at line 1022 of file curses.c.

Referenced by Init_curses().

#define curses_reset_prog_mode rb_f_notimplement

Definition at line 1463 of file curses.c.

Referenced by Init_curses().

#define curses_stdscr curses_init_screen

Definition at line 169 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 1006 of file curses.c.

Referenced by Init_curses().

#define curses_tabsize_set rb_f_notimplement

Definition at line 993 of file curses.c.

Referenced by Init_curses().

#define curses_timeout rb_f_notimplement

Definition at line 1425 of file curses.c.

Referenced by Init_curses().

#define curses_ungetch rb_f_notimplement

Definition at line 523 of file curses.c.

Referenced by Init_curses().

#define curses_use_default_colors rb_f_notimplement

Definition at line 976 of file curses.c.

Referenced by Init_curses().

#define GETSTR_BUF_SIZE 1024

Definition at line 671 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");\
TypedData_Get_Struct((obj), struct windata, &windata_type, (winp));\
if ((winp)->window == 0) no_window();\
} while (0)

Definition at line 88 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 61 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 2437 of file curses.c.

Referenced by Init_curses().

#define window_nodelay rb_f_notimplement

Definition at line 2468 of file curses.c.

Referenced by Init_curses().

#define window_timeout rb_f_notimplement

Definition at line 2492 of file curses.c.

Referenced by Init_curses().

## Function Documentation

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

Definition at line 597 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 627 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 876 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 893 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 910 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 456 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 952 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 931 of file curses.c.

References curses_stdscr, NUM2CH, and Qnil.

Referenced by Init_curses().

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

Definition at line 387 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

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

Definition at line 484 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 245 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static VALUE curses_close_screen | ( | void | ) |  |
| static

Definition at line 185 of file curses.c.

References curses_stdscr, Qnil, and rb_stdscr.

Referenced by Init_curses().

static VALUE curses_clrtoeol | ( | void | ) |  |
| static

Definition at line 258 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

static VALUE curses_cols | ( | void | ) |  |
| static

Definition at line 790 of file curses.c.

References INT2FIX.

Referenced by Init_curses().

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

Definition at line 805 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 708 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

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

Definition at line 722 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

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

Definition at line 288 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

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

Definition at line 306 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

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

Definition at line 204 of file curses.c.

References rb_gc_unregister_address(), and rb_stdscr.

Referenced by Init_curses().

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

Definition at line 474 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

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

Definition at line 655 of file curses.c.

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

Referenced by Init_curses().

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

Definition at line 692 of file curses.c.

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

Referenced by Init_curses().

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

Definition at line 582 of file curses.c.

References CH2FIX, and curses_stdscr.

Referenced by Init_curses().

static VALUE curses_init_screen | ( | void | ) |  |
| static

Definition at line 146 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 612 of file curses.c.

References curses_stdscr, NUM2CH, and Qnil.

Referenced by Init_curses().

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

Definition at line 738 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 754 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 779 of file curses.c.

References INT2FIX.

Referenced by Init_curses().

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

Definition at line 424 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

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

Definition at line 402 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

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

Definition at line 320 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

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

Definition at line 440 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

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

Definition at line 357 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

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

Definition at line 342 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

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

Definition at line 272 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 1055 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 829 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 535 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 856 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 569 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

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

Definition at line 552 of file curses.c.

References curses_stdscr, and Qnil.

Referenced by Init_curses().

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

Definition at line 639 of file curses.c.

Referenced by curses_getch().

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

Definition at line 674 of file curses.c.

References GETSTR_BUF_SIZE.

Referenced by curses_getstr().

void Init_curses | ( | void | ) |  |

Definition at line 2658 of file curses.c.

References c, CLASS_OF, cPad, 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_sprintf(), rb_stdscr, rb_str_new2, rb_undef_method(), RUBY_EXTERN, version(), 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 83 of file curses.c.

References rb_eRuntimeError, and rb_raise().

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

Definition at line 120 of file curses.c.

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

Referenced by curses_init_screen(), and window_subwin().

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

Definition at line 1954 of file curses.c.

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

Referenced by window_getch().

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

Definition at line 1995 of file curses.c.

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

Referenced by window_getstr().

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

Definition at line 1882 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 1918 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 1942 of file curses.c.

References window_addstr().

Referenced by Init_curses().

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

Definition at line 2227 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 2249 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 2297 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 1763 of file curses.c.

References GetWINDOW, INT2FIX, RB_UNUSED_VAR, and windata::window.

Referenced by Init_curses().

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

Definition at line 1743 of file curses.c.

References GetWINDOW, INT2FIX, RB_UNUSED_VAR, and windata::window.

Referenced by Init_curses().

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

Definition at line 2340 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 2319 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 1789 of file curses.c.

References c, 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 1555 of file curses.c.

References GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

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

Definition at line 1538 of file curses.c.

References GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

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

Definition at line 1571 of file curses.c.

References GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

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

Definition at line 1679 of file curses.c.

References GetWINDOW, INT2FIX, RB_UNUSED_VAR, and windata::window.

Referenced by Init_curses().

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

Definition at line 1663 of file curses.c.

References GetWINDOW, INT2FIX, RB_UNUSED_VAR, and windata::window.

Referenced by Init_curses().

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

Definition at line 2031 of file curses.c.

References GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

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

Definition at line 2047 of file curses.c.

References GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

static void window_free | ( | void * | p) |  |
| static

Definition at line 96 of file curses.c.

References p, windata::window, and xfree.

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

Definition at line 2358 of file curses.c.

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

Referenced by Init_curses().

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

Definition at line 1970 of file curses.c.

References wgetch_arg::c, c, EOF, GetWINDOW, Qnil, rb_isprint(), rb_locale_str_new(), rb_thread_call_without_gvl(), 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 2013 of file curses.c.

References GetWINDOW, rb_locale_str_new_cstr(), rb_thread_call_without_gvl(), 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 2118 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 1865 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 1489 of file curses.c.

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

Referenced by Init_curses().

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

Definition at line 1900 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 2065 of file curses.c.

References GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

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

Definition at line 1719 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 1695 of file curses.c.

References GetWINDOW, INT2FIX, and windata::window.

Referenced by Init_curses(), and window_box().

static size_t window_memsize | ( | const void * | p) |  |
| static

Definition at line 105 of file curses.c.

References p, size, and windata::window.

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

Definition at line 1628 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 1607 of file curses.c.

References GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

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

Definition at line 1588 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 2379 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 1470 of file curses.c.

References TypedData_Make_Struct.

Referenced by Init_curses().

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

Definition at line 2205 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 2183 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 2092 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 1648 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 2142 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 1850 of file curses.c.

References GetWINDOW, Qnil, and windata::window.

Referenced by Init_curses().

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

Definition at line 1831 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 1514 of file curses.c.

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

Referenced by Init_curses().

## Variable Documentation

VALUE cPad
| static

Definition at line 67 of file curses.c.

Referenced by Init_curses().

VALUE cWindow
| static

Definition at line 66 of file curses.c.

Referenced by curses_init_screen(), and Init_curses().

VALUE mCurses
| static

Definition at line 64 of file curses.c.

Referenced by Init_curses().

VALUE mKey
| static

Definition at line 65 of file curses.c.

Referenced by Init_curses().

VALUE rb_stdscr
| static

Definition at line 72 of file curses.c.

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

const rb_data_type_t windata_type
| static

Initial value:
= {
"windata",
{0, window_free, window_memsize,}
}

Definition at line 114 of file curses.c.