1 #include "lqt_bind_QSyntaxHighlighter.hpp"
3 int LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__tr__OverloadedVersion__1 (lua_State
*L
) {
4 const char * arg1
= lua_tostring(L
, 1);
5 const char * arg2
= (lua_type(L
, 2)==LUA_TSTRING
)?lua_tostring(L
, 2):static_cast< const char * >(0);
6 QString ret
= QSyntaxHighlighter::tr(arg1
, arg2
);
7 lua_pushlstring(L
, ret
.toAscii().data(), ret
.toAscii().size());
10 int LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__tr__OverloadedVersion__2 (lua_State
*L
) {
11 const char * arg1
= lua_tostring(L
, 1);
12 const char * arg2
= lua_tostring(L
, 2);
13 int arg3
= lua_tointeger(L
, 3);
14 QString ret
= QSyntaxHighlighter::tr(arg1
, arg2
, arg3
);
15 lua_pushlstring(L
, ret
.toAscii().data(), ret
.toAscii().size());
18 int LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__tr (lua_State
*L
) {
20 const int premium
= 11+lua_gettop(L
);
22 if ((lua_type(L
, 1)==LUA_TSTRING
)) {
25 score
[1] += premium
-1; // table: 0xa86b00;
27 score
[1] -= premium
*premium
;
29 if ((lua_type(L
, 2)==LUA_TSTRING
)) {
32 score
[1] += premium
-1; // table: 0xeae5f0;
34 score
[1] -= premium
*premium
;
37 if ((lua_type(L
, 1)==LUA_TSTRING
)) {
40 score
[2] += premium
-1; // table: 0x8ae060;
42 score
[2] -= premium
*premium
;
44 if ((lua_type(L
, 2)==LUA_TSTRING
)) {
47 score
[2] += premium
-1; // table: 0x979540;
49 score
[2] -= premium
*premium
;
51 if (lua_isnumber(L
, 3)) {
54 score
[2] += premium
-1; // table: 0xc46500;
56 score
[2] -= premium
*premium
;
59 for (int i
=1;i
<=2;i
++) {
60 if (score
[best
] < score
[i
]) { best
= i
; }
63 case 1: return __LuaWrapCall__tr__OverloadedVersion__1(L
); break;
64 case 2: return __LuaWrapCall__tr__OverloadedVersion__2(L
); break;
66 lua_pushstring(L
, "no overload of function __LuaWrapCall__tr matching arguments");
70 int LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__delete (lua_State
*L
) {
71 QSyntaxHighlighter
*& __lua__obj
= *static_cast<QSyntaxHighlighter
**>(lqtL_checkudata(L
, 1, "QSyntaxHighlighter*"));
73 lua_pushstring(L
, "trying to reference deleted pointer");
81 int LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__new__OverloadedVersion__1 (lua_State
*L
) {
82 QObject
* arg1
= *static_cast<QObject
**>(lqtL_checkudata(L
, 1, "QObject*"));
83 QSyntaxHighlighter
* ret
= new LuaBinder
< QSyntaxHighlighter
>(L
, arg1
);
84 lqtL_passudata(L
, ret
, "QSyntaxHighlighter*");
87 int LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__new__OverloadedVersion__2 (lua_State
*L
) {
88 QTextDocument
* arg1
= *static_cast<QTextDocument
**>(lqtL_checkudata(L
, 1, "QTextDocument*"));
89 QSyntaxHighlighter
* ret
= new LuaBinder
< QSyntaxHighlighter
>(L
, arg1
);
90 lqtL_passudata(L
, ret
, "QSyntaxHighlighter*");
93 int LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__new__OverloadedVersion__3 (lua_State
*L
) {
94 QTextEdit
* arg1
= *static_cast<QTextEdit
**>(lqtL_checkudata(L
, 1, "QTextEdit*"));
95 QSyntaxHighlighter
* ret
= new LuaBinder
< QSyntaxHighlighter
>(L
, arg1
);
96 lqtL_passudata(L
, ret
, "QSyntaxHighlighter*");
99 int LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__new (lua_State
*L
) {
101 const int premium
= 11+lua_gettop(L
);
103 if (lqtL_testudata(L
, 1, "QObject*")) {
106 score
[1] += premium
-1; // table: 0xe4af40;
108 score
[1] -= premium
*premium
;
111 if (lqtL_testudata(L
, 1, "QTextDocument*")) {
114 score
[2] += premium
-1; // table: 0x796ff0;
116 score
[2] -= premium
*premium
;
119 if (lqtL_testudata(L
, 1, "QTextEdit*")) {
122 score
[3] += premium
-1; // table: 0xd2be50;
124 score
[3] -= premium
*premium
;
127 for (int i
=1;i
<=3;i
++) {
128 if (score
[best
] < score
[i
]) { best
= i
; }
131 case 1: return __LuaWrapCall__new__OverloadedVersion__1(L
); break;
132 case 2: return __LuaWrapCall__new__OverloadedVersion__2(L
); break;
133 case 3: return __LuaWrapCall__new__OverloadedVersion__3(L
); break;
135 lua_pushstring(L
, "no overload of function __LuaWrapCall__new matching arguments");
139 int LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__setDocument (lua_State
*L
) {
140 QSyntaxHighlighter
*& __lua__obj
= *static_cast<QSyntaxHighlighter
**>(lqtL_checkudata(L
, 1, "QSyntaxHighlighter*"));
142 lua_pushstring(L
, "trying to reference deleted pointer");
146 QTextDocument
* arg1
= *static_cast<QTextDocument
**>(lqtL_checkudata(L
, 2, "QTextDocument*"));
147 __lua__obj
->QSyntaxHighlighter::setDocument(arg1
);
150 int LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__trUtf8__OverloadedVersion__1 (lua_State
*L
) {
151 const char * arg1
= lua_tostring(L
, 1);
152 const char * arg2
= (lua_type(L
, 2)==LUA_TSTRING
)?lua_tostring(L
, 2):static_cast< const char * >(0);
153 QString ret
= QSyntaxHighlighter::trUtf8(arg1
, arg2
);
154 lua_pushlstring(L
, ret
.toAscii().data(), ret
.toAscii().size());
157 int LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__trUtf8__OverloadedVersion__2 (lua_State
*L
) {
158 const char * arg1
= lua_tostring(L
, 1);
159 const char * arg2
= lua_tostring(L
, 2);
160 int arg3
= lua_tointeger(L
, 3);
161 QString ret
= QSyntaxHighlighter::trUtf8(arg1
, arg2
, arg3
);
162 lua_pushlstring(L
, ret
.toAscii().data(), ret
.toAscii().size());
165 int LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__trUtf8 (lua_State
*L
) {
167 const int premium
= 11+lua_gettop(L
);
169 if ((lua_type(L
, 1)==LUA_TSTRING
)) {
172 score
[1] += premium
-1; // table: 0x9ed820;
174 score
[1] -= premium
*premium
;
176 if ((lua_type(L
, 2)==LUA_TSTRING
)) {
179 score
[1] += premium
-1; // table: 0xee36c0;
181 score
[1] -= premium
*premium
;
184 if ((lua_type(L
, 1)==LUA_TSTRING
)) {
187 score
[2] += premium
-1; // table: 0x947210;
189 score
[2] -= premium
*premium
;
191 if ((lua_type(L
, 2)==LUA_TSTRING
)) {
194 score
[2] += premium
-1; // table: 0x94b260;
196 score
[2] -= premium
*premium
;
198 if (lua_isnumber(L
, 3)) {
201 score
[2] += premium
-1; // table: 0x9355a0;
203 score
[2] -= premium
*premium
;
206 for (int i
=1;i
<=2;i
++) {
207 if (score
[best
] < score
[i
]) { best
= i
; }
210 case 1: return __LuaWrapCall__trUtf8__OverloadedVersion__1(L
); break;
211 case 2: return __LuaWrapCall__trUtf8__OverloadedVersion__2(L
); break;
213 lua_pushstring(L
, "no overload of function __LuaWrapCall__trUtf8 matching arguments");
217 int LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__metaObject (lua_State
*L
) {
218 QSyntaxHighlighter
*& __lua__obj
= *static_cast<QSyntaxHighlighter
**>(lqtL_checkudata(L
, 1, "QSyntaxHighlighter*"));
220 lua_pushstring(L
, "trying to reference deleted pointer");
224 const QMetaObject
* ret
= __lua__obj
->QSyntaxHighlighter::metaObject();
225 lqtL_pushudata(L
, ret
, "QMetaObject*");
228 int LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__rehighlight (lua_State
*L
) {
229 QSyntaxHighlighter
*& __lua__obj
= *static_cast<QSyntaxHighlighter
**>(lqtL_checkudata(L
, 1, "QSyntaxHighlighter*"));
231 lua_pushstring(L
, "trying to reference deleted pointer");
235 __lua__obj
->QSyntaxHighlighter::rehighlight();
238 int LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__document (lua_State
*L
) {
239 QSyntaxHighlighter
*& __lua__obj
= *static_cast<QSyntaxHighlighter
**>(lqtL_checkudata(L
, 1, "QSyntaxHighlighter*"));
241 lua_pushstring(L
, "trying to reference deleted pointer");
245 QTextDocument
* ret
= __lua__obj
->QSyntaxHighlighter::document();
246 lqtL_pushudata(L
, ret
, "QTextDocument*");
249 bool LuaBinder
< QSyntaxHighlighter
>::eventFilter (QObject
* arg1
, QEvent
* arg2
) {
250 bool absorbed
= false;
251 int oldtop
= lua_gettop(L
);
252 lqtL_pushudata(L
, this, "QSyntaxHighlighter*");
253 if (lua_getmetatable(L
, -1)) {
254 lua_getfield(L
, -1, "eventFilter");
260 lqtL_pushudata(L
, arg1
, "QObject*");
261 lqtL_pushudata(L
, arg2
, "QEvent*");
262 if (lua_isfunction(L
, -2-2)) {
263 lua_pcall(L
, 2+1, 2, 0);
264 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
268 lua_settop(L
, oldtop
);
269 return this->QObject::eventFilter(arg1
, arg2
);
271 bool ret
= (bool)lua_toboolean(L
, -1);
272 lua_settop(L
, oldtop
);
275 void LuaBinder
< QSyntaxHighlighter
>::highlightBlock (const QString
& arg1
) {
276 bool absorbed
= false;
277 int oldtop
= lua_gettop(L
);
278 lqtL_pushudata(L
, this, "QSyntaxHighlighter*");
279 if (lua_getmetatable(L
, -1)) {
280 lua_getfield(L
, -1, "highlightBlock");
286 lua_pushlstring(L
, arg1
.toAscii().data(), arg1
.toAscii().size());
287 if (lua_isfunction(L
, -1-2)) {
288 lua_pcall(L
, 1+1, 2, 0);
289 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
293 lua_settop(L
, oldtop
);
295 lua_settop(L
, oldtop
);
297 const QMetaObject
* LuaBinder
< QSyntaxHighlighter
>::metaObject () const {
298 bool absorbed
= false;
299 int oldtop
= lua_gettop(L
);
300 lqtL_pushudata(L
, this, "QSyntaxHighlighter*");
301 if (lua_getmetatable(L
, -1)) {
302 lua_getfield(L
, -1, "metaObject");
308 if (lua_isfunction(L
, -0-2)) {
309 lua_pcall(L
, 0+1, 2, 0);
310 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
314 lua_settop(L
, oldtop
);
315 return this->QSyntaxHighlighter::metaObject();
317 const QMetaObject
* ret
= *static_cast<QMetaObject
**>(lqtL_checkudata(L
, -1, "QMetaObject*"));
318 lua_settop(L
, oldtop
);
321 bool LuaBinder
< QSyntaxHighlighter
>::event (QEvent
* arg1
) {
322 bool absorbed
= false;
323 int oldtop
= lua_gettop(L
);
324 lqtL_pushudata(L
, this, "QSyntaxHighlighter*");
325 if (lua_getmetatable(L
, -1)) {
326 lua_getfield(L
, -1, "event");
332 lqtL_pushudata(L
, arg1
, "QEvent*");
333 if (lua_isfunction(L
, -1-2)) {
334 lua_pcall(L
, 1+1, 2, 0);
335 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
339 lua_settop(L
, oldtop
);
340 return this->QObject::event(arg1
);
342 bool ret
= (bool)lua_toboolean(L
, -1);
343 lua_settop(L
, oldtop
);
346 void LuaBinder
< QSyntaxHighlighter
>::disconnectNotify (const char * arg1
) {
347 bool absorbed
= false;
348 int oldtop
= lua_gettop(L
);
349 lqtL_pushudata(L
, this, "QSyntaxHighlighter*");
350 if (lua_getmetatable(L
, -1)) {
351 lua_getfield(L
, -1, "disconnectNotify");
357 lua_pushstring(L
, arg1
);
358 if (lua_isfunction(L
, -1-2)) {
359 lua_pcall(L
, 1+1, 2, 0);
360 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
364 lua_settop(L
, oldtop
);
365 this->QObject::disconnectNotify(arg1
);
367 lua_settop(L
, oldtop
);
369 void LuaBinder
< QSyntaxHighlighter
>::connectNotify (const char * arg1
) {
370 bool absorbed
= false;
371 int oldtop
= lua_gettop(L
);
372 lqtL_pushudata(L
, this, "QSyntaxHighlighter*");
373 if (lua_getmetatable(L
, -1)) {
374 lua_getfield(L
, -1, "connectNotify");
380 lua_pushstring(L
, arg1
);
381 if (lua_isfunction(L
, -1-2)) {
382 lua_pcall(L
, 1+1, 2, 0);
383 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
387 lua_settop(L
, oldtop
);
388 this->QObject::connectNotify(arg1
);
390 lua_settop(L
, oldtop
);
392 void LuaBinder
< QSyntaxHighlighter
>::timerEvent (QTimerEvent
* arg1
) {
393 bool absorbed
= false;
394 int oldtop
= lua_gettop(L
);
395 lqtL_pushudata(L
, this, "QSyntaxHighlighter*");
396 if (lua_getmetatable(L
, -1)) {
397 lua_getfield(L
, -1, "timerEvent");
403 lqtL_pushudata(L
, arg1
, "QTimerEvent*");
404 if (lua_isfunction(L
, -1-2)) {
405 lua_pcall(L
, 1+1, 2, 0);
406 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
410 lua_settop(L
, oldtop
);
411 this->QObject::timerEvent(arg1
);
413 lua_settop(L
, oldtop
);
415 void LuaBinder
< QSyntaxHighlighter
>::childEvent (QChildEvent
* arg1
) {
416 bool absorbed
= false;
417 int oldtop
= lua_gettop(L
);
418 lqtL_pushudata(L
, this, "QSyntaxHighlighter*");
419 if (lua_getmetatable(L
, -1)) {
420 lua_getfield(L
, -1, "childEvent");
426 lqtL_pushudata(L
, arg1
, "QChildEvent*");
427 if (lua_isfunction(L
, -1-2)) {
428 lua_pcall(L
, 1+1, 2, 0);
429 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
433 lua_settop(L
, oldtop
);
434 this->QObject::childEvent(arg1
);
436 lua_settop(L
, oldtop
);
438 void LuaBinder
< QSyntaxHighlighter
>::customEvent (QEvent
* arg1
) {
439 bool absorbed
= false;
440 int oldtop
= lua_gettop(L
);
441 lqtL_pushudata(L
, this, "QSyntaxHighlighter*");
442 if (lua_getmetatable(L
, -1)) {
443 lua_getfield(L
, -1, "customEvent");
449 lqtL_pushudata(L
, arg1
, "QEvent*");
450 if (lua_isfunction(L
, -1-2)) {
451 lua_pcall(L
, 1+1, 2, 0);
452 absorbed
= (bool)lua_toboolean(L
, -1) || (bool)lua_toboolean(L
, -2);
456 lua_settop(L
, oldtop
);
457 this->QObject::customEvent(arg1
);
459 lua_settop(L
, oldtop
);
461 LuaBinder
< QSyntaxHighlighter
>:: ~LuaBinder
< QSyntaxHighlighter
> () {
462 int oldtop
= lua_gettop(L
);
463 lqtL_pushudata(L
, this, "QSyntaxHighlighter*");
464 lua_getfield(L
, -1, "~QSyntaxHighlighter");
466 if (lua_isfunction(L
, -1)) {
468 lua_pcall(L
, 1, 1, 0);
471 lua_settop(L
, oldtop
);
473 int luaopen_QSyntaxHighlighter (lua_State
*L
) {
474 if (luaL_newmetatable(L
, "QSyntaxHighlighter*")) {
475 lua_pushcfunction(L
, LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__tr
);
476 lua_setfield(L
, -2, "tr");
477 lua_pushcfunction(L
, LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__delete
);
478 lua_setfield(L
, -2, "delete");
479 lua_pushcfunction(L
, LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__new
);
480 lua_setfield(L
, -2, "new");
481 lua_pushcfunction(L
, LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__setDocument
);
482 lua_setfield(L
, -2, "setDocument");
483 lua_pushcfunction(L
, LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__trUtf8
);
484 lua_setfield(L
, -2, "trUtf8");
485 lua_pushcfunction(L
, LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__metaObject
);
486 lua_setfield(L
, -2, "metaObject");
487 lua_pushcfunction(L
, LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__rehighlight
);
488 lua_setfield(L
, -2, "rehighlight");
489 lua_pushcfunction(L
, LuaBinder
< QSyntaxHighlighter
>::__LuaWrapCall__document
);
490 lua_setfield(L
, -2, "document");
492 lua_pushboolean(L
, 1);
493 lua_setfield(L
, -2, "QObject*");
494 lua_setfield(L
, -2, "__base");
495 lua_pushcfunction(L
, lqtL_newindex
);
496 lua_setfield(L
, -2, "__newindex");
497 lua_pushcfunction(L
, lqtL_index
);
498 lua_setfield(L
, -2, "__index");
499 lua_pushcfunction(L
, lqtL_gc
);
500 lua_setfield(L
, -2, "__gc");
501 lua_pushstring(L
, "QSyntaxHighlighter");
502 lua_setfield(L
, -2, "__qtype");
503 lua_setglobal(L
, "QSyntaxHighlighter");