static Janet janet_ui_window_fullscreen(int32_t argc, Janet *argv) { janet_arity(argc, 1, 2); uiWindow *window = janet_getuitype(argv, 0, &window_td); if (argc == 2) { int full = janet_getboolean(argv, 1); uiWindowSetFullscreen(window, full); return argv[0]; } return janet_wrap_boolean(uiWindowFullscreen(window)); }
static void updatesize(uiWindow *w) { int xp, yp; uiWindowContentSize(w, &xp, &yp); uiSpinboxSetValue(width, xp); uiSpinboxSetValue(height, yp); // TODO on OS X this is updated AFTER sending the size change, not before uiCheckboxSetChecked(fullscreen, uiWindowFullscreen(w)); }