mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-03 02:41:21 +02:00
luainstance: add simple GetInput() method
use like this in the lua script: -- RC_home = 174 local n = neutrino() repeat msg, data = m:GetInput(1000) until msg == RC_home
This commit is contained in:
committed by
M. Liebmann
parent
4d7e07f81f
commit
eefd75537e
@@ -27,12 +27,19 @@ extern "C" {
|
||||
}
|
||||
#include <driver/fb_window.h>
|
||||
|
||||
/* this is stored as userdata in the lua_State */
|
||||
struct CLuaData
|
||||
{
|
||||
CFBWindow *fbwin;
|
||||
CRCInput *rcinput;
|
||||
};
|
||||
|
||||
/* inspired by Steve Kemp http://www.steve.org.uk/ */
|
||||
class CLuaInstance
|
||||
{
|
||||
static const char className[];
|
||||
static const luaL_Reg methods[];
|
||||
static CFBWindow *CheckWindow(lua_State *L, int narg);
|
||||
static CLuaData *CheckData(lua_State *L, int narg);
|
||||
public:
|
||||
CLuaInstance();
|
||||
~CLuaInstance();
|
||||
@@ -46,6 +53,7 @@ private:
|
||||
static int PaintBox(lua_State *L);
|
||||
static int PaintIcon(lua_State *L);
|
||||
static int RenderString(lua_State *L);
|
||||
static int GetInput(lua_State *L);
|
||||
static int GCWindow(lua_State *L);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user