Method: Curses::Window#subwin
- Defined in:
- ext/curses/curses.c
#subwin(height, width, top, left) ⇒ Object
Construct a new subwindow with constraints of height lines, width columns, begin at top line, and begin left most column.
1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 |
# File 'ext/curses/curses.c', line 1920
static VALUE
window_subwin(VALUE obj, VALUE height, VALUE width, VALUE top, VALUE left)
{
struct windata *winp;
WINDOW *window;
VALUE win;
int h, w, t, l;
h = NUM2INT(height);
w = NUM2INT(width);
t = NUM2INT(top);
l = NUM2INT(left);
GetWINDOW(obj, winp);
window = subwin(winp->window, h, w, t, l);
win = prep_window(rb_obj_class(obj), window, 0);
return win;
}
|