mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-03 02:41:21 +02:00
CLuaInstance: Multiple functions made from CComponents in CLuaInstance available
- CComponentsWindow: new(), paint(), hide() - CSignalBox: new(), paint()
This commit is contained in:
@@ -29,6 +29,7 @@ extern "C" {
|
||||
#include <gui/widget/menue.h>
|
||||
#include <gui/widget/hintbox.h>
|
||||
#include <gui/widget/messagebox.h>
|
||||
#include <gui/components/cc.h>
|
||||
|
||||
/* this is stored as userdata in the lua_State */
|
||||
struct CLuaData
|
||||
@@ -117,6 +118,21 @@ class CLuaMessagebox
|
||||
~CLuaMessagebox();
|
||||
};
|
||||
|
||||
class CLuaCWindow
|
||||
{
|
||||
public:
|
||||
CComponentsWindow *w;
|
||||
CLuaCWindow() { w = NULL; }
|
||||
~CLuaCWindow() { delete w; }
|
||||
};
|
||||
|
||||
class CLuaSignalBox
|
||||
{
|
||||
public:
|
||||
CSignalBox *s;
|
||||
CLuaSignalBox() { s = NULL; }
|
||||
~CLuaSignalBox() { delete s; }
|
||||
};
|
||||
|
||||
|
||||
/* inspired by Steve Kemp http://www.steve.org.uk/ */
|
||||
@@ -168,6 +184,19 @@ private:
|
||||
static int MessageboxExec(lua_State *L);
|
||||
static CLuaMessagebox *MessageboxCheck(lua_State *L, int n);
|
||||
|
||||
void CWindowRegister(lua_State *L);
|
||||
static int CWindowNew(lua_State *L);
|
||||
static CLuaCWindow *CWindowCheck(lua_State *L, int n);
|
||||
static int CWindowPaint(lua_State *L);
|
||||
static int CWindowHide(lua_State *L);
|
||||
static int CWindowDelete(lua_State *L);
|
||||
|
||||
static CLuaSignalBox *SignalBoxCheck(lua_State *L, int n);
|
||||
static void SignalBoxRegister(lua_State *L);
|
||||
static int SignalBoxNew(lua_State *L);
|
||||
static int SignalBoxPaint(lua_State *L);
|
||||
static int SignalBoxDelete(lua_State *L);
|
||||
|
||||
static bool tableLookup(lua_State*, const char*, std::string&);
|
||||
static bool tableLookup(lua_State*, const char*, int&);
|
||||
};
|
||||
|
Reference in New Issue
Block a user