diff options
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); +} + +} |