PageRenderTime 166ms CodeModel.GetById 155ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/script_binding/lua/lua_ftk_wait_box.c

http://ftk.googlecode.com/
C | 82 lines | 65 code | 16 blank | 1 comment | 4 complexity | 080b38a0b8fe54c165af80653767d00c MD5 | raw file
 1/*This file is generated by luagen.*/
 2#include "lua_ftk_wait_box.h"
 3#include "lua_ftk_callbacks.h"
 4
 5static void tolua_reg_types (lua_State* L)
 6{
 7	tolua_usertype(L, "FtkWaitBox");
 8}
 9
10static int lua_ftk_wait_box_create(lua_State* L)
11{
12	tolua_Error err = {0};
13	FtkWaitBox* 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_wait_box_create(parent, x, y, width, height);
29	tolua_pushusertype(L, (FtkWaitBox*)retv, "FtkWaitBox");
30
31	return 1;
32}
33
34static int lua_ftk_wait_box_start_waiting(lua_State* L)
35{
36	tolua_Error err = {0};
37	Ret retv;
38	FtkWidget* thiz;
39	int param_ok = tolua_isusertype(L, 1, "FtkWidget", 0, &err);
40
41	return_val_if_fail(param_ok, 0);
42
43	thiz = tolua_tousertype(L, 1, 0);
44	retv = ftk_wait_box_start_waiting(thiz);
45	tolua_pushnumber(L, (lua_Number)retv);
46
47	return 1;
48}
49
50static int lua_ftk_wait_box_stop_waiting(lua_State* L)
51{
52	tolua_Error err = {0};
53	Ret retv;
54	FtkWidget* thiz;
55	int param_ok = tolua_isusertype(L, 1, "FtkWidget", 0, &err);
56
57	return_val_if_fail(param_ok, 0);
58
59	thiz = tolua_tousertype(L, 1, 0);
60	retv = ftk_wait_box_stop_waiting(thiz);
61	tolua_pushnumber(L, (lua_Number)retv);
62
63	return 1;
64}
65
66int tolua_ftk_wait_box_init(lua_State* L)
67{
68	tolua_open(L);
69	tolua_reg_types(L);
70	tolua_module(L, NULL, 0);
71	tolua_beginmodule(L, NULL);
72	tolua_cclass(L,"FtkWaitBox", "FtkWaitBox", "FtkWidget", NULL);
73	tolua_beginmodule(L, "FtkWaitBox");
74	tolua_function(L, "Create", lua_ftk_wait_box_create);
75	tolua_function(L, "StartWaiting", lua_ftk_wait_box_start_waiting);
76	tolua_function(L, "StopWaiting", lua_ftk_wait_box_stop_waiting);
77	tolua_endmodule(L);
78	tolua_endmodule(L);
79
80
81	return 1;
82}