1 #include "lqt_bind_QPaintDevice.hpp"
3 int LuaBinder
< QPaintDevice
>::__LuaWrapCall__delete (lua_State
*L
) {
4 QPaintDevice
*& __lua__obj
= *static_cast<QPaintDevice
**>(lqtL_checkudata(L
, 1, "QPaintDevice*"));
6 lua_pushstring(L
, "trying to reference deleted pointer");
14 int LuaBinder
< QPaintDevice
>::__LuaWrapCall__logicalDpiX (lua_State
*L
) {
15 QPaintDevice
*& __lua__obj
= *static_cast<QPaintDevice
**>(lqtL_checkudata(L
, 1, "QPaintDevice*"));
17 lua_pushstring(L
, "trying to reference deleted pointer");
21 int ret
= __lua__obj
->QPaintDevice::logicalDpiX();
22 lua_pushinteger(L
, ret
);
25 int LuaBinder
< QPaintDevice
>::__LuaWrapCall__width (lua_State
*L
) {
26 QPaintDevice
*& __lua__obj
= *static_cast<QPaintDevice
**>(lqtL_checkudata(L
, 1, "QPaintDevice*"));
28 lua_pushstring(L
, "trying to reference deleted pointer");
32 int ret
= __lua__obj
->QPaintDevice::width();
33 lua_pushinteger(L
, ret
);
36 int LuaBinder
< QPaintDevice
>::__LuaWrapCall__widthMM (lua_State
*L
) {
37 QPaintDevice
*& __lua__obj
= *static_cast<QPaintDevice
**>(lqtL_checkudata(L
, 1, "QPaintDevice*"));
39 lua_pushstring(L
, "trying to reference deleted pointer");
43 int ret
= __lua__obj
->QPaintDevice::widthMM();
44 lua_pushinteger(L
, ret
);
47 int LuaBinder
< QPaintDevice
>::__LuaWrapCall__height (lua_State
*L
) {
48 QPaintDevice
*& __lua__obj
= *static_cast<QPaintDevice
**>(lqtL_checkudata(L
, 1, "QPaintDevice*"));
50 lua_pushstring(L
, "trying to reference deleted pointer");
54 int ret
= __lua__obj
->QPaintDevice::height();
55 lua_pushinteger(L
, ret
);
58 int LuaBinder
< QPaintDevice
>::__LuaWrapCall__numColors (lua_State
*L
) {
59 QPaintDevice
*& __lua__obj
= *static_cast<QPaintDevice
**>(lqtL_checkudata(L
, 1, "QPaintDevice*"));
61 lua_pushstring(L
, "trying to reference deleted pointer");
65 int ret
= __lua__obj
->QPaintDevice::numColors();
66 lua_pushinteger(L
, ret
);
69 int LuaBinder
< QPaintDevice
>::__LuaWrapCall__physicalDpiX (lua_State
*L
) {
70 QPaintDevice
*& __lua__obj
= *static_cast<QPaintDevice
**>(lqtL_checkudata(L
, 1, "QPaintDevice*"));
72 lua_pushstring(L
, "trying to reference deleted pointer");
76 int ret
= __lua__obj
->QPaintDevice::physicalDpiX();
77 lua_pushinteger(L
, ret
);
80 int LuaBinder
< QPaintDevice
>::__LuaWrapCall__physicalDpiY (lua_State
*L
) {
81 QPaintDevice
*& __lua__obj
= *static_cast<QPaintDevice
**>(lqtL_checkudata(L
, 1, "QPaintDevice*"));
83 lua_pushstring(L
, "trying to reference deleted pointer");
87 int ret
= __lua__obj
->QPaintDevice::physicalDpiY();
88 lua_pushinteger(L
, ret
);
91 int LuaBinder
< QPaintDevice
>::__LuaWrapCall__devType (lua_State
*L
) {
92 QPaintDevice
*& __lua__obj
= *static_cast<QPaintDevice
**>(lqtL_checkudata(L
, 1, "QPaintDevice*"));
94 lua_pushstring(L
, "trying to reference deleted pointer");
98 int ret
= __lua__obj
->QPaintDevice::devType();
99 lua_pushinteger(L
, ret
);
102 int LuaBinder
< QPaintDevice
>::__LuaWrapCall__logicalDpiY (lua_State
*L
) {
103 QPaintDevice
*& __lua__obj
= *static_cast<QPaintDevice
**>(lqtL_checkudata(L
, 1, "QPaintDevice*"));
105 lua_pushstring(L
, "trying to reference deleted pointer");
109 int ret
= __lua__obj
->QPaintDevice::logicalDpiY();
110 lua_pushinteger(L
, ret
);
113 int LuaBinder
< QPaintDevice
>::__LuaWrapCall__paintingActive (lua_State
*L
) {
114 QPaintDevice
*& __lua__obj
= *static_cast<QPaintDevice
**>(lqtL_checkudata(L
, 1, "QPaintDevice*"));
116 lua_pushstring(L
, "trying to reference deleted pointer");
120 bool ret
= __lua__obj
->QPaintDevice::paintingActive();
121 lua_pushboolean(L
, ret
);
124 int LuaBinder
< QPaintDevice
>::__LuaWrapCall__depth (lua_State
*L
) {
125 QPaintDevice
*& __lua__obj
= *static_cast<QPaintDevice
**>(lqtL_checkudata(L
, 1, "QPaintDevice*"));
127 lua_pushstring(L
, "trying to reference deleted pointer");
131 int ret
= __lua__obj
->QPaintDevice::depth();
132 lua_pushinteger(L
, ret
);
135 int LuaBinder
< QPaintDevice
>::__LuaWrapCall__heightMM (lua_State
*L
) {
136 QPaintDevice
*& __lua__obj
= *static_cast<QPaintDevice
**>(lqtL_checkudata(L
, 1, "QPaintDevice*"));
138 lua_pushstring(L
, "trying to reference deleted pointer");
142 int ret
= __lua__obj
->QPaintDevice::heightMM();
143 lua_pushinteger(L
, ret
);
146 QPaintEngine
* LuaBinder
< QPaintDevice
>::paintEngine () const {
147 bool absorbed
= false;
148 int oldtop
= lua_gettop(L
);
149 lqtL_pushudata(L
, this, "QPaintDevice*");
150 if (lua_getmetatable(L
, -1)) {
151 lua_getfield(L
, -1, "paintEngine");
157 if (lua_isfunction(L
, -0-2)) {
158 lua_pcall(L
, 0+1, 2, 0);
159 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
163 lua_settop(L
, oldtop
);
165 QPaintEngine
* ret
= *static_cast<QPaintEngine
**>(lqtL_checkudata(L
, -1, "QPaintEngine*"));
166 lua_settop(L
, oldtop
);
169 int LuaBinder
< QPaintDevice
>::metric (QPaintDevice::PaintDeviceMetric arg1
) const {
170 bool absorbed
= false;
171 int oldtop
= lua_gettop(L
);
172 lqtL_pushudata(L
, this, "QPaintDevice*");
173 if (lua_getmetatable(L
, -1)) {
174 lua_getfield(L
, -1, "metric");
180 lqtL_pushenum(L
, arg1
, "QPaintDevice::PaintDeviceMetric");
181 if (lua_isfunction(L
, -1-2)) {
182 lua_pcall(L
, 1+1, 2, 0);
183 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
187 lua_settop(L
, oldtop
);
188 return this->QPaintDevice::metric(arg1
);
190 int ret
= lua_tointeger(L
, -1);
191 lua_settop(L
, oldtop
);
194 int LuaBinder
< QPaintDevice
>::devType () const {
195 bool absorbed
= false;
196 int oldtop
= lua_gettop(L
);
197 lqtL_pushudata(L
, this, "QPaintDevice*");
198 if (lua_getmetatable(L
, -1)) {
199 lua_getfield(L
, -1, "devType");
205 if (lua_isfunction(L
, -0-2)) {
206 lua_pcall(L
, 0+1, 2, 0);
207 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
211 lua_settop(L
, oldtop
);
212 return this->QPaintDevice::devType();
214 int ret
= lua_tointeger(L
, -1);
215 lua_settop(L
, oldtop
);
218 LuaBinder
< QPaintDevice
>:: ~LuaBinder
< QPaintDevice
> () {
219 int oldtop
= lua_gettop(L
);
220 lqtL_pushudata(L
, this, "QPaintDevice*");
221 lua_getfield(L
, -1, "~QPaintDevice");
223 if (lua_isfunction(L
, -1)) {
225 lua_pcall(L
, 1, 1, 0);
228 lua_settop(L
, oldtop
);
230 int LuaBinder
< QPaintDevice
>::lqt_pushenum_PaintDeviceMetric (lua_State
*L
) {
232 lua_getfield(L
, LUA_REGISTRYINDEX
, LQT_ENUMS
);
233 if (!lua_istable(L
, -1)) {
236 lua_pushvalue(L
, -1);
237 lua_setfield(L
, LUA_REGISTRYINDEX
, LQT_ENUMS
);
240 enum_table
= lua_gettop(L
);
241 lua_pushstring(L
, "PdmWidth");
242 lua_rawseti(L
, enum_table
, 1);
243 lua_pushinteger(L
, 1);
244 lua_setfield(L
, enum_table
, "PdmWidth");
245 lua_pushstring(L
, "PdmHeight");
246 lua_rawseti(L
, enum_table
, 2);
247 lua_pushinteger(L
, 2);
248 lua_setfield(L
, enum_table
, "PdmHeight");
249 lua_pushstring(L
, "PdmWidthMM");
250 lua_rawseti(L
, enum_table
, 3);
251 lua_pushinteger(L
, 3);
252 lua_setfield(L
, enum_table
, "PdmWidthMM");
253 lua_pushstring(L
, "PdmHeightMM");
254 lua_rawseti(L
, enum_table
, 4);
255 lua_pushinteger(L
, 4);
256 lua_setfield(L
, enum_table
, "PdmHeightMM");
257 lua_pushstring(L
, "PdmNumColors");
258 lua_rawseti(L
, enum_table
, 5);
259 lua_pushinteger(L
, 5);
260 lua_setfield(L
, enum_table
, "PdmNumColors");
261 lua_pushstring(L
, "PdmDepth");
262 lua_rawseti(L
, enum_table
, 6);
263 lua_pushinteger(L
, 6);
264 lua_setfield(L
, enum_table
, "PdmDepth");
265 lua_pushstring(L
, "PdmDpiX");
266 lua_rawseti(L
, enum_table
, 7);
267 lua_pushinteger(L
, 7);
268 lua_setfield(L
, enum_table
, "PdmDpiX");
269 lua_pushstring(L
, "PdmDpiY");
270 lua_rawseti(L
, enum_table
, 8);
271 lua_pushinteger(L
, 8);
272 lua_setfield(L
, enum_table
, "PdmDpiY");
273 lua_pushstring(L
, "PdmPhysicalDpiX");
274 lua_rawseti(L
, enum_table
, 9);
275 lua_pushinteger(L
, 9);
276 lua_setfield(L
, enum_table
, "PdmPhysicalDpiX");
277 lua_pushstring(L
, "PdmPhysicalDpiY");
278 lua_rawseti(L
, enum_table
, 10);
279 lua_pushinteger(L
, 10);
280 lua_setfield(L
, enum_table
, "PdmPhysicalDpiY");
281 lua_pushcfunction(L
, LuaBinder
< QPaintDevice
>::lqt_pushenum_PaintDeviceMetric_QFLAGS_CREATOR
);
282 lua_setfield(L
, enum_table
, "QFlags");
283 lua_pushvalue(L
, -1);
284 lua_setfield(L
, -3, "QPaintDevice::PaintDeviceMetric");
288 int LuaBinder
< QPaintDevice
>::lqt_pushenum_PaintDeviceMetric_QFLAGS_CREATOR (lua_State
*L
) {
289 int argn
= lua_gettop(L
);
291 void *p
= lua_newuserdata(L
, sizeof(QFlags
<QPaintDevice::PaintDeviceMetric
>*) + sizeof(QFlags
<QPaintDevice::PaintDeviceMetric
>));
292 QFlags
<QPaintDevice::PaintDeviceMetric
> *fl
= static_cast<QFlags
<QPaintDevice::PaintDeviceMetric
>*>( static_cast<void*>(&static_cast<QFlags
<QPaintDevice::PaintDeviceMetric
>**>(p
)[1]) );
294 for (i
=1;i
<=argn
;i
++) {
295 *fl
|= static_cast<QPaintDevice::PaintDeviceMetric
>(lqtL_toenum(L
, i
, "QPaintDevice::PaintDeviceMetric"));
297 if (luaL_newmetatable(L
, "QFlags<QPaintDevice::PaintDeviceMetric>*")) {
298 lua_pushstring(L
, "QFlags<QPaintDevice::PaintDeviceMetric>*");
299 lua_setfield(L
, -2, "__qtype");
301 lua_setmetatable(L
, -2);
304 int luaopen_QPaintDevice (lua_State
*L
) {
305 if (luaL_newmetatable(L
, "QPaintDevice*")) {
306 lua_pushcfunction(L
, LuaBinder
< QPaintDevice
>::__LuaWrapCall__delete
);
307 lua_setfield(L
, -2, "delete");
308 lua_pushcfunction(L
, LuaBinder
< QPaintDevice
>::__LuaWrapCall__logicalDpiX
);
309 lua_setfield(L
, -2, "logicalDpiX");
310 lua_pushcfunction(L
, LuaBinder
< QPaintDevice
>::__LuaWrapCall__width
);
311 lua_setfield(L
, -2, "width");
312 lua_pushcfunction(L
, LuaBinder
< QPaintDevice
>::__LuaWrapCall__widthMM
);
313 lua_setfield(L
, -2, "widthMM");
314 lua_pushcfunction(L
, LuaBinder
< QPaintDevice
>::__LuaWrapCall__height
);
315 lua_setfield(L
, -2, "height");
316 lua_pushcfunction(L
, LuaBinder
< QPaintDevice
>::__LuaWrapCall__numColors
);
317 lua_setfield(L
, -2, "numColors");
318 lua_pushcfunction(L
, LuaBinder
< QPaintDevice
>::__LuaWrapCall__physicalDpiX
);
319 lua_setfield(L
, -2, "physicalDpiX");
320 lua_pushcfunction(L
, LuaBinder
< QPaintDevice
>::__LuaWrapCall__physicalDpiY
);
321 lua_setfield(L
, -2, "physicalDpiY");
322 lua_pushcfunction(L
, LuaBinder
< QPaintDevice
>::__LuaWrapCall__devType
);
323 lua_setfield(L
, -2, "devType");
324 lua_pushcfunction(L
, LuaBinder
< QPaintDevice
>::__LuaWrapCall__logicalDpiY
);
325 lua_setfield(L
, -2, "logicalDpiY");
326 lua_pushcfunction(L
, LuaBinder
< QPaintDevice
>::__LuaWrapCall__paintingActive
);
327 lua_setfield(L
, -2, "paintingActive");
328 lua_pushcfunction(L
, LuaBinder
< QPaintDevice
>::__LuaWrapCall__depth
);
329 lua_setfield(L
, -2, "depth");
330 lua_pushcfunction(L
, LuaBinder
< QPaintDevice
>::__LuaWrapCall__heightMM
);
331 lua_setfield(L
, -2, "heightMM");
332 LuaBinder
< QPaintDevice
>::lqt_pushenum_PaintDeviceMetric(L
);
333 lua_setfield(L
, -2, "PaintDeviceMetric");
335 lua_setfield(L
, -2, "__base");
336 lua_pushcfunction(L
, lqtL_newindex
);
337 lua_setfield(L
, -2, "__newindex");
338 lua_pushcfunction(L
, lqtL_index
);
339 lua_setfield(L
, -2, "__index");
340 lua_pushcfunction(L
, lqtL_gc
);
341 lua_setfield(L
, -2, "__gc");
342 lua_pushstring(L
, "QPaintDevice");
343 lua_setfield(L
, -2, "__qtype");
344 lua_setglobal(L
, "QPaintDevice");