attron/attroff

This commit is contained in:
Kartik K. Agaram 2021-11-05 12:48:27 -07:00
parent a4ce7ffbd0
commit 6f96d30641
1 changed files with 18 additions and 0 deletions

View File

@ -103,6 +103,22 @@ static int Waddstr (lua_State *L) {
}
static int Wattroff (lua_State *L) {
WINDOW *w = checkwin(L, 1);
int attrs = checkinteger(L, 2, "int");
lua_pushboolean(L, wattroff(w, attrs));
return 1;
}
static int Wattron (lua_State *L) {
WINDOW *w = checkwin(L, 1);
int attrs = checkinteger(L, 2, "int");
lua_pushboolean(L, wattron(w, attrs));
return 1;
}
static int Wclear (lua_State *L) {
lua_pushboolean(L, wclear(checkwin(L, 1)));
return 1;
@ -133,6 +149,8 @@ static const luaL_Reg curses_window_methods[] =
{
{"__tostring", W__tostring},
{"addstr", Waddstr},
{"attroff", Wattroff},
{"attron", Wattron},
{"clear", Wclear},
{"getmaxyx", Wgetmaxyx},
{"getyx", Wgetyx},