PageRenderTime 213ms CodeModel.GetById 41ms app.highlight 148ms RepoModel.GetById 13ms app.codeStats 0ms

/script_binding/lua/lua_ftk_typedef.c

http://ftk.googlecode.com/
C | 934 lines | 801 code | 132 blank | 1 comment | 62 complexity | bcbd7d7ed37e5946b6c384deaa018c08 MD5 | raw file
  1/*This file is generated by luagen.*/
  2#include "lua_ftk_typedef.h"
  3#include "lua_ftk_callbacks.h"
  4
  5static void tolua_reg_types (lua_State* L)
  6{
  7	tolua_usertype(L, "FtkPoint");
  8	tolua_usertype(L, "FtkColor");
  9	tolua_usertype(L, "FtkRect");
 10	tolua_usertype(L, "FtkFileInfo");
 11	tolua_usertype(L, "FtkListItemInfo");
 12	tolua_usertype(L, "FtkIconViewItem");
 13}
 14
 15int lua_ftk_point_create(lua_State* L)
 16{
 17	FtkPoint* retv = calloc(1, sizeof(FtkPoint));
 18	tolua_pushusertype_and_takeownership(L, (void*)retv, "FtkPoint");
 19
 20	return 1;
 21}
 22
 23static int tolua_get_FtkPoint_x(lua_State* L)
 24{
 25	lua_Number retv;
 26	FtkPoint* thiz = (FtkPoint*)  tolua_tousertype(L, 1, 0);
 27	return_val_if_fail(thiz != NULL, 0);
 28	retv = (lua_Number)thiz->x;
 29	tolua_pushnumber(L, (lua_Number)retv);
 30
 31	return 1;
 32}
 33
 34static int tolua_set_FtkPoint_x(lua_State* L)
 35{
 36	FtkPoint* thiz = (FtkPoint*)  tolua_tousertype(L, 1, 0);
 37	return_val_if_fail(thiz != NULL, 0);
 38	thiz->x = (int) (tolua_tonumber(L, 2, 0));
 39
 40	return 1;
 41}
 42
 43static int tolua_get_FtkPoint_y(lua_State* L)
 44{
 45	lua_Number retv;
 46	FtkPoint* thiz = (FtkPoint*)  tolua_tousertype(L, 1, 0);
 47	return_val_if_fail(thiz != NULL, 0);
 48	retv = (lua_Number)thiz->y;
 49	tolua_pushnumber(L, (lua_Number)retv);
 50
 51	return 1;
 52}
 53
 54static int tolua_set_FtkPoint_y(lua_State* L)
 55{
 56	FtkPoint* thiz = (FtkPoint*)  tolua_tousertype(L, 1, 0);
 57	return_val_if_fail(thiz != NULL, 0);
 58	thiz->y = (int) (tolua_tonumber(L, 2, 0));
 59
 60	return 1;
 61}
 62
 63int lua_ftk_color_create(lua_State* L)
 64{
 65	FtkColor* retv = calloc(1, sizeof(FtkColor));
 66	tolua_pushusertype_and_takeownership(L, (void*)retv, "FtkColor");
 67
 68	return 1;
 69}
 70
 71static int tolua_get_FtkColor_b(lua_State* L)
 72{
 73	lua_Number retv;
 74	FtkColor* thiz = (FtkColor*)  tolua_tousertype(L, 1, 0);
 75	return_val_if_fail(thiz != NULL, 0);
 76	retv = (lua_Number)thiz->b;
 77	tolua_pushnumber(L, (lua_Number)retv);
 78
 79	return 1;
 80}
 81
 82static int tolua_set_FtkColor_b(lua_State* L)
 83{
 84	FtkColor* thiz = (FtkColor*)  tolua_tousertype(L, 1, 0);
 85	return_val_if_fail(thiz != NULL, 0);
 86	thiz->b = (int) (tolua_tonumber(L, 2, 0));
 87
 88	return 1;
 89}
 90
 91static int tolua_get_FtkColor_g(lua_State* L)
 92{
 93	lua_Number retv;
 94	FtkColor* thiz = (FtkColor*)  tolua_tousertype(L, 1, 0);
 95	return_val_if_fail(thiz != NULL, 0);
 96	retv = (lua_Number)thiz->g;
 97	tolua_pushnumber(L, (lua_Number)retv);
 98
 99	return 1;
100}
101
102static int tolua_set_FtkColor_g(lua_State* L)
103{
104	FtkColor* thiz = (FtkColor*)  tolua_tousertype(L, 1, 0);
105	return_val_if_fail(thiz != NULL, 0);
106	thiz->g = (int) (tolua_tonumber(L, 2, 0));
107
108	return 1;
109}
110
111static int tolua_get_FtkColor_r(lua_State* L)
112{
113	lua_Number retv;
114	FtkColor* thiz = (FtkColor*)  tolua_tousertype(L, 1, 0);
115	return_val_if_fail(thiz != NULL, 0);
116	retv = (lua_Number)thiz->r;
117	tolua_pushnumber(L, (lua_Number)retv);
118
119	return 1;
120}
121
122static int tolua_set_FtkColor_r(lua_State* L)
123{
124	FtkColor* thiz = (FtkColor*)  tolua_tousertype(L, 1, 0);
125	return_val_if_fail(thiz != NULL, 0);
126	thiz->r = (int) (tolua_tonumber(L, 2, 0));
127
128	return 1;
129}
130
131static int tolua_get_FtkColor_a(lua_State* L)
132{
133	lua_Number retv;
134	FtkColor* thiz = (FtkColor*)  tolua_tousertype(L, 1, 0);
135	return_val_if_fail(thiz != NULL, 0);
136	retv = (lua_Number)thiz->a;
137	tolua_pushnumber(L, (lua_Number)retv);
138
139	return 1;
140}
141
142static int tolua_set_FtkColor_a(lua_State* L)
143{
144	FtkColor* thiz = (FtkColor*)  tolua_tousertype(L, 1, 0);
145	return_val_if_fail(thiz != NULL, 0);
146	thiz->a = (int) (tolua_tonumber(L, 2, 0));
147
148	return 1;
149}
150
151int lua_ftk_rect_create(lua_State* L)
152{
153	FtkRect* retv = calloc(1, sizeof(FtkRect));
154	tolua_pushusertype_and_takeownership(L, (void*)retv, "FtkRect");
155
156	return 1;
157}
158
159static int tolua_get_FtkRect_x(lua_State* L)
160{
161	lua_Number retv;
162	FtkRect* thiz = (FtkRect*)  tolua_tousertype(L, 1, 0);
163	return_val_if_fail(thiz != NULL, 0);
164	retv = (lua_Number)thiz->x;
165	tolua_pushnumber(L, (lua_Number)retv);
166
167	return 1;
168}
169
170static int tolua_set_FtkRect_x(lua_State* L)
171{
172	FtkRect* thiz = (FtkRect*)  tolua_tousertype(L, 1, 0);
173	return_val_if_fail(thiz != NULL, 0);
174	thiz->x = (int) (tolua_tonumber(L, 2, 0));
175
176	return 1;
177}
178
179static int tolua_get_FtkRect_y(lua_State* L)
180{
181	lua_Number retv;
182	FtkRect* thiz = (FtkRect*)  tolua_tousertype(L, 1, 0);
183	return_val_if_fail(thiz != NULL, 0);
184	retv = (lua_Number)thiz->y;
185	tolua_pushnumber(L, (lua_Number)retv);
186
187	return 1;
188}
189
190static int tolua_set_FtkRect_y(lua_State* L)
191{
192	FtkRect* thiz = (FtkRect*)  tolua_tousertype(L, 1, 0);
193	return_val_if_fail(thiz != NULL, 0);
194	thiz->y = (int) (tolua_tonumber(L, 2, 0));
195
196	return 1;
197}
198
199static int tolua_get_FtkRect_width(lua_State* L)
200{
201	lua_Number retv;
202	FtkRect* thiz = (FtkRect*)  tolua_tousertype(L, 1, 0);
203	return_val_if_fail(thiz != NULL, 0);
204	retv = (lua_Number)thiz->width;
205	tolua_pushnumber(L, (lua_Number)retv);
206
207	return 1;
208}
209
210static int tolua_set_FtkRect_width(lua_State* L)
211{
212	FtkRect* thiz = (FtkRect*)  tolua_tousertype(L, 1, 0);
213	return_val_if_fail(thiz != NULL, 0);
214	thiz->width = (int) (tolua_tonumber(L, 2, 0));
215
216	return 1;
217}
218
219static int tolua_get_FtkRect_height(lua_State* L)
220{
221	lua_Number retv;
222	FtkRect* thiz = (FtkRect*)  tolua_tousertype(L, 1, 0);
223	return_val_if_fail(thiz != NULL, 0);
224	retv = (lua_Number)thiz->height;
225	tolua_pushnumber(L, (lua_Number)retv);
226
227	return 1;
228}
229
230static int tolua_set_FtkRect_height(lua_State* L)
231{
232	FtkRect* thiz = (FtkRect*)  tolua_tousertype(L, 1, 0);
233	return_val_if_fail(thiz != NULL, 0);
234	thiz->height = (int) (tolua_tonumber(L, 2, 0));
235
236	return 1;
237}
238
239int lua_ftk_file_info_create(lua_State* L)
240{
241	FtkFileInfo* retv = calloc(1, sizeof(FtkFileInfo));
242	tolua_pushusertype_and_takeownership(L, (void*)retv, "FtkFileInfo");
243
244	return 1;
245}
246
247static int tolua_get_FtkFileInfo_uid(lua_State* L)
248{
249	lua_Number retv;
250	FtkFileInfo* thiz = (FtkFileInfo*)  tolua_tousertype(L, 1, 0);
251	return_val_if_fail(thiz != NULL, 0);
252	retv = (lua_Number)thiz->uid;
253	tolua_pushnumber(L, (lua_Number)retv);
254
255	return 1;
256}
257
258static int tolua_set_FtkFileInfo_uid(lua_State* L)
259{
260	FtkFileInfo* thiz = (FtkFileInfo*)  tolua_tousertype(L, 1, 0);
261	return_val_if_fail(thiz != NULL, 0);
262	thiz->uid = (int) (tolua_tonumber(L, 2, 0));
263
264	return 1;
265}
266
267static int tolua_get_FtkFileInfo_gid(lua_State* L)
268{
269	lua_Number retv;
270	FtkFileInfo* thiz = (FtkFileInfo*)  tolua_tousertype(L, 1, 0);
271	return_val_if_fail(thiz != NULL, 0);
272	retv = (lua_Number)thiz->gid;
273	tolua_pushnumber(L, (lua_Number)retv);
274
275	return 1;
276}
277
278static int tolua_set_FtkFileInfo_gid(lua_State* L)
279{
280	FtkFileInfo* thiz = (FtkFileInfo*)  tolua_tousertype(L, 1, 0);
281	return_val_if_fail(thiz != NULL, 0);
282	thiz->gid = (int) (tolua_tonumber(L, 2, 0));
283
284	return 1;
285}
286
287static int tolua_get_FtkFileInfo_mode(lua_State* L)
288{
289	lua_Number retv;
290	FtkFileInfo* thiz = (FtkFileInfo*)  tolua_tousertype(L, 1, 0);
291	return_val_if_fail(thiz != NULL, 0);
292	retv = (lua_Number)thiz->mode;
293	tolua_pushnumber(L, (lua_Number)retv);
294
295	return 1;
296}
297
298static int tolua_set_FtkFileInfo_mode(lua_State* L)
299{
300	FtkFileInfo* thiz = (FtkFileInfo*)  tolua_tousertype(L, 1, 0);
301	return_val_if_fail(thiz != NULL, 0);
302	thiz->mode = (int) (tolua_tonumber(L, 2, 0));
303
304	return 1;
305}
306
307static int tolua_get_FtkFileInfo_is_dir(lua_State* L)
308{
309	lua_Number retv;
310	FtkFileInfo* thiz = (FtkFileInfo*)  tolua_tousertype(L, 1, 0);
311	return_val_if_fail(thiz != NULL, 0);
312	retv = (lua_Number)thiz->is_dir;
313	tolua_pushnumber(L, (lua_Number)retv);
314
315	return 1;
316}
317
318static int tolua_set_FtkFileInfo_is_dir(lua_State* L)
319{
320	FtkFileInfo* thiz = (FtkFileInfo*)  tolua_tousertype(L, 1, 0);
321	return_val_if_fail(thiz != NULL, 0);
322	thiz->is_dir = (int) (tolua_tonumber(L, 2, 0));
323
324	return 1;
325}
326
327static int tolua_get_FtkFileInfo_size(lua_State* L)
328{
329	lua_Number retv;
330	FtkFileInfo* thiz = (FtkFileInfo*)  tolua_tousertype(L, 1, 0);
331	return_val_if_fail(thiz != NULL, 0);
332	retv = (lua_Number)thiz->size;
333	tolua_pushnumber(L, (lua_Number)retv);
334
335	return 1;
336}
337
338static int tolua_set_FtkFileInfo_size(lua_State* L)
339{
340	FtkFileInfo* thiz = (FtkFileInfo*)  tolua_tousertype(L, 1, 0);
341	return_val_if_fail(thiz != NULL, 0);
342	thiz->size = (int) (tolua_tonumber(L, 2, 0));
343
344	return 1;
345}
346
347static int tolua_get_FtkFileInfo_last_access(lua_State* L)
348{
349	void* retv;
350	FtkFileInfo* thiz = (FtkFileInfo*)  tolua_tousertype(L, 1, 0);
351	return_val_if_fail(thiz != NULL, 0);
352	retv = (void*)&(thiz->last_access);
353	{time_t* copy=malloc(sizeof(time_t)); if(copy != NULL) memcpy(copy, &retv, sizeof(time_t));tolua_pushusertype_and_takeownership(L, (time_t*)copy, "time_t");}
354
355	return 1;
356}
357
358static int tolua_set_FtkFileInfo_last_access(lua_State* L)
359{
360	FtkFileInfo* thiz = (FtkFileInfo*)  tolua_tousertype(L, 1, 0);
361	return_val_if_fail(thiz != NULL, 0);
362	thiz->last_access = (time_t) (*(time_t*)tolua_tousertype(L, 2, 0));
363
364	return 1;
365}
366
367static int tolua_get_FtkFileInfo_last_modify(lua_State* L)
368{
369	void* retv;
370	FtkFileInfo* thiz = (FtkFileInfo*)  tolua_tousertype(L, 1, 0);
371	return_val_if_fail(thiz != NULL, 0);
372	retv = (void*)&(thiz->last_modify);
373	{time_t* copy=malloc(sizeof(time_t)); if(copy != NULL) memcpy(copy, &retv, sizeof(time_t));tolua_pushusertype_and_takeownership(L, (time_t*)copy, "time_t");}
374
375	return 1;
376}
377
378static int tolua_set_FtkFileInfo_last_modify(lua_State* L)
379{
380	FtkFileInfo* thiz = (FtkFileInfo*)  tolua_tousertype(L, 1, 0);
381	return_val_if_fail(thiz != NULL, 0);
382	thiz->last_modify = (time_t) (*(time_t*)tolua_tousertype(L, 2, 0));
383
384	return 1;
385}
386
387static int tolua_get_FtkFileInfo_name(lua_State* L)
388{
389	char* retv;
390	FtkFileInfo* thiz = (FtkFileInfo*)  tolua_tousertype(L, 1, 0);
391	return_val_if_fail(thiz != NULL, 0);
392	retv = (char*)thiz->name;
393	tolua_pushstring(L, (char*)retv);
394
395	return 1;
396}
397
398static int tolua_set_FtkFileInfo_name(lua_State* L)
399{
400	FtkFileInfo* thiz = (FtkFileInfo*)  tolua_tousertype(L, 1, 0);
401	return_val_if_fail(thiz != NULL, 0);
402	strncpy(thiz->name, (char*)tolua_tostring(L, 2, 0), sizeof(thiz->name));
403
404	return 1;
405}
406
407int lua_ftk_list_item_info_create(lua_State* L)
408{
409	FtkListItemInfo* retv = calloc(1, sizeof(FtkListItemInfo));
410	tolua_pushusertype_and_takeownership(L, (void*)retv, "FtkListItemInfo");
411
412	return 1;
413}
414
415static int tolua_get_FtkListItemInfo_text(lua_State* L)
416{
417	char* retv;
418	FtkListItemInfo* thiz = (FtkListItemInfo*)  tolua_tousertype(L, 1, 0);
419	return_val_if_fail(thiz != NULL, 0);
420	retv = (char*)thiz->text;
421	tolua_pushstring(L, (char*)retv);
422
423	return 1;
424}
425
426static int tolua_set_FtkListItemInfo_text(lua_State* L)
427{
428	FtkListItemInfo* thiz = (FtkListItemInfo*)  tolua_tousertype(L, 1, 0);
429	return_val_if_fail(thiz != NULL, 0);
430	thiz->text = (char*) ((char*)tolua_tostring(L, 2, 0));
431
432	return 1;
433}
434
435static int tolua_get_FtkListItemInfo_value(lua_State* L)
436{
437	lua_Number retv;
438	FtkListItemInfo* thiz = (FtkListItemInfo*)  tolua_tousertype(L, 1, 0);
439	return_val_if_fail(thiz != NULL, 0);
440	retv = (lua_Number)thiz->value;
441	tolua_pushnumber(L, (lua_Number)retv);
442
443	return 1;
444}
445
446static int tolua_set_FtkListItemInfo_value(lua_State* L)
447{
448	FtkListItemInfo* thiz = (FtkListItemInfo*)  tolua_tousertype(L, 1, 0);
449	return_val_if_fail(thiz != NULL, 0);
450	thiz->value = (int) (tolua_tonumber(L, 2, 0));
451
452	return 1;
453}
454
455static int tolua_get_FtkListItemInfo_state(lua_State* L)
456{
457	lua_Number retv;
458	FtkListItemInfo* thiz = (FtkListItemInfo*)  tolua_tousertype(L, 1, 0);
459	return_val_if_fail(thiz != NULL, 0);
460	retv = (lua_Number)thiz->state;
461	tolua_pushnumber(L, (lua_Number)retv);
462
463	return 1;
464}
465
466static int tolua_set_FtkListItemInfo_state(lua_State* L)
467{
468	FtkListItemInfo* thiz = (FtkListItemInfo*)  tolua_tousertype(L, 1, 0);
469	return_val_if_fail(thiz != NULL, 0);
470	thiz->state = (int) (tolua_tonumber(L, 2, 0));
471
472	return 1;
473}
474
475static int tolua_get_FtkListItemInfo_type(lua_State* L)
476{
477	lua_Number retv;
478	FtkListItemInfo* thiz = (FtkListItemInfo*)  tolua_tousertype(L, 1, 0);
479	return_val_if_fail(thiz != NULL, 0);
480	retv = (lua_Number)thiz->type;
481	tolua_pushnumber(L, (lua_Number)retv);
482
483	return 1;
484}
485
486static int tolua_set_FtkListItemInfo_type(lua_State* L)
487{
488	FtkListItemInfo* thiz = (FtkListItemInfo*)  tolua_tousertype(L, 1, 0);
489	return_val_if_fail(thiz != NULL, 0);
490	thiz->type = (int) (tolua_tonumber(L, 2, 0));
491
492	return 1;
493}
494
495static int tolua_get_FtkListItemInfo_left_icon(lua_State* L)
496{
497	void* retv;
498	FtkListItemInfo* thiz = (FtkListItemInfo*)  tolua_tousertype(L, 1, 0);
499	return_val_if_fail(thiz != NULL, 0);
500	retv = (void*)thiz->left_icon;
501	tolua_pushusertype(L, (FtkBitmap*)retv, "FtkBitmap");
502
503	return 1;
504}
505
506static int tolua_set_FtkListItemInfo_left_icon(lua_State* L)
507{
508	FtkListItemInfo* thiz = (FtkListItemInfo*)  tolua_tousertype(L, 1, 0);
509	return_val_if_fail(thiz != NULL, 0);
510	thiz->left_icon = (FtkBitmap*) (tolua_tousertype(L, 2, 0));
511
512	return 1;
513}
514
515static int tolua_get_FtkListItemInfo_right_icon(lua_State* L)
516{
517	void* retv;
518	FtkListItemInfo* thiz = (FtkListItemInfo*)  tolua_tousertype(L, 1, 0);
519	return_val_if_fail(thiz != NULL, 0);
520	retv = (void*)thiz->right_icon;
521	tolua_pushusertype(L, (FtkBitmap*)retv, "FtkBitmap");
522
523	return 1;
524}
525
526static int tolua_set_FtkListItemInfo_right_icon(lua_State* L)
527{
528	FtkListItemInfo* thiz = (FtkListItemInfo*)  tolua_tousertype(L, 1, 0);
529	return_val_if_fail(thiz != NULL, 0);
530	thiz->right_icon = (FtkBitmap*) (tolua_tousertype(L, 2, 0));
531
532	return 1;
533}
534
535static int tolua_get_FtkListItemInfo_user_data(lua_State* L)
536{
537	void* retv;
538	FtkListItemInfo* thiz = (FtkListItemInfo*)  tolua_tousertype(L, 1, 0);
539	return_val_if_fail(thiz != NULL, 0);
540	retv = (void*)thiz->user_data;
541	tolua_pushusertype(L, (void*)retv, "void");
542
543	return 1;
544}
545
546static int tolua_set_FtkListItemInfo_user_data(lua_State* L)
547{
548	FtkListItemInfo* thiz = (FtkListItemInfo*)  tolua_tousertype(L, 1, 0);
549	return_val_if_fail(thiz != NULL, 0);
550	thiz->user_data = (void*) (tolua_tousertype(L, 2, 0));
551
552	return 1;
553}
554
555static int tolua_get_FtkListItemInfo_extra_user_data(lua_State* L)
556{
557	void* retv;
558	FtkListItemInfo* thiz = (FtkListItemInfo*)  tolua_tousertype(L, 1, 0);
559	return_val_if_fail(thiz != NULL, 0);
560	retv = (void*)thiz->extra_user_data;
561	tolua_pushusertype(L, (void*)retv, "void");
562
563	return 1;
564}
565
566static int tolua_set_FtkListItemInfo_extra_user_data(lua_State* L)
567{
568	FtkListItemInfo* thiz = (FtkListItemInfo*)  tolua_tousertype(L, 1, 0);
569	return_val_if_fail(thiz != NULL, 0);
570	thiz->extra_user_data = (void*) (tolua_tousertype(L, 2, 0));
571
572	return 1;
573}
574
575int lua_ftk_icon_view_item_create(lua_State* L)
576{
577	FtkIconViewItem* retv = calloc(1, sizeof(FtkIconViewItem));
578	tolua_pushusertype_and_takeownership(L, (void*)retv, "FtkIconViewItem");
579
580	return 1;
581}
582
583static int tolua_get_FtkIconViewItem_text(lua_State* L)
584{
585	char* retv;
586	FtkIconViewItem* thiz = (FtkIconViewItem*)  tolua_tousertype(L, 1, 0);
587	return_val_if_fail(thiz != NULL, 0);
588	retv = (char*)thiz->text;
589	tolua_pushstring(L, (char*)retv);
590
591	return 1;
592}
593
594static int tolua_set_FtkIconViewItem_text(lua_State* L)
595{
596	FtkIconViewItem* thiz = (FtkIconViewItem*)  tolua_tousertype(L, 1, 0);
597	return_val_if_fail(thiz != NULL, 0);
598	thiz->text = (char*) ((char*)tolua_tostring(L, 2, 0));
599
600	return 1;
601}
602
603static int tolua_get_FtkIconViewItem_icon(lua_State* L)
604{
605	void* retv;
606	FtkIconViewItem* thiz = (FtkIconViewItem*)  tolua_tousertype(L, 1, 0);
607	return_val_if_fail(thiz != NULL, 0);
608	retv = (void*)thiz->icon;
609	tolua_pushusertype(L, (FtkBitmap*)retv, "FtkBitmap");
610
611	return 1;
612}
613
614static int tolua_set_FtkIconViewItem_icon(lua_State* L)
615{
616	FtkIconViewItem* thiz = (FtkIconViewItem*)  tolua_tousertype(L, 1, 0);
617	return_val_if_fail(thiz != NULL, 0);
618	thiz->icon = (FtkBitmap*) (tolua_tousertype(L, 2, 0));
619
620	return 1;
621}
622
623static int tolua_get_FtkIconViewItem_user_data(lua_State* L)
624{
625	char* retv;
626	FtkIconViewItem* thiz = (FtkIconViewItem*)  tolua_tousertype(L, 1, 0);
627	return_val_if_fail(thiz != NULL, 0);
628	retv = (char*)thiz->user_data;
629	tolua_pushstring(L, (char*)retv);
630
631	return 1;
632}
633
634static int tolua_set_FtkIconViewItem_user_data(lua_State* L)
635{
636	FtkIconViewItem* thiz = (FtkIconViewItem*)  tolua_tousertype(L, 1, 0);
637	return_val_if_fail(thiz != NULL, 0);
638	thiz->user_data = (char*) ((char*)tolua_tostring(L, 2, 0));
639
640	return 1;
641}
642
643int tolua_ftk_typedef_init(lua_State* L)
644{
645	tolua_open(L);
646	tolua_reg_types(L);
647	tolua_module(L, NULL, 0);
648	tolua_beginmodule(L, NULL);
649	tolua_cclass(L, "FtkPoint", "FtkPoint", "", NULL);
650	tolua_beginmodule(L, "FtkPoint");
651	tolua_function(L, "Create", lua_ftk_point_create);
652	tolua_variable(L, "x",tolua_get_FtkPoint_x, tolua_set_FtkPoint_x);
653	tolua_variable(L, "y",tolua_get_FtkPoint_y, tolua_set_FtkPoint_y);
654	tolua_endmodule(L);
655	tolua_cclass(L, "FtkColor", "FtkColor", "", NULL);
656	tolua_beginmodule(L, "FtkColor");
657	tolua_function(L, "Create", lua_ftk_color_create);
658	tolua_variable(L, "b",tolua_get_FtkColor_b, tolua_set_FtkColor_b);
659	tolua_variable(L, "g",tolua_get_FtkColor_g, tolua_set_FtkColor_g);
660	tolua_variable(L, "r",tolua_get_FtkColor_r, tolua_set_FtkColor_r);
661	tolua_variable(L, "a",tolua_get_FtkColor_a, tolua_set_FtkColor_a);
662	tolua_endmodule(L);
663	tolua_cclass(L, "FtkRect", "FtkRect", "", NULL);
664	tolua_beginmodule(L, "FtkRect");
665	tolua_function(L, "Create", lua_ftk_rect_create);
666	tolua_variable(L, "x",tolua_get_FtkRect_x, tolua_set_FtkRect_x);
667	tolua_variable(L, "y",tolua_get_FtkRect_y, tolua_set_FtkRect_y);
668	tolua_variable(L, "width",tolua_get_FtkRect_width, tolua_set_FtkRect_width);
669	tolua_variable(L, "height",tolua_get_FtkRect_height, tolua_set_FtkRect_height);
670	tolua_endmodule(L);
671	tolua_cclass(L, "FtkFileInfo", "FtkFileInfo", "", NULL);
672	tolua_beginmodule(L, "FtkFileInfo");
673	tolua_function(L, "Create", lua_ftk_file_info_create);
674	tolua_variable(L, "uid",tolua_get_FtkFileInfo_uid, tolua_set_FtkFileInfo_uid);
675	tolua_variable(L, "gid",tolua_get_FtkFileInfo_gid, tolua_set_FtkFileInfo_gid);
676	tolua_variable(L, "mode",tolua_get_FtkFileInfo_mode, tolua_set_FtkFileInfo_mode);
677	tolua_variable(L, "is_dir",tolua_get_FtkFileInfo_is_dir, tolua_set_FtkFileInfo_is_dir);
678	tolua_variable(L, "size",tolua_get_FtkFileInfo_size, tolua_set_FtkFileInfo_size);
679	tolua_variable(L, "last_access",tolua_get_FtkFileInfo_last_access, tolua_set_FtkFileInfo_last_access);
680	tolua_variable(L, "last_modify",tolua_get_FtkFileInfo_last_modify, tolua_set_FtkFileInfo_last_modify);
681	tolua_variable(L, "name",tolua_get_FtkFileInfo_name, tolua_set_FtkFileInfo_name);
682	tolua_endmodule(L);
683	tolua_cclass(L, "FtkListItemInfo", "FtkListItemInfo", "", NULL);
684	tolua_beginmodule(L, "FtkListItemInfo");
685	tolua_function(L, "Create", lua_ftk_list_item_info_create);
686	tolua_variable(L, "text",tolua_get_FtkListItemInfo_text, tolua_set_FtkListItemInfo_text);
687	tolua_variable(L, "value",tolua_get_FtkListItemInfo_value, tolua_set_FtkListItemInfo_value);
688	tolua_variable(L, "state",tolua_get_FtkListItemInfo_state, tolua_set_FtkListItemInfo_state);
689	tolua_variable(L, "type",tolua_get_FtkListItemInfo_type, tolua_set_FtkListItemInfo_type);
690	tolua_variable(L, "left_icon",tolua_get_FtkListItemInfo_left_icon, tolua_set_FtkListItemInfo_left_icon);
691	tolua_variable(L, "right_icon",tolua_get_FtkListItemInfo_right_icon, tolua_set_FtkListItemInfo_right_icon);
692	tolua_variable(L, "user_data",tolua_get_FtkListItemInfo_user_data, tolua_set_FtkListItemInfo_user_data);
693	tolua_variable(L, "extra_user_data",tolua_get_FtkListItemInfo_extra_user_data, tolua_set_FtkListItemInfo_extra_user_data);
694	tolua_endmodule(L);
695	tolua_cclass(L, "FtkIconViewItem", "FtkIconViewItem", "", NULL);
696	tolua_beginmodule(L, "FtkIconViewItem");
697	tolua_function(L, "Create", lua_ftk_icon_view_item_create);
698	tolua_variable(L, "text",tolua_get_FtkIconViewItem_text, tolua_set_FtkIconViewItem_text);
699	tolua_variable(L, "icon",tolua_get_FtkIconViewItem_icon, tolua_set_FtkIconViewItem_icon);
700	tolua_variable(L, "user_data",tolua_get_FtkIconViewItem_user_data, tolua_set_FtkIconViewItem_user_data);
701	tolua_endmodule(L);
702	tolua_constant(L, "FTK_TRUE", FTK_TRUE);
703	tolua_constant(L, "FTK_FALSE", FTK_FALSE);
704	tolua_constant(L, "FTK_LIST_ITEM_NORMAL", FTK_LIST_ITEM_NORMAL);
705	tolua_constant(L, "FTK_LIST_ITEM_RADIO", FTK_LIST_ITEM_RADIO);
706	tolua_constant(L, "FTK_LIST_ITEM_CHECK", FTK_LIST_ITEM_CHECK);
707	tolua_constant(L, "FTK_LIST_ITEM_MORE", FTK_LIST_ITEM_MORE);
708	tolua_constant(L, "FTK_INPUT_NORMAL", FTK_INPUT_NORMAL);
709	tolua_constant(L, "FTK_INPUT_DIGIT", FTK_INPUT_DIGIT);
710	tolua_constant(L, "FTK_INPUT_ALPHA", FTK_INPUT_ALPHA);
711	tolua_constant(L, "FTK_INPUT_URL", FTK_INPUT_URL);
712	tolua_constant(L, "FTK_INPUT_EMAIL", FTK_INPUT_EMAIL);
713	tolua_constant(L, "FTK_INPUT_ALL", FTK_INPUT_ALL);
714	tolua_constant(L, "FTK_FILE_BROWER_APP", FTK_FILE_BROWER_APP);
715	tolua_constant(L, "FTK_FILE_BROWER_SINGLE_CHOOSER", FTK_FILE_BROWER_SINGLE_CHOOSER);
716	tolua_constant(L, "FTK_FILE_BROWER_MULTI_CHOOSER", FTK_FILE_BROWER_MULTI_CHOOSER);
717	tolua_constant(L, "FTK_GC_BG", FTK_GC_BG);
718	tolua_constant(L, "FTK_GC_FG", FTK_GC_FG);
719	tolua_constant(L, "FTK_GC_FONT", FTK_GC_FONT);
720	tolua_constant(L, "FTK_GC_ALPHA", FTK_GC_ALPHA);
721	tolua_constant(L, "FTK_GC_BITMAP", FTK_GC_BITMAP);
722	tolua_constant(L, "FTK_GC_LINE_MASK", FTK_GC_LINE_MASK);
723	tolua_constant(L, "FTK_EVT_NOP", FTK_EVT_NOP);
724	tolua_constant(L, "FTK_EVT_IDLE", FTK_EVT_IDLE);
725	tolua_constant(L, "FTK_EVT_TIMER", FTK_EVT_TIMER);
726	tolua_constant(L, "FTK_EVT_QUIT", FTK_EVT_QUIT);
727	tolua_constant(L, "FTK_EVT_KEY_UP", FTK_EVT_KEY_UP);
728	tolua_constant(L, "FTK_EVT_KEY_DOWN", FTK_EVT_KEY_DOWN);
729	tolua_constant(L, "FTK_EVT_MOUSE_MOVE", FTK_EVT_MOUSE_MOVE);
730	tolua_constant(L, "FTK_EVT_MOUSE_DOWN", FTK_EVT_MOUSE_DOWN);
731	tolua_constant(L, "FTK_EVT_MOUSE_LONG_PRESS", FTK_EVT_MOUSE_LONG_PRESS);
732	tolua_constant(L, "FTK_EVT_KEY_LONG_PRESS", FTK_EVT_KEY_LONG_PRESS);
733	tolua_constant(L, "FTK_EVT_MOUSE_UP", FTK_EVT_MOUSE_UP);
734	tolua_constant(L, "FTK_EVT_HIDE", FTK_EVT_HIDE);
735	tolua_constant(L, "FTK_EVT_SHOW", FTK_EVT_SHOW);
736	tolua_constant(L, "FTK_EVT_MAP", FTK_EVT_MAP);
737	tolua_constant(L, "FTK_EVT_UNMAP", FTK_EVT_UNMAP);
738	tolua_constant(L, "FTK_EVT_UPDATE", FTK_EVT_UPDATE);
739	tolua_constant(L, "FTK_EVT_MOVE", FTK_EVT_MOVE);
740	tolua_constant(L, "FTK_EVT_RESIZE", FTK_EVT_RESIZE);
741	tolua_constant(L, "FTK_EVT_MOVE_RESIZE", FTK_EVT_MOVE_RESIZE);
742	tolua_constant(L, "FTK_EVT_FOCUS_IN", FTK_EVT_FOCUS_IN);
743	tolua_constant(L, "FTK_EVT_FOCUS_OUT", FTK_EVT_FOCUS_OUT);
744	tolua_constant(L, "FTK_EVT_ADD_CHILD", FTK_EVT_ADD_CHILD);
745	tolua_constant(L, "FTK_EVT_IM_COMMIT", FTK_EVT_IM_COMMIT);
746	tolua_constant(L, "FTK_EVT_IM_PREEDIT", FTK_EVT_IM_PREEDIT);
747	tolua_constant(L, "FTK_EVT_IM_ACT_COMMIT", FTK_EVT_IM_ACT_COMMIT);
748	tolua_constant(L, "FTK_EVT_REMOVE_CHILD", FTK_EVT_REMOVE_CHILD);
749	tolua_constant(L, "FTK_EVT_WND_DESTROY", FTK_EVT_WND_DESTROY);
750	tolua_constant(L, "FTK_EVT_RELAYOUT_WND", FTK_EVT_RELAYOUT_WND);
751	tolua_constant(L, "FTK_EVT_ADD_SOURCE", FTK_EVT_ADD_SOURCE);
752	tolua_constant(L, "FTK_EVT_REMOVE_SOURCE", FTK_EVT_REMOVE_SOURCE);
753	tolua_constant(L, "FTK_EVT_THEME_CHANGED", FTK_EVT_THEME_CHANGED);
754	tolua_constant(L, "FTK_EVT_LOCALE_CHANGED", FTK_EVT_LOCALE_CHANGED);
755	tolua_constant(L, "FTK_EVT_DISPLAY_CHANGED", FTK_EVT_DISPLAY_CHANGED);
756	tolua_constant(L, "FTK_EVT_TOP_WND_CHANGED", FTK_EVT_TOP_WND_CHANGED);
757	tolua_constant(L, "FTK_EVT_WND_CONFIG_CHANGED", FTK_EVT_WND_CONFIG_CHANGED);
758	tolua_constant(L, "RET_OK", RET_OK);
759	tolua_constant(L, "RET_FAIL", RET_FAIL);
760	tolua_constant(L, "RET_REMOVE", RET_REMOVE);
761	tolua_constant(L, "RET_CONTINUE", RET_CONTINUE);
762	tolua_constant(L, "RET_FOUND", RET_FOUND);
763	tolua_constant(L, "RET_NEXT", RET_NEXT);
764	tolua_constant(L, "RET_QUIT", RET_QUIT);
765	tolua_constant(L, "RET_IGNORED", RET_IGNORED);
766	tolua_constant(L, "RET_NO_TARGET", RET_NO_TARGET);
767	tolua_constant(L, "RET_OUT_OF_SPACE", RET_OUT_OF_SPACE);
768	tolua_constant(L, "FTK_WIDGET_NONE", FTK_WIDGET_NONE);
769	tolua_constant(L, "FTK_WINDOW", FTK_WINDOW);
770	tolua_constant(L, "FTK_DIALOG", FTK_DIALOG);
771	tolua_constant(L, "FTK_WINDOW_MISC", FTK_WINDOW_MISC);
772	tolua_constant(L, "FTK_STATUS_PANEL", FTK_STATUS_PANEL);
773	tolua_constant(L, "FTK_MENU_PANEL", FTK_MENU_PANEL);
774	tolua_constant(L, "FTK_MENU_ITEM", FTK_MENU_ITEM);
775	tolua_constant(L, "FTK_LABEL", FTK_LABEL);
776	tolua_constant(L, "FTK_BUTTON", FTK_BUTTON);
777	tolua_constant(L, "FTK_IMAGE", FTK_IMAGE);
778	tolua_constant(L, "FTK_ENTRY", FTK_ENTRY);
779	tolua_constant(L, "FTK_PAINTER", FTK_PAINTER);
780	tolua_constant(L, "FTK_WAIT_BOX", FTK_WAIT_BOX);
781	tolua_constant(L, "FTK_STATUS_ITEM", FTK_STATUS_ITEM);
782	tolua_constant(L, "FTK_PROGRESS_BAR", FTK_PROGRESS_BAR);
783	tolua_constant(L, "FTK_GROUP_BOX", FTK_GROUP_BOX);
784	tolua_constant(L, "FTK_RADIO_BUTTON", FTK_RADIO_BUTTON);
785	tolua_constant(L, "FTK_CHECK_BUTTON", FTK_CHECK_BUTTON);
786	tolua_constant(L, "FTK_SCROLL_VBAR", FTK_SCROLL_VBAR);
787	tolua_constant(L, "FTK_SCROLL_HBAR", FTK_SCROLL_HBAR);
788	tolua_constant(L, "FTK_LIST_VIEW", FTK_LIST_VIEW);
789	tolua_constant(L, "FTK_ICON_VIEW", FTK_ICON_VIEW);
790	tolua_constant(L, "FTK_TEXT_VIEW", FTK_TEXT_VIEW);
791	tolua_constant(L, "FTK_COMBO_BOX", FTK_COMBO_BOX);
792	tolua_constant(L, "FTK_WIDGET_TYPE_NR", FTK_WIDGET_TYPE_NR);
793	tolua_constant(L, "FTK_LOG_V", FTK_LOG_V);
794	tolua_constant(L, "FTK_LOG_D", FTK_LOG_D);
795	tolua_constant(L, "FTK_LOG_E", FTK_LOG_E);
796	tolua_constant(L, "FTK_WIDGET_NORMAL", FTK_WIDGET_NORMAL);
797	tolua_constant(L, "FTK_WIDGET_FOCUSED", FTK_WIDGET_FOCUSED);
798	tolua_constant(L, "FTK_WIDGET_ACTIVE", FTK_WIDGET_ACTIVE);
799	tolua_constant(L, "FTK_WIDGET_INSENSITIVE", FTK_WIDGET_INSENSITIVE);
800	tolua_constant(L, "FTK_WIDGET_STATE_NR", FTK_WIDGET_STATE_NR);
801	tolua_constant(L, "FTK_ATTR_TRANSPARENT", FTK_ATTR_TRANSPARENT);
802	tolua_constant(L, "FTK_ATTR_NO_FOCUS", FTK_ATTR_NO_FOCUS);
803	tolua_constant(L, "FTK_ATTR_BG_CENTER", FTK_ATTR_BG_CENTER);
804	tolua_constant(L, "FTK_ATTR_BG_TILE", FTK_ATTR_BG_TILE);
805	tolua_constant(L, "FTK_ATTR_BG_FOUR_CORNER", FTK_ATTR_BG_FOUR_CORNER);
806	tolua_constant(L, "FTK_ATTR_INSENSITIVE", FTK_ATTR_INSENSITIVE);
807	tolua_constant(L, "FTK_ATTR_FOCUSED", FTK_ATTR_FOCUSED);
808	tolua_constant(L, "FTK_ATTR_IGNORE_CLOSE", FTK_ATTR_IGNORE_CLOSE);
809	tolua_constant(L, "FTK_ATTR_QUIT_WHEN_CLOSE", FTK_ATTR_QUIT_WHEN_CLOSE);
810	tolua_constant(L, "FTK_ATTR_AUTO_LAYOUT", FTK_ATTR_AUTO_LAYOUT);
811	tolua_constant(L, "FTK_ATTR_POPUP", FTK_ATTR_POPUP);
812	tolua_constant(L, "FTK_KEY_SPACE", FTK_KEY_SPACE);
813	tolua_constant(L, "FTK_KEY_EXCLAM", FTK_KEY_EXCLAM);
814	tolua_constant(L, "FTK_KEY_QUOTEDBL", FTK_KEY_QUOTEDBL);
815	tolua_constant(L, "FTK_KEY_NUMBERSIGN", FTK_KEY_NUMBERSIGN);
816	tolua_constant(L, "FTK_KEY_DOLLAR", FTK_KEY_DOLLAR);
817	tolua_constant(L, "FTK_KEY_PERCENT", FTK_KEY_PERCENT);
818	tolua_constant(L, "FTK_KEY_AMPERSAND", FTK_KEY_AMPERSAND);
819	tolua_constant(L, "FTK_KEY_APOSTROPHE", FTK_KEY_APOSTROPHE);
820	tolua_constant(L, "FTK_KEY_QUOTERIGHT", FTK_KEY_QUOTERIGHT);
821	tolua_constant(L, "FTK_KEY_PARENLEFT", FTK_KEY_PARENLEFT);
822	tolua_constant(L, "FTK_KEY_PARENRIGHT", FTK_KEY_PARENRIGHT);
823	tolua_constant(L, "FTK_KEY_ASTERISK", FTK_KEY_ASTERISK);
824	tolua_constant(L, "FTK_KEY_PLUS", FTK_KEY_PLUS);
825	tolua_constant(L, "FTK_KEY_COMMA", FTK_KEY_COMMA);
826	tolua_constant(L, "FTK_KEY_MINUS", FTK_KEY_MINUS);
827	tolua_constant(L, "FTK_KEY_PERIOD", FTK_KEY_PERIOD);
828	tolua_constant(L, "FTK_KEY_SLASH", FTK_KEY_SLASH);
829	tolua_constant(L, "FTK_KEY_0", FTK_KEY_0);
830	tolua_constant(L, "FTK_KEY_1", FTK_KEY_1);
831	tolua_constant(L, "FTK_KEY_2", FTK_KEY_2);
832	tolua_constant(L, "FTK_KEY_3", FTK_KEY_3);
833	tolua_constant(L, "FTK_KEY_4", FTK_KEY_4);
834	tolua_constant(L, "FTK_KEY_5", FTK_KEY_5);
835	tolua_constant(L, "FTK_KEY_6", FTK_KEY_6);
836	tolua_constant(L, "FTK_KEY_7", FTK_KEY_7);
837	tolua_constant(L, "FTK_KEY_8", FTK_KEY_8);
838	tolua_constant(L, "FTK_KEY_9", FTK_KEY_9);
839	tolua_constant(L, "FTK_KEY_COLON", FTK_KEY_COLON);
840	tolua_constant(L, "FTK_KEY_SEMICOLON", FTK_KEY_SEMICOLON);
841	tolua_constant(L, "FTK_KEY_LESS", FTK_KEY_LESS);
842	tolua_constant(L, "FTK_KEY_EQUAL", FTK_KEY_EQUAL);
843	tolua_constant(L, "FTK_KEY_GREATER", FTK_KEY_GREATER);
844	tolua_constant(L, "FTK_KEY_QUESTION", FTK_KEY_QUESTION);
845	tolua_constant(L, "FTK_KEY_AT", FTK_KEY_AT);
846	tolua_constant(L, "FTK_KEY_A", FTK_KEY_A);
847	tolua_constant(L, "FTK_KEY_B", FTK_KEY_B);
848	tolua_constant(L, "FTK_KEY_C", FTK_KEY_C);
849	tolua_constant(L, "FTK_KEY_D", FTK_KEY_D);
850	tolua_constant(L, "FTK_KEY_E", FTK_KEY_E);
851	tolua_constant(L, "FTK_KEY_F", FTK_KEY_F);
852	tolua_constant(L, "FTK_KEY_G", FTK_KEY_G);
853	tolua_constant(L, "FTK_KEY_H", FTK_KEY_H);
854	tolua_constant(L, "FTK_KEY_I", FTK_KEY_I);
855	tolua_constant(L, "FTK_KEY_J", FTK_KEY_J);
856	tolua_constant(L, "FTK_KEY_K", FTK_KEY_K);
857	tolua_constant(L, "FTK_KEY_L", FTK_KEY_L);
858	tolua_constant(L, "FTK_KEY_M", FTK_KEY_M);
859	tolua_constant(L, "FTK_KEY_N", FTK_KEY_N);
860	tolua_constant(L, "FTK_KEY_O", FTK_KEY_O);
861	tolua_constant(L, "FTK_KEY_P", FTK_KEY_P);
862	tolua_constant(L, "FTK_KEY_Q", FTK_KEY_Q);
863	tolua_constant(L, "FTK_KEY_R", FTK_KEY_R);
864	tolua_constant(L, "FTK_KEY_S", FTK_KEY_S);
865	tolua_constant(L, "FTK_KEY_T", FTK_KEY_T);
866	tolua_constant(L, "FTK_KEY_U", FTK_KEY_U);
867	tolua_constant(L, "FTK_KEY_V", FTK_KEY_V);
868	tolua_constant(L, "FTK_KEY_W", FTK_KEY_W);
869	tolua_constant(L, "FTK_KEY_X", FTK_KEY_X);
870	tolua_constant(L, "FTK_KEY_Y", FTK_KEY_Y);
871	tolua_constant(L, "FTK_KEY_Z", FTK_KEY_Z);
872	tolua_constant(L, "FTK_KEY_BRACKETLEFT", FTK_KEY_BRACKETLEFT);
873	tolua_constant(L, "FTK_KEY_BACKSLASH", FTK_KEY_BACKSLASH);
874	tolua_constant(L, "FTK_KEY_BRACKETRIGHT", FTK_KEY_BRACKETRIGHT);
875	tolua_constant(L, "FTK_KEY_ASCIICIRCUM", FTK_KEY_ASCIICIRCUM);
876	tolua_constant(L, "FTK_KEY_UNDERSCORE", FTK_KEY_UNDERSCORE);
877	tolua_constant(L, "FTK_KEY_QUOTELEFT", FTK_KEY_QUOTELEFT);
878	tolua_constant(L, "FTK_KEY_GRAVE", FTK_KEY_GRAVE);
879	tolua_constant(L, "FTK_KEY_LEFTBRACE", FTK_KEY_LEFTBRACE);
880	tolua_constant(L, "FTK_KEY_OR", FTK_KEY_OR);
881	tolua_constant(L, "FTK_KEY_RIGHTBRACE", FTK_KEY_RIGHTBRACE);
882	tolua_constant(L, "FTK_KEY_NOT", FTK_KEY_NOT);
883	tolua_constant(L, "FTK_KEY_DOT", FTK_KEY_DOT);
884	tolua_constant(L, "FTK_KEY_HOME", FTK_KEY_HOME);
885	tolua_constant(L, "FTK_KEY_LEFT", FTK_KEY_LEFT);
886	tolua_constant(L, "FTK_KEY_UP", FTK_KEY_UP);
887	tolua_constant(L, "FTK_KEY_RIGHT", FTK_KEY_RIGHT);
888	tolua_constant(L, "FTK_KEY_DOWN", FTK_KEY_DOWN);
889	tolua_constant(L, "FTK_KEY_PRIOR", FTK_KEY_PRIOR);
890	tolua_constant(L, "FTK_KEY_PAGEUP", FTK_KEY_PAGEUP);
891	tolua_constant(L, "FTK_KEY_NEXT", FTK_KEY_NEXT);
892	tolua_constant(L, "FTK_KEY_PAGEDOWN", FTK_KEY_PAGEDOWN);
893	tolua_constant(L, "FTK_KEY_END", FTK_KEY_END);
894	tolua_constant(L, "FTK_KEY_BEGIN", FTK_KEY_BEGIN);
895	tolua_constant(L, "FTK_KEY_INSERT", FTK_KEY_INSERT);
896	tolua_constant(L, "FTK_KEY_ENTER", FTK_KEY_ENTER);
897	tolua_constant(L, "FTK_KEY_TAB", FTK_KEY_TAB);
898	tolua_constant(L, "FTK_KEY_ESC", FTK_KEY_ESC);
899	tolua_constant(L, "FTK_KEY_RIGHTCTRL", FTK_KEY_RIGHTCTRL);
900	tolua_constant(L, "FTK_KEY_LEFTCTRL", FTK_KEY_LEFTCTRL);
901	tolua_constant(L, "FTK_KEY_RIGHTALT", FTK_KEY_RIGHTALT);
902	tolua_constant(L, "FTK_KEY_LEFTALT", FTK_KEY_LEFTALT);
903	tolua_constant(L, "FTK_KEY_RIGHTSHIFT", FTK_KEY_RIGHTSHIFT);
904	tolua_constant(L, "FTK_KEY_LEFTSHIFT", FTK_KEY_LEFTSHIFT);
905	tolua_constant(L, "FTK_KEY_DELETE", FTK_KEY_DELETE);
906	tolua_constant(L, "FTK_KEY_F1", FTK_KEY_F1);
907	tolua_constant(L, "FTK_KEY_F2", FTK_KEY_F2);
908	tolua_constant(L, "FTK_KEY_F3", FTK_KEY_F3);
909	tolua_constant(L, "FTK_KEY_F4", FTK_KEY_F4);
910	tolua_constant(L, "FTK_KEY_F5", FTK_KEY_F5);
911	tolua_constant(L, "FTK_KEY_F6", FTK_KEY_F6);
912	tolua_constant(L, "FTK_KEY_F7", FTK_KEY_F7);
913	tolua_constant(L, "FTK_KEY_F8", FTK_KEY_F8);
914	tolua_constant(L, "FTK_KEY_F9", FTK_KEY_F9);
915	tolua_constant(L, "FTK_KEY_F10", FTK_KEY_F10);
916	tolua_constant(L, "FTK_KEY_CAPSLOCK", FTK_KEY_CAPSLOCK);
917	tolua_constant(L, "FTK_KEY_BACKSPACE", FTK_KEY_BACKSPACE);
918	tolua_constant(L, "FTK_KEY_SEND", FTK_KEY_SEND);
919	tolua_constant(L, "FTK_KEY_REPLY", FTK_KEY_REPLY);
920	tolua_constant(L, "FTK_KEY_SAVE", FTK_KEY_SAVE);
921	tolua_constant(L, "FTK_KEY_BATTERY", FTK_KEY_BATTERY);
922	tolua_constant(L, "FTK_KEY_BLUETOOTH", FTK_KEY_BLUETOOTH);
923	tolua_constant(L, "FTK_KEY_WLAN", FTK_KEY_WLAN);
924	tolua_constant(L, "FTK_KEY_POWER", FTK_KEY_POWER);
925	tolua_constant(L, "FTK_KEY_MENU", FTK_KEY_MENU);
926	tolua_constant(L, "FTK_BG_NORMAL", FTK_BG_NORMAL);
927	tolua_constant(L, "FTK_BG_TILE", FTK_BG_TILE);
928	tolua_constant(L, "FTK_BG_CENTER", FTK_BG_CENTER);
929	tolua_constant(L, "FTK_BG_FOUR_CORNER", FTK_BG_FOUR_CORNER);
930	tolua_endmodule(L);
931
932
933	return 1;
934}