PageRenderTime 18ms CodeModel.GetById 13ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/script_binding/lua/lua_ftk_list_model_default.c

http://ftk.googlecode.com/
C | 40 lines | 31 code | 8 blank | 1 comment | 0 complexity | 59bf55bdb05f9c3ba2d44f9d88b0c428 MD5 | raw file
 1/*This file is generated by luagen.*/
 2#include "lua_ftk_list_model_default.h"
 3#include "lua_ftk_callbacks.h"
 4
 5static void tolua_reg_types (lua_State* L)
 6{
 7	tolua_usertype(L, "FtkListModelDefault");
 8}
 9
10static int lua_ftk_list_model_default_create(lua_State* L)
11{
12	tolua_Error err = {0};
13	FtkListModel* retv;
14	int init_nr;
15	int param_ok = tolua_isnumber(L, 1, 0, &err);
16
17	return_val_if_fail(param_ok, 0);
18
19	init_nr = tolua_tonumber(L, 1, 0);
20	retv = ftk_list_model_default_create(init_nr);
21	tolua_pushusertype(L, (FtkListModel*)retv, "FtkListModel");
22
23	return 1;
24}
25
26int tolua_ftk_list_model_default_init(lua_State* L)
27{
28	tolua_open(L);
29	tolua_reg_types(L);
30	tolua_module(L, NULL, 0);
31	tolua_beginmodule(L, NULL);
32	tolua_cclass(L,"FtkListModelDefault", "FtkListModelDefault", "FtkListModel", NULL);
33	tolua_beginmodule(L, "FtkListModelDefault");
34	tolua_function(L, "Create", lua_ftk_list_model_default_create);
35	tolua_endmodule(L);
36	tolua_endmodule(L);
37
38
39	return 1;
40}