PageRenderTime 37ms CodeModel.GetById 32ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/script_binding/lua/lua_ftk_group_box.c

http://ftk.googlecode.com/
C | 67 lines | 54 code | 12 blank | 1 comment | 5 complexity | 360b8e16cdcb547a4def94df1942f966 MD5 | raw file
 1/*This file is generated by luagen.*/
 2#include "lua_ftk_group_box.h"
 3#include "lua_ftk_callbacks.h"
 4
 5static void tolua_reg_types (lua_State* L)
 6{
 7	tolua_usertype(L, "FtkGroupBox");
 8}
 9
10static int lua_ftk_group_box_create(lua_State* L)
11{
12	tolua_Error err = {0};
13	FtkGroupBox* 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_group_box_create(parent, x, y, width, height);
29	tolua_pushusertype(L, (FtkGroupBox*)retv, "FtkGroupBox");
30
31	return 1;
32}
33
34static int lua_ftk_group_box_set_checked(lua_State* L)
35{
36	tolua_Error err = {0};
37	Ret retv;
38	FtkWidget* thiz;
39	FtkWidget* radio;
40	int param_ok = tolua_isusertype(L, 1, "FtkWidget", 0, &err) && tolua_isusertype(L, 2, "FtkWidget", 0, &err);
41
42	return_val_if_fail(param_ok, 0);
43
44	thiz = tolua_tousertype(L, 1, 0);
45	radio = tolua_tousertype(L, 2, 0);
46	retv = ftk_group_box_set_checked(thiz, radio);
47	tolua_pushnumber(L, (lua_Number)retv);
48
49	return 1;
50}
51
52int tolua_ftk_group_box_init(lua_State* L)
53{
54	tolua_open(L);
55	tolua_reg_types(L);
56	tolua_module(L, NULL, 0);
57	tolua_beginmodule(L, NULL);
58	tolua_cclass(L,"FtkGroupBox", "FtkGroupBox", "FtkWidget", NULL);
59	tolua_beginmodule(L, "FtkGroupBox");
60	tolua_function(L, "Create", lua_ftk_group_box_create);
61	tolua_function(L, "SetChecked", lua_ftk_group_box_set_checked);
62	tolua_endmodule(L);
63	tolua_endmodule(L);
64
65
66	return 1;
67}