X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=theme.cpp;h=5a42dff65e585e51e57d9083a8b3d52775d8a5d3;hb=8cbf100e6126c1550a6436970d777a652ac1182e;hp=d75ac86e2c9a266a7231959b7db83b26a783fc70;hpb=ccc6ab80f92f39a4a3ae9580b95ff5703de027c4;p=nageru diff --git a/theme.cpp b/theme.cpp index d75ac86..5a42dff 100644 --- a/theme.cpp +++ b/theme.cpp @@ -414,3 +414,15 @@ void Theme::transition_clicked(int transition_num, float t) exit(1); } } + +void Theme::channel_clicked(int preview_num) +{ + unique_lock lock(m); + lua_getglobal(L, "channel_clicked"); + lua_pushnumber(L, preview_num); + + if (lua_pcall(L, 1, 0, 0) != 0) { + fprintf(stderr, "error running function `channel_clicked': %s\n", lua_tostring(L, -1)); + exit(1); + } +}