diff options
author | Pixel <pixel@nobis-crew.org> | 2009-11-04 11:56:41 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2009-11-04 11:59:33 -0800 |
commit | d577d991b97ae2b5ee1af23641bcffc3f83af5b2 (patch) | |
tree | 590639d50205d1bcfaff2a7d2dc6ebf3f373c7ed /iup/srclua5/il_matrix.c |
Initial import. Contains the im, cd and iup librairies, and a "working" Makefile for them under linux.
Diffstat (limited to 'iup/srclua5/il_matrix.c')
-rwxr-xr-x | iup/srclua5/il_matrix.c | 247 |
1 files changed, 247 insertions, 0 deletions
diff --git a/iup/srclua5/il_matrix.c b/iup/srclua5/il_matrix.c new file mode 100755 index 0000000..e747536 --- /dev/null +++ b/iup/srclua5/il_matrix.c @@ -0,0 +1,247 @@ +/****************************************************************************** + * 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 "iupcontrols.h" +#include "il.h" + + +static char * matrix_font_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "font_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call_rs(L, 2); +} + +static int matrix_draw_cb(Ihandle *self, int p0, int p1, int p2, int p3, int p4, int p5, int p6) +{ + lua_State *L = iuplua_call_start(self, "draw_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + lua_pushnumber(L, p3); + lua_pushnumber(L, p4); + lua_pushnumber(L, p5); + lua_pushnumber(L, p6); + return iuplua_call(L, 7); +} + +static int matrix_edition_cb(Ihandle *self, int p0, int p1, int p2, int p3) +{ + lua_State *L = iuplua_call_start(self, "edition_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + lua_pushnumber(L, p3); + return iuplua_call(L, 4); +} + +static int matrix_mark_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "mark_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int matrix_markedit_cb(Ihandle *self, int p0, int p1, int p2) +{ + lua_State *L = iuplua_call_start(self, "markedit_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + return iuplua_call(L, 3); +} + +static int matrix_bgcolor_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "bgcolor_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static char * matrix_value_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "value_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call_rs(L, 2); +} + +static int matrix_dropselect_cb(Ihandle *self, int p0, int p1, Ihandle * p2, char * p3, int p4, int p5) +{ + lua_State *L = iuplua_call_start(self, "dropselect_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + iuplua_pushihandle(L, p2); + lua_pushstring(L, p3); + lua_pushnumber(L, p4); + lua_pushnumber(L, p5); + return iuplua_call(L, 6); +} + +static int matrix_drop_cb(Ihandle *self, Ihandle * p0, int p1, int p2) +{ + lua_State *L = iuplua_call_start(self, "drop_cb"); + iuplua_pushihandle(L, p0); + lua_pushnumber(L, p1); + lua_pushnumber(L, p2); + return iuplua_call(L, 3); +} + +static int matrix_dropcheck_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "dropcheck_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int matrix_action_cb(Ihandle *self, int p0, int p1, int p2, int p3, char * p4) +{ + lua_State *L = iuplua_call_start(self, "action_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 matrix_enteritem_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "enteritem_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int matrix_leaveitem_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "leaveitem_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int matrix_scrolltop_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "scrolltop_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int matrix_fgcolor_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "fgcolor_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int matrix_release_cb(Ihandle *self, int p0, int p1, char * p2) +{ + lua_State *L = iuplua_call_start(self, "release_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushstring(L, p2); + return iuplua_call(L, 3); +} + +static int matrix_mousemove_cb(Ihandle *self, int p0, int p1) +{ + lua_State *L = iuplua_call_start(self, "mousemove_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int matrix_value_edit_cb(Ihandle *self, int p0, int p1, char * p2) +{ + lua_State *L = iuplua_call_start(self, "value_edit_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushstring(L, p2); + return iuplua_call(L, 3); +} + +static int matrix_click_cb(Ihandle *self, int p0, int p1, char * p2) +{ + lua_State *L = iuplua_call_start(self, "click_cb"); + lua_pushnumber(L, p0); + lua_pushnumber(L, p1); + lua_pushstring(L, p2); + return iuplua_call(L, 3); +} + +static int Matrix(lua_State *L) +{ + Ihandle *ih = IupMatrix(NULL); + iuplua_plugstate(L, ih); + iuplua_pushihandle_raw(L, ih); + return 1; +} + +void iuplua_matrixfuncs_open(lua_State *L); + +int iupmatrixlua_open(lua_State * L) +{ + iuplua_register(L, Matrix, "Matrix"); + + iuplua_register_cb(L, "FONT_CB", (lua_CFunction)matrix_font_cb, NULL); + iuplua_register_cb(L, "DRAW_CB", (lua_CFunction)matrix_draw_cb, NULL); + iuplua_register_cb(L, "EDITION_CB", (lua_CFunction)matrix_edition_cb, NULL); + iuplua_register_cb(L, "MARK_CB", (lua_CFunction)matrix_mark_cb, NULL); + iuplua_register_cb(L, "MARKEDIT_CB", (lua_CFunction)matrix_markedit_cb, NULL); + iuplua_register_cb(L, "BGCOLOR_CB", (lua_CFunction)matrix_bgcolor_cb, NULL); + iuplua_register_cb(L, "VALUE_CB", (lua_CFunction)matrix_value_cb, NULL); + iuplua_register_cb(L, "DROPSELECT_CB", (lua_CFunction)matrix_dropselect_cb, NULL); + iuplua_register_cb(L, "DROP_CB", (lua_CFunction)matrix_drop_cb, NULL); + iuplua_register_cb(L, "DROPCHECK_CB", (lua_CFunction)matrix_dropcheck_cb, NULL); + iuplua_register_cb(L, "ACTION_CB", (lua_CFunction)matrix_action_cb, "matrix"); + iuplua_register_cb(L, "ENTERITEM_CB", (lua_CFunction)matrix_enteritem_cb, NULL); + iuplua_register_cb(L, "LEAVEITEM_CB", (lua_CFunction)matrix_leaveitem_cb, NULL); + iuplua_register_cb(L, "SCROLLTOP_CB", (lua_CFunction)matrix_scrolltop_cb, NULL); + iuplua_register_cb(L, "FGCOLOR_CB", (lua_CFunction)matrix_fgcolor_cb, NULL); + iuplua_register_cb(L, "RELEASE_CB", (lua_CFunction)matrix_release_cb, NULL); + iuplua_register_cb(L, "MOUSEMOVE_CB", (lua_CFunction)matrix_mousemove_cb, "matrix"); + iuplua_register_cb(L, "VALUE_EDIT_CB", (lua_CFunction)matrix_value_edit_cb, NULL); + iuplua_register_cb(L, "CLICK_CB", (lua_CFunction)matrix_click_cb, NULL); + + iuplua_matrixfuncs_open(L); + +#ifdef IUPLUA_USELOH +#ifdef TEC_BIGENDIAN +#ifdef TEC_64 +#include "loh/matrix_be64.loh" +#else +#include "loh/matrix_be32.loh" +#endif +#else +#ifdef TEC_64 +#ifdef WIN64 +#include "loh/matrix_le64w.loh" +#else +#include "loh/matrix_le64.loh" +#endif +#else +#include "loh/matrix.loh" +#endif +#endif +#else + iuplua_dofile(L, "matrix.lua"); +#endif + + return 0; +} + |