1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
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;
}
|