Esempio n. 1
0
static void borderWindowOpen(uiButton *b, void *data)
{
	uiWindow *w;
	uiArea *a;

	if (!borderAHInit) {
		borderAH.Draw = handlerDraw;
		borderAH.MouseEvent = handlerMouseEvent;
		borderAH.MouseCrossed = handlerMouseCrossed;
		borderAH.DragBroken = handlerDragBroken;
		borderAH.KeyEvent = handlerKeyEvent;
		borderAHInit = 1;
	}

	w = uiNewWindow("Border Resize Test", 300, 500, 0);
	uiWindowSetBorderless(w, 1);

	a = uiNewArea(&borderAH);
//	uiWindowSetChild(w, uiControl(a));
{uiBox *b;
b=uiNewHorizontalBox();
uiBoxAppend(b,uiControl(a),1);
uiWindowSetChild(w,uiControl(b));}
//TODO why is this hack needed? GTK+ issue

	uiControlShow(uiControl(w));
}
Esempio n. 2
0
static Janet janet_ui_window_borderless(int32_t argc, Janet *argv) {
    janet_arity(argc, 1, 2);
    uiWindow *window = janet_getuitype(argv, 0, &window_td);
    if (argc == 2) {
        int borders = janet_getboolean(argv, 1);
        uiWindowSetBorderless(window, borders);
        return argv[0];
    }
    return janet_wrap_boolean(uiWindowBorderless(window));
}
Esempio n. 3
0
static void borderless(uiCheckbox *c, void *data)
{
	uiWindow *w = uiWindow(data);

	uiWindowSetBorderless(w, uiCheckboxChecked(c));
}