Ejemplo n.º 1
0
static int l_uiGroupTitle( lua_State* L )
{
	char* s = uiGroupTitle( (uiGroup*) check_object( L, 1, uiGroupSignature ) );
	lua_pushstring( L, s );
	uiFreeText( s );
	return 1;
}
Ejemplo n.º 2
0
static int groupTitle(lua_State *L)
{
    assert(yalulCheckControl(L, 1, YALUL_GROUP_LIB));
    char *text = uiGroupTitle(CAST_ARG(1, Group));
    lua_pushstring(L, text);
    uiFreeText(text);
    return 1;
}
Ejemplo n.º 3
0
static Janet janet_ui_group_title(int32_t argc, Janet *argv) {
    janet_arity(argc, 1, 2);
    uiGroup *group = janet_getuitype(argv, 0, &group_td);
    if (argc == 2) {
        const uint8_t *title = janet_getstring(argv, 1);
        uiGroupSetTitle(group, (const char *)title);
        return argv[0];
    }
    return janet_cstringv(uiGroupTitle(group));
}