1 #include "lqt_bind_QInputEvent.hpp"
3 int LuaBinder
< QInputEvent
>::__LuaWrapCall__delete (lua_State
*L
) {
4 QInputEvent
*& __lua__obj
= *static_cast<QInputEvent
**>(lqtL_checkudata(L
, 1, "QInputEvent*"));
6 lua_pushstring(L
, "trying to reference deleted pointer");
14 int LuaBinder
< QInputEvent
>::__LuaWrapCall__modifiers (lua_State
*L
) {
15 QInputEvent
*& __lua__obj
= *static_cast<QInputEvent
**>(lqtL_checkudata(L
, 1, "QInputEvent*"));
17 lua_pushstring(L
, "trying to reference deleted pointer");
21 QFlags
<Qt::KeyboardModifier
> ret
= __lua__obj
->QInputEvent::modifiers();
22 lqtL_passudata(L
, new QFlags
<Qt::KeyboardModifier
>(ret
), "QFlags<Qt::KeyboardModifier>*");
25 LuaBinder
< QInputEvent
>:: ~LuaBinder
< QInputEvent
> () {
26 int oldtop
= lua_gettop(L
);
27 lqtL_pushudata(L
, this, "QInputEvent*");
28 lua_getfield(L
, -1, "~QInputEvent");
30 if (lua_isfunction(L
, -1)) {
32 lua_pcall(L
, 1, 1, 0);
35 lua_settop(L
, oldtop
);
37 int luaopen_QInputEvent (lua_State
*L
) {
38 if (luaL_newmetatable(L
, "QInputEvent*")) {
39 lua_pushcfunction(L
, LuaBinder
< QInputEvent
>::__LuaWrapCall__delete
);
40 lua_setfield(L
, -2, "delete");
41 lua_pushcfunction(L
, LuaBinder
< QInputEvent
>::__LuaWrapCall__modifiers
);
42 lua_setfield(L
, -2, "modifiers");
44 lua_pushboolean(L
, 1);
45 lua_setfield(L
, -2, "QEvent*");
46 lua_setfield(L
, -2, "__base");
47 lua_pushcfunction(L
, lqtL_newindex
);
48 lua_setfield(L
, -2, "__newindex");
49 lua_pushcfunction(L
, lqtL_index
);
50 lua_setfield(L
, -2, "__index");
51 lua_pushcfunction(L
, lqtL_gc
);
52 lua_setfield(L
, -2, "__gc");
53 lua_pushstring(L
, "QInputEvent");
54 lua_setfield(L
, -2, "__qtype");
55 lua_setglobal(L
, "QInputEvent");