PageRenderTime 24ms CodeModel.GetById 20ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/script_binding/lua/lua_ftk_app_window.c

http://ftk.googlecode.com/
C | 52 lines | 41 code | 10 blank | 1 comment | 1 complexity | d67a45507e274d0bee75940ff06f9c2a MD5 | raw file
 1/*This file is generated by luagen.*/
 2#include "lua_ftk_app_window.h"
 3#include "lua_ftk_callbacks.h"
 4
 5static void tolua_reg_types (lua_State* L)
 6{
 7	tolua_usertype(L, "FtkAppWindow");
 8}
 9
10static int lua_ftk_app_window_create(lua_State* L)
11{
12	FtkAppWindow* retv;
13	retv = ftk_app_window_create();
14	tolua_pushusertype(L, (FtkAppWindow*)retv, "FtkAppWindow");
15
16	return 1;
17}
18
19static int lua_ftk_app_window_set_on_prepare_options_menu(lua_State* L)
20{
21	tolua_Error err = {0};
22	Ret retv;
23	FtkWidget* thiz;
24	char* on_prepare_options_menu;
25	int param_ok = tolua_isusertype(L, 1, "FtkWidget", 0, &err) && tolua_isstring(L, 2, 0, &err);
26
27	return_val_if_fail(param_ok, 0);
28
29	thiz = tolua_tousertype(L, 1, 0);
30	on_prepare_options_menu = (char*)tolua_tostring(L, 2, 0);
31	retv = ftk_app_window_set_on_prepare_options_menu(thiz, lua_ftk_prepare_options_menu_func, on_prepare_options_menu);
32	tolua_pushnumber(L, (lua_Number)retv);
33
34	return 1;
35}
36
37int tolua_ftk_app_window_init(lua_State* L)
38{
39	tolua_open(L);
40	tolua_reg_types(L);
41	tolua_module(L, NULL, 0);
42	tolua_beginmodule(L, NULL);
43	tolua_cclass(L,"FtkAppWindow", "FtkAppWindow", "FtkWindow", NULL);
44	tolua_beginmodule(L, "FtkAppWindow");
45	tolua_function(L, "Create", lua_ftk_app_window_create);
46	tolua_function(L, "SetOnPrepareOptionsMenu", lua_ftk_app_window_set_on_prepare_options_menu);
47	tolua_endmodule(L);
48	tolua_endmodule(L);
49
50
51	return 1;
52}