PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/script_binding/lua/lua_ftk_list_render.c

http://ftk.googlecode.com/
C | 88 lines | 71 code | 16 blank | 1 comment | 8 complexity | 3b21aebbde5718c8e2a7f1def7d7302f MD5 | raw file
 1/*This file is generated by luagen.*/
 2#include "lua_ftk_list_render.h"
 3#include "lua_ftk_callbacks.h"
 4
 5static void tolua_reg_types (lua_State* L)
 6{
 7	tolua_usertype(L, "FtkListRender");
 8}
 9
10static int lua_ftk_list_render_init(lua_State* L)
11{
12	tolua_Error err = {0};
13	Ret retv;
14	FtkListRender* thiz;
15	FtkListModel* model;
16	FtkWidget* list_view;
17	int param_ok = tolua_isusertype(L, 1, "FtkListRender", 0, &err) && tolua_isusertype(L, 2, "FtkListModel", 0, &err) && tolua_isusertype(L, 3, "FtkWidget", 0, &err);
18
19	return_val_if_fail(param_ok, 0);
20
21	thiz = tolua_tousertype(L, 1, 0);
22	model = tolua_tousertype(L, 2, 0);
23	list_view = tolua_tousertype(L, 3, 0);
24	retv = ftk_list_render_init(thiz, model, list_view);
25	tolua_pushnumber(L, (lua_Number)retv);
26
27	return 1;
28}
29
30static int lua_ftk_list_render_paint(lua_State* L)
31{
32	tolua_Error err = {0};
33	Ret retv;
34	FtkListRender* thiz;
35	FtkCanvas* canvas;
36	int pos;
37	int x;
38	int y;
39	int w;
40	int h;
41	int param_ok = tolua_isusertype(L, 1, "FtkListRender", 0, &err) && tolua_isusertype(L, 2, "FtkCanvas", 0, &err) && tolua_isnumber(L, 3, 0, &err) && tolua_isnumber(L, 4, 0, &err) && tolua_isnumber(L, 5, 0, &err) && tolua_isnumber(L, 6, 0, &err) && tolua_isnumber(L, 7, 0, &err);
42
43	return_val_if_fail(param_ok, 0);
44
45	thiz = tolua_tousertype(L, 1, 0);
46	canvas = tolua_tousertype(L, 2, 0);
47	pos = tolua_tonumber(L, 3, 0);
48	x = tolua_tonumber(L, 4, 0);
49	y = tolua_tonumber(L, 5, 0);
50	w = tolua_tonumber(L, 6, 0);
51	h = tolua_tonumber(L, 7, 0);
52	retv = ftk_list_render_paint(thiz, canvas, pos, x, y, w, h);
53	tolua_pushnumber(L, (lua_Number)retv);
54
55	return 1;
56}
57
58static int lua_ftk_list_render_destroy(lua_State* L)
59{
60	tolua_Error err = {0};
61	FtkListRender* thiz;
62	int param_ok = tolua_isusertype(L, 1, "FtkListRender", 0, &err);
63
64	return_val_if_fail(param_ok, 0);
65
66	thiz = tolua_tousertype(L, 1, 0);
67	ftk_list_render_destroy(thiz);
68
69	return 1;
70}
71
72int tolua_ftk_list_render_init(lua_State* L)
73{
74	tolua_open(L);
75	tolua_reg_types(L);
76	tolua_module(L, NULL, 0);
77	tolua_beginmodule(L, NULL);
78	tolua_cclass(L,"FtkListRender", "FtkListRender", "", NULL);
79	tolua_beginmodule(L, "FtkListRender");
80	tolua_function(L, "Init", lua_ftk_list_render_init);
81	tolua_function(L, "Paint", lua_ftk_list_render_paint);
82	tolua_function(L, "Destroy", lua_ftk_list_render_destroy);
83	tolua_endmodule(L);
84	tolua_endmodule(L);
85
86
87	return 1;
88}