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.
1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 |
# File 'ext/curses/curses.c', line 1854
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;
}
|