diff options
-rw-r--r-- | TODO | 1 | ||||
-rw-r--r-- | src/curses.c | 14 |
2 files changed, 14 insertions, 1 deletions
@@ -6,7 +6,6 @@ - finish up curs_inopts and curs_outopts - finish up curs_color (color_content, pair_content) - scrolling support (curs_scroll) -- curs_beep - support the rest of the refresh options (curs_refresh) - window background support (curs_bkgd) - multiple window support (all fns that start with w, curs_overlay, curs_initscr, curs_window, curs_getyx (par, beg), curs_touch, curs_overlay) diff --git a/src/curses.c b/src/curses.c index 23e07cb..b1bdb14 100644 --- a/src/curses.c +++ b/src/curses.c @@ -598,6 +598,18 @@ static int l_color_pairs(lua_State* L) return 1; } +static int l_beep(lua_State* L) +{ + lua_pushboolean(L, (beep() == OK)); + return 1; +} + +static int l_flash(lua_State* L) +{ + lua_pushboolean(L, (beep() == OK)); + return 1; +} + const luaL_Reg reg[] = { { "initscr", l_initscr }, { "endwin", l_endwin }, @@ -626,6 +638,8 @@ const luaL_Reg reg[] = { { "getyx", l_getyx }, { "colors", l_colors }, { "color_pairs", l_color_pairs }, + { "beep", l_beep }, + { "flash", l_flash }, { NULL, NULL }, }; |