summaryrefslogtreecommitdiff
path: root/iup/srclua5/iuplua_controls.c
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-11-04 11:56:41 -0800
committerPixel <pixel@nobis-crew.org>2009-11-04 11:59:33 -0800
commitd577d991b97ae2b5ee1af23641bcffc3f83af5b2 (patch)
tree590639d50205d1bcfaff2a7d2dc6ebf3f373c7ed /iup/srclua5/iuplua_controls.c
Initial import. Contains the im, cd and iup librairies, and a "working" Makefile for them under linux.
Diffstat (limited to 'iup/srclua5/iuplua_controls.c')
-rwxr-xr-xiup/srclua5/iuplua_controls.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/iup/srclua5/iuplua_controls.c b/iup/srclua5/iuplua_controls.c
new file mode 100755
index 0000000..bd961bf
--- /dev/null
+++ b/iup/srclua5/iuplua_controls.c
@@ -0,0 +1,55 @@
+/** \file
+ * \brief Bindig of iupcontrols to Lua 5.
+ *
+ * See Copyright Notice in "iup.h"
+ */
+
+#include <lua.h>
+#include <lualib.h>
+
+#include "iup.h"
+#include "iupcontrols.h"
+
+#include "iuplua.h"
+#include "iupluacontrols.h"
+#include "il.h"
+#include "il_controls.h"
+
+int iupcontrolslua_open(lua_State * L)
+{
+ if (iuplua_opencall_internal(L))
+ IupControlsOpen();
+
+ iuplua_changeEnv(L);
+
+ iupgaugelua_open(L);
+ iupmatrixlua_open(L);
+ iupmasklua_open(L);
+ iupdiallua_open(L);
+ iupcolorbrowserlua_open(L);
+ iupcellslua_open(L);
+ iupcolorbarlua_open(L);
+
+ iuplua_returnEnv(L);
+
+ return 0;
+}
+
+int iupcontrolslua_close(lua_State * L)
+{
+ if (iuplua_opencall_internal(L))
+ IupControlsClose();
+ return 0;
+}
+
+/* obligatory to use require"iupluacontrols" */
+int luaopen_iupluacontrols(lua_State* L)
+{
+ return iupcontrolslua_open(L);
+}
+
+/* obligatory to use require"iupluacontrols51" */
+int luaopen_iupluacontrols51(lua_State* L)
+{
+ return iupcontrolslua_open(L);
+}