PageRenderTime 42ms CodeModel.GetById 20ms app.highlight 4ms RepoModel.GetById 16ms app.codeStats 0ms

/script_binding/lua/lua_ftk_label.c

http://ftk.googlecode.com/
C | 48 lines | 39 code | 8 blank | 1 comment | 4 complexity | 4f0e7031f638d930fc01792d8037f30d MD5 | raw file
 1/*This file is generated by luagen.*/
 2#include "lua_ftk_label.h"
 3#include "lua_ftk_callbacks.h"
 4
 5static void tolua_reg_types (lua_State* L)
 6{
 7	tolua_usertype(L, "FtkLabel");
 8}
 9
10static int lua_ftk_label_create(lua_State* L)
11{
12	tolua_Error err = {0};
13	FtkLabel* retv;
14	FtkWidget* parent;
15	int x;
16	int y;
17	int width;
18	int height;
19	int param_ok = tolua_isusertype(L, 1, "FtkWidget", 0, &err) && tolua_isnumber(L, 2, 0, &err) && tolua_isnumber(L, 3, 0, &err) && tolua_isnumber(L, 4, 0, &err) && tolua_isnumber(L, 5, 0, &err);
20
21	return_val_if_fail(param_ok, 0);
22
23	parent = tolua_tousertype(L, 1, 0);
24	x = tolua_tonumber(L, 2, 0);
25	y = tolua_tonumber(L, 3, 0);
26	width = tolua_tonumber(L, 4, 0);
27	height = tolua_tonumber(L, 5, 0);
28	retv = ftk_label_create(parent, x, y, width, height);
29	tolua_pushusertype(L, (FtkLabel*)retv, "FtkLabel");
30
31	return 1;
32}
33
34int tolua_ftk_label_init(lua_State* L)
35{
36	tolua_open(L);
37	tolua_reg_types(L);
38	tolua_module(L, NULL, 0);
39	tolua_beginmodule(L, NULL);
40	tolua_cclass(L,"FtkLabel", "FtkLabel", "FtkWidget", NULL);
41	tolua_beginmodule(L, "FtkLabel");
42	tolua_function(L, "Create", lua_ftk_label_create);
43	tolua_endmodule(L);
44	tolua_endmodule(L);
45
46
47	return 1;
48}