mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
Add a --enable-lua switch to enable LUA support
This commit is contained in:
@@ -45,11 +45,13 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#if ENABLE_LUA
|
||||
extern "C" {
|
||||
#include <lua.h>
|
||||
#include <lauxlib.h>
|
||||
#include <lualib.h>
|
||||
}
|
||||
#endif
|
||||
|
||||
#define NO_WIDGET_ID -1
|
||||
|
||||
@@ -75,10 +77,12 @@ class CChangeObserver
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#if ENABLE_LUA
|
||||
virtual bool changeNotify(lua_State * /*L*/, const std::string & /*luaId*/, const std::string & /*luaAction*/, void * /*Data*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
class CMenuTarget
|
||||
@@ -103,9 +107,11 @@ class CMenuItem
|
||||
fb_pixel_t item_color, item_bgcolor;
|
||||
|
||||
void initItemColors(const bool select_mode);
|
||||
#if ENABLE_LUA
|
||||
lua_State *luaState;
|
||||
std::string luaAction;
|
||||
std::string luaId;
|
||||
#endif
|
||||
neutrino_locale_t name;
|
||||
std::string nameString;
|
||||
|
||||
@@ -170,8 +176,9 @@ class CMenuItem
|
||||
void setHint(const std::string icon, const neutrino_locale_t text) { hintIcon = icon; hint = text; }
|
||||
void setHint(const std::string icon, const std::string text) { hintIcon = icon; hintText = text; }
|
||||
|
||||
#if ENABLE_LUA
|
||||
void setLua(lua_State *_luaState, std::string &_luaAction, std::string &_luaId) { luaState = _luaState; luaAction = _luaAction; luaId = _luaId; };
|
||||
|
||||
#endif
|
||||
virtual const char *getName();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user