X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=theme.cpp;fp=theme.cpp;h=5fc5a7538cee288ae7e3fc335c1550bfdfe1dd2e;hb=4ed8afda0ec060a66ca6af76d15afe62af543849;hp=8b2f6b6c612f101c01c7667cb1d996c71f8d3edb;hpb=52c5033edb39aa71c2a979b4788b622dc44683af;p=nageru diff --git a/theme.cpp b/theme.cpp index 8b2f6b6..5fc5a75 100644 --- a/theme.cpp +++ b/theme.cpp @@ -535,6 +535,16 @@ int HTMLInput_execute_javascript_async(lua_State* L) return 0; } +int HTMLInput_resize(lua_State* L) +{ + assert(lua_gettop(L) == 3); + CEFCapture **video_input = (CEFCapture **)luaL_checkudata(L, 1, "HTMLInput"); + unsigned width = lrint(luaL_checknumber(L, 2)); + unsigned height = lrint(luaL_checknumber(L, 3)); + (*video_input)->resize(width, height); + return 0; +} + int HTMLInput_get_signal_num(lua_State* L) { assert(lua_gettop(L) == 1); @@ -761,6 +771,7 @@ const luaL_Reg HTMLInput_funcs[] = { { "reload", HTMLInput_reload }, { "set_max_fps", HTMLInput_set_max_fps }, { "execute_javascript_async", HTMLInput_execute_javascript_async }, + { "resize", HTMLInput_resize }, { "get_signal_num", HTMLInput_get_signal_num }, #endif { NULL, NULL }