mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
CLuaInstance: Add script function 'enableInfoClock'
- Set Lua api version to 1.8
Origin commit data
------------------
Branch: ni/coolstream
Commit: d5031496d0
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2015-11-14 (Sat, 14 Nov 2015)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <gui/widget/keyboard_input.h>
|
||||
#include <gui/filebrowser.h>
|
||||
#include <gui/movieplayer.h>
|
||||
#include <gui/infoclock.h>
|
||||
#include <driver/pictureviewer/pictureviewer.h>
|
||||
#include <neutrino.h>
|
||||
#include <zapit/types.h>
|
||||
@@ -533,6 +534,7 @@ const luaL_Reg CLuaInstance::methods[] =
|
||||
{ "strSub", CLuaInstance::strSub },
|
||||
{ "checkVersion", CLuaInstance::checkVersion },
|
||||
{ "createChannelIDfromUrl", CLuaInstance::createChannelIDfromUrl },
|
||||
{ "enableInfoClock", CLuaInstance::enableInfoClock },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -2747,3 +2749,15 @@ int CLuaInstance::createChannelIDfromUrl(lua_State *L)
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
int CLuaInstance::enableInfoClock(lua_State *L)
|
||||
{
|
||||
bool enable = true;
|
||||
int numargs = lua_gettop(L);
|
||||
if (numargs > 1)
|
||||
enable = _luaL_checkbool(L, 2);
|
||||
CInfoClock::getInstance()->enableInfoClock(enable);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
|
@@ -34,7 +34,7 @@ extern "C" {
|
||||
#include <vector>
|
||||
|
||||
#define LUA_API_VERSION_MAJOR 1
|
||||
#define LUA_API_VERSION_MINOR 7
|
||||
#define LUA_API_VERSION_MINOR 8
|
||||
|
||||
/* this is stored as userdata in the lua_State */
|
||||
struct CLuaData
|
||||
@@ -321,6 +321,7 @@ private:
|
||||
|
||||
static int checkVersion(lua_State *L);
|
||||
static int createChannelIDfromUrl(lua_State *L);
|
||||
static int enableInfoClock(lua_State *L);
|
||||
};
|
||||
|
||||
#endif /* _LUAINSTANCE_H */
|
||||
|
Reference in New Issue
Block a user