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
|
/******************************************************************************
* 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 "iup_pplot.h"
#include "il.h"
static int pplot_edit_cb(Ihandle *self, int p0, int p1, float p2, float p3, float p4, float p5)
{
lua_State *L = iuplua_call_start(self, "edit_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);
return iuplua_call(L, 6);
}
static int pplot_deleteend_cb(Ihandle *self)
{
lua_State *L = iuplua_call_start(self, "deleteend_cb");
return iuplua_call(L, 0);
}
static int pplot_selectbegin_cb(Ihandle *self)
{
lua_State *L = iuplua_call_start(self, "selectbegin_cb");
return iuplua_call(L, 0);
}
static int pplot_postdraw_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "postdraw_cb");
lua_pushnumber(L, p0);
return iuplua_call(L, 1);
}
static int pplot_delete_cb(Ihandle *self, int p0, int p1, float p2, float p3)
{
lua_State *L = iuplua_call_start(self, "delete_cb");
lua_pushnumber(L, p0);
lua_pushnumber(L, p1);
lua_pushnumber(L, p2);
lua_pushnumber(L, p3);
return iuplua_call(L, 4);
}
static int pplot_predraw_cb(Ihandle *self, int p0)
{
lua_State *L = iuplua_call_start(self, "predraw_cb");
lua_pushnumber(L, p0);
return iuplua_call(L, 1);
}
static int pplot_selectend_cb(Ihandle *self)
{
lua_State *L = iuplua_call_start(self, "selectend_cb");
return iuplua_call(L, 0);
}
static int pplot_select_cb(Ihandle *self, int p0, int p1, float p2, float p3, int p4)
{
lua_State *L = iuplua_call_start(self, "select_cb");
lua_pushnumber(L, p0);
lua_pushnumber(L, p1);
lua_pushnumber(L, p2);
lua_pushnumber(L, p3);
lua_pushnumber(L, p4);
return iuplua_call(L, 5);
}
static int pplot_deletebegin_cb(Ihandle *self)
{
lua_State *L = iuplua_call_start(self, "deletebegin_cb");
return iuplua_call(L, 0);
}
static int pplot_editbegin_cb(Ihandle *self)
{
lua_State *L = iuplua_call_start(self, "editbegin_cb");
return iuplua_call(L, 0);
}
static int pplot_editend_cb(Ihandle *self)
{
lua_State *L = iuplua_call_start(self, "editend_cb");
return iuplua_call(L, 0);
}
static int PPlot(lua_State *L)
{
Ihandle *ih = IupPPlot();
iuplua_plugstate(L, ih);
iuplua_pushihandle_raw(L, ih);
return 1;
}
void iuplua_pplotfuncs_open(lua_State *L);
int iuppplotlua_open(lua_State * L)
{
iuplua_register(L, PPlot, "PPlot");
iuplua_register_cb(L, "EDIT_CB", (lua_CFunction)pplot_edit_cb, "pplot");
iuplua_register_cb(L, "DELETEEND_CB", (lua_CFunction)pplot_deleteend_cb, NULL);
iuplua_register_cb(L, "SELECTBEGIN_CB", (lua_CFunction)pplot_selectbegin_cb, NULL);
iuplua_register_cb(L, "POSTDRAW_CB", (lua_CFunction)pplot_postdraw_cb, NULL);
iuplua_register_cb(L, "DELETE_CB", (lua_CFunction)pplot_delete_cb, NULL);
iuplua_register_cb(L, "PREDRAW_CB", (lua_CFunction)pplot_predraw_cb, NULL);
iuplua_register_cb(L, "SELECTEND_CB", (lua_CFunction)pplot_selectend_cb, NULL);
iuplua_register_cb(L, "SELECT_CB", (lua_CFunction)pplot_select_cb, NULL);
iuplua_register_cb(L, "DELETEBEGIN_CB", (lua_CFunction)pplot_deletebegin_cb, NULL);
iuplua_register_cb(L, "EDITBEGIN_CB", (lua_CFunction)pplot_editbegin_cb, NULL);
iuplua_register_cb(L, "EDITEND_CB", (lua_CFunction)pplot_editend_cb, NULL);
iuplua_pplotfuncs_open(L);
#include "clua/pplot.clua"
return 0;
}
|