/script_binding/lua/lua_ftk_label.c
http://ftk.googlecode.com/ · C · 48 lines · 39 code · 8 blank · 1 comment · 4 complexity · 4f0e7031f638d930fc01792d8037f30d MD5 · raw file
- /*This file is generated by luagen.*/
- #include "lua_ftk_label.h"
- #include "lua_ftk_callbacks.h"
- static void tolua_reg_types (lua_State* L)
- {
- tolua_usertype(L, "FtkLabel");
- }
- static int lua_ftk_label_create(lua_State* L)
- {
- tolua_Error err = {0};
- FtkLabel* retv;
- FtkWidget* parent;
- int x;
- int y;
- int width;
- int height;
- 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);
- return_val_if_fail(param_ok, 0);
- parent = tolua_tousertype(L, 1, 0);
- x = tolua_tonumber(L, 2, 0);
- y = tolua_tonumber(L, 3, 0);
- width = tolua_tonumber(L, 4, 0);
- height = tolua_tonumber(L, 5, 0);
- retv = ftk_label_create(parent, x, y, width, height);
- tolua_pushusertype(L, (FtkLabel*)retv, "FtkLabel");
- return 1;
- }
- int tolua_ftk_label_init(lua_State* L)
- {
- tolua_open(L);
- tolua_reg_types(L);
- tolua_module(L, NULL, 0);
- tolua_beginmodule(L, NULL);
- tolua_cclass(L,"FtkLabel", "FtkLabel", "FtkWidget", NULL);
- tolua_beginmodule(L, "FtkLabel");
- tolua_function(L, "Create", lua_ftk_label_create);
- tolua_endmodule(L);
- tolua_endmodule(L);
- return 1;
- }