PageRenderTime 323ms CodeModel.GetById 201ms app.highlight 7ms RepoModel.GetById 114ms app.codeStats 0ms

/script_binding/lua/lua_ftk_status_panel.c

http://ftk.googlecode.com/
C | 78 lines | 61 code | 16 blank | 1 comment | 2 complexity | 550ada34d5797a746402ac5099dde457 MD5 | raw file
 1/*This file is generated by luagen.*/
 2#include "lua_ftk_status_panel.h"
 3#include "lua_ftk_callbacks.h"
 4
 5static void tolua_reg_types (lua_State* L)
 6{
 7	tolua_usertype(L, "FtkStatusPanel");
 8}
 9
10static int lua_ftk_status_panel_create(lua_State* L)
11{
12	tolua_Error err = {0};
13	FtkStatusPanel* retv;
14	int size;
15	int param_ok = tolua_isnumber(L, 1, 0, &err);
16
17	return_val_if_fail(param_ok, 0);
18
19	size = tolua_tonumber(L, 1, 0);
20	retv = ftk_status_panel_create(size);
21	tolua_pushusertype(L, (FtkStatusPanel*)retv, "FtkStatusPanel");
22
23	return 1;
24}
25
26static int lua_ftk_status_panel_add(lua_State* L)
27{
28	tolua_Error err = {0};
29	Ret retv;
30	FtkWidget* thiz;
31	FtkWidget* item;
32	int param_ok = tolua_isusertype(L, 1, "FtkWidget", 0, &err) && tolua_isusertype(L, 2, "FtkWidget", 0, &err);
33
34	return_val_if_fail(param_ok, 0);
35
36	thiz = tolua_tousertype(L, 1, 0);
37	item = tolua_tousertype(L, 2, 0);
38	retv = ftk_status_panel_add(thiz, item);
39	tolua_pushnumber(L, (lua_Number)retv);
40
41	return 1;
42}
43
44static int lua_ftk_status_panel_remove(lua_State* L)
45{
46	tolua_Error err = {0};
47	Ret retv;
48	FtkWidget* thiz;
49	FtkWidget* item;
50	int param_ok = tolua_isusertype(L, 1, "FtkWidget", 0, &err) && tolua_isusertype(L, 2, "FtkWidget", 0, &err);
51
52	return_val_if_fail(param_ok, 0);
53
54	thiz = tolua_tousertype(L, 1, 0);
55	item = tolua_tousertype(L, 2, 0);
56	retv = ftk_status_panel_remove(thiz, item);
57	tolua_pushnumber(L, (lua_Number)retv);
58
59	return 1;
60}
61
62int tolua_ftk_status_panel_init(lua_State* L)
63{
64	tolua_open(L);
65	tolua_reg_types(L);
66	tolua_module(L, NULL, 0);
67	tolua_beginmodule(L, NULL);
68	tolua_cclass(L,"FtkStatusPanel", "FtkStatusPanel", "FtkWidget", NULL);
69	tolua_beginmodule(L, "FtkStatusPanel");
70	tolua_function(L, "Create", lua_ftk_status_panel_create);
71	tolua_function(L, "Add", lua_ftk_status_panel_add);
72	tolua_function(L, "Remove", lua_ftk_status_panel_remove);
73	tolua_endmodule(L);
74	tolua_endmodule(L);
75
76
77	return 1;
78}