blob: 782e974166d87b97cb83acd2b25cb93405d60bc0 (
plain)
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
|
------------------------------------------------------------------------------
-- GLCanvas class
------------------------------------------------------------------------------
local ctrl = {
nick = "glcanvas",
parent = WIDGET,
creation = "-",
funcname = "GLCanvas",
include = "iupgl.h",
callback = {
action = "nn",
},
extrafuncs = 1,
extracode = [[
int iupgllua_open(lua_State * L)
{
if (iuplua_opencall_internal(L))
IupGLCanvasOpen();
iuplua_changeEnv(L);
iupglcanvaslua_open(L);
iuplua_returnEnv(L);
return 0;
}
/* obligatory to use require"iupluagl" */
int luaopen_iupluagl(lua_State* L)
{
return iupgllua_open(L);
}
/* obligatory to use require"iupluagl51" */
int luaopen_iupluagl51(lua_State* L)
{
return iupgllua_open(L);
}
]]
}
function ctrl.createElement(class, arg)
return GLCanvas()
end
iupRegisterWidget(ctrl)
iupSetClass(ctrl, "iup widget")
|