From b3af8f0899c0d5f94d6cee64e6ffe294a51f8091 Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Wed, 4 Nov 2009 13:34:19 -0800 Subject: Adding actual lua-interface plugin code. --- src/plugin-luaiup.cc | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/plugin-luaiup.cc (limited to 'src/plugin-luaiup.cc') diff --git a/src/plugin-luaiup.cc b/src/plugin-luaiup.cc new file mode 100644 index 0000000..7a77eb8 --- /dev/null +++ b/src/plugin-luaiup.cc @@ -0,0 +1,53 @@ +#include "BLua.h" +#include "iup.h" +#include "iuplua.h" +#include "iupcontrols.h" +#include "iupluacontrols.h" +#include "iup_pplot.h" +#include "iuplua_pplot.h" +#include +#include +#include +#include +#include "iupluaim.h" +#include +#include +#include +#include + +#ifndef WIN32 +#define WEAK __attribute__ ((weak)) +#else +#define WEAK +#endif + +int luaopen_iupluaimglib(lua_State* L); + +static void _init_plugin(Lua * L) { + static bool done = false; + if (done) return; + done = true; + L->wrap_open(iuplua_open); + L->wrap_open(iupkey_open); + L->wrap_open(luaopen_iupluaimglib); + L->wrap_open(iupcontrolslua_open); + L->wrap_open(iup_pplotlua_open); + L->wrap_open(cdlua_open); + L->wrap_open(cdluaiup_open); + L->wrap_open(iupimlua_open); + L->wrap_open(imlua_open); + L->wrap_open(imlua_open_process); + L->wrap_open(cdluaim_open); +} + +extern "C" { + +WEAK void init_plugin(Lua * L) { + _init_plugin(L); +} + +void luaiup_init(Lua * L) { + _init_plugin(L); +} + +} -- cgit v1.2.3