aboutsummaryrefslogtreecommitdiffstats
path: root/src/curses.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/curses.c')
-rw-r--r--src/curses.c14
1 files changed, 14 insertions, 0 deletions
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 },
};