diff options
author | Nicolas Noble <pixel@nobis-crew.org> | 2009-11-04 13:34:19 -0800 |
---|---|---|
committer | Nicolas Noble <pixel@nobis-crew.org> | 2009-11-04 13:34:19 -0800 |
commit | b3af8f0899c0d5f94d6cee64e6ffe294a51f8091 (patch) | |
tree | 22ae4fa248e0b7556fc3abfefb24e73ef008d295 /src | |
parent | 9cc5fb228aec3fbdb7e1b4efc46e2bb521291e99 (diff) |
Adding actual lua-interface plugin code.
Diffstat (limited to 'src')
-rw-r--r-- | src/plugin-luaiup.cc | 53 |
1 files changed, 53 insertions, 0 deletions
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 <cd.h> +#include <cdgdiplus.h> +#include <cdlua.h> +#include <cdluaiup.h> +#include "iupluaim.h" +#include <im.h> +#include <im_image.h> +#include <imlua.h> +#include <cdluaim.h> + +#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); +} + +} |