示例#1
0
文件: main.c 项目: janet-lang/janetui
static Janet janet_ui_tab_margined(int32_t argc, Janet *argv) {
    janet_arity(argc, 2, 3);
    uiTab *tab = janet_getuitype(argv, 0, &tab_td);
    int32_t page = janet_getinteger(argv, 1);
    if (argc == 3) {
        int margined = janet_getboolean(argv, 2);
        uiTabSetMargined(tab, page, margined);
        return argv[0];
    }
    return janet_wrap_boolean(uiTabMargined(tab, page));
}
示例#2
0
static int l_uiTabMargined( lua_State* L )
{
	uiTab* t = (uiTab*) check_object( L, 1, uiTabSignature );
	lua_pushboolean( L, uiTabMargined( t, luaL_checkinteger( L, 2 ) ) );
	return 0;
}