summaryrefslogtreecommitdiff
path: root/iup/srclua5/il_canvas.c
diff options
context:
space:
mode:
Diffstat (limited to 'iup/srclua5/il_canvas.c')
-rwxr-xr-xiup/srclua5/il_canvas.c159
1 files changed, 159 insertions, 0 deletions
diff --git a/iup/srclua5/il_canvas.c b/iup/srclua5/il_canvas.c
new file mode 100755
index 0000000..8cff72a
--- /dev/null
+++ b/iup/srclua5/il_canvas.c
@@ -0,0 +1,159 @@
+/******************************************************************************
+ * Automatically generated file (iuplua5). Please don't change anything. *
+ *****************************************************************************/
+
+#include <stdlib.h>
+
+#include <lua.h>
+#include <lauxlib.h>
+
+#include "iup.h"
+#include "iuplua.h"
+#include "il.h"
+
+
+static int canvas_action(Ihandle *self, float p0, float p1)
+{
+ lua_State *L = iuplua_call_start(self, "action");
+ lua_pushnumber(L, p0);
+ lua_pushnumber(L, p1);
+ return iuplua_call(L, 2);
+}
+
+static int canvas_leavewindow_cb(Ihandle *self)
+{
+ lua_State *L = iuplua_call_start(self, "leavewindow_cb");
+ return iuplua_call(L, 0);
+}
+
+static int canvas_resize_cb(Ihandle *self, int p0, int p1)
+{
+ lua_State *L = iuplua_call_start(self, "resize_cb");
+ lua_pushnumber(L, p0);
+ lua_pushnumber(L, p1);
+ return iuplua_call(L, 2);
+}
+
+static int canvas_wheel_cb(Ihandle *self, float p0, int p1, int p2, char * p3)
+{
+ lua_State *L = iuplua_call_start(self, "wheel_cb");
+ lua_pushnumber(L, p0);
+ lua_pushnumber(L, p1);
+ lua_pushnumber(L, p2);
+ lua_pushstring(L, p3);
+ return iuplua_call(L, 4);
+}
+
+static int canvas_mdiactivate_cb(Ihandle *self)
+{
+ lua_State *L = iuplua_call_start(self, "mdiactivate_cb");
+ return iuplua_call(L, 0);
+}
+
+static int canvas_enterwindow_cb(Ihandle *self)
+{
+ lua_State *L = iuplua_call_start(self, "enterwindow_cb");
+ return iuplua_call(L, 0);
+}
+
+static int canvas_focus_cb(Ihandle *self, int p0)
+{
+ lua_State *L = iuplua_call_start(self, "focus_cb");
+ lua_pushnumber(L, p0);
+ return iuplua_call(L, 1);
+}
+
+static int canvas_button_cb(Ihandle *self, int p0, int p1, int p2, int p3, char * p4)
+{
+ lua_State *L = iuplua_call_start(self, "button_cb");
+ lua_pushnumber(L, p0);
+ lua_pushnumber(L, p1);
+ lua_pushnumber(L, p2);
+ lua_pushnumber(L, p3);
+ lua_pushstring(L, p4);
+ return iuplua_call(L, 5);
+}
+
+static int canvas_keypress_cb(Ihandle *self, int p0, int p1)
+{
+ lua_State *L = iuplua_call_start(self, "keypress_cb");
+ lua_pushnumber(L, p0);
+ lua_pushnumber(L, p1);
+ return iuplua_call(L, 2);
+}
+
+static int canvas_motion_cb(Ihandle *self, int p0, int p1, char * p2)
+{
+ lua_State *L = iuplua_call_start(self, "motion_cb");
+ lua_pushnumber(L, p0);
+ lua_pushnumber(L, p1);
+ lua_pushstring(L, p2);
+ return iuplua_call(L, 3);
+}
+
+static int canvas_wom_cb(Ihandle *self, int p0)
+{
+ lua_State *L = iuplua_call_start(self, "wom_cb");
+ lua_pushnumber(L, p0);
+ return iuplua_call(L, 1);
+}
+
+static int canvas_scroll_cb(Ihandle *self, int p0, float p1, float p2)
+{
+ lua_State *L = iuplua_call_start(self, "scroll_cb");
+ lua_pushnumber(L, p0);
+ lua_pushnumber(L, p1);
+ lua_pushnumber(L, p2);
+ return iuplua_call(L, 3);
+}
+
+static int Canvas(lua_State *L)
+{
+ Ihandle *ih = IupCanvas(NULL);
+ iuplua_plugstate(L, ih);
+ iuplua_pushihandle_raw(L, ih);
+ return 1;
+}
+
+int iupcanvaslua_open(lua_State * L)
+{
+ iuplua_register(L, Canvas, "Canvas");
+
+ iuplua_register_cb(L, "ACTION", (lua_CFunction)canvas_action, "canvas");
+ iuplua_register_cb(L, "LEAVEWINDOW_CB", (lua_CFunction)canvas_leavewindow_cb, NULL);
+ iuplua_register_cb(L, "RESIZE_CB", (lua_CFunction)canvas_resize_cb, NULL);
+ iuplua_register_cb(L, "WHEEL_CB", (lua_CFunction)canvas_wheel_cb, NULL);
+ iuplua_register_cb(L, "MDIACTIVATE_CB", (lua_CFunction)canvas_mdiactivate_cb, NULL);
+ iuplua_register_cb(L, "ENTERWINDOW_CB", (lua_CFunction)canvas_enterwindow_cb, NULL);
+ iuplua_register_cb(L, "FOCUS_CB", (lua_CFunction)canvas_focus_cb, NULL);
+ iuplua_register_cb(L, "BUTTON_CB", (lua_CFunction)canvas_button_cb, NULL);
+ iuplua_register_cb(L, "KEYPRESS_CB", (lua_CFunction)canvas_keypress_cb, NULL);
+ iuplua_register_cb(L, "MOTION_CB", (lua_CFunction)canvas_motion_cb, NULL);
+ iuplua_register_cb(L, "WOM_CB", (lua_CFunction)canvas_wom_cb, NULL);
+ iuplua_register_cb(L, "SCROLL_CB", (lua_CFunction)canvas_scroll_cb, NULL);
+
+#ifdef IUPLUA_USELOH
+#ifdef TEC_BIGENDIAN
+#ifdef TEC_64
+#include "loh/canvas_be64.loh"
+#else
+#include "loh/canvas_be32.loh"
+#endif
+#else
+#ifdef TEC_64
+#ifdef WIN64
+#include "loh/canvas_le64w.loh"
+#else
+#include "loh/canvas_le64.loh"
+#endif
+#else
+#include "loh/canvas.loh"
+#endif
+#endif
+#else
+ iuplua_dofile(L, "canvas.lua");
+#endif
+
+ return 0;
+}
+