combinators combinators.short-circuit hashtables concurrency.flags
sets accessors calendar fry destructors ui.gadgets ui.gadgets.private
ui.gadgets.worlds ui.gadgets.tracks ui.gestures ui.backend ui.render
-strings ;
+strings classes.tuple classes.tuple.parser lexer vocabs.parser parser ;
IN: ui
<PRIVATE
ui-running? [ call( -- ) ] [ '[ init-ui @ ] (with-ui) ] if ;
HOOK: beep ui-backend ( -- )
+
+: parse-main-window ( class -- attributes quot )
+ "{" expect dup all-slots parse-tuple-literal-slots
+ parse-definition ;
+
+: define-main-window ( word attributes quot -- )
+ [
+ '[ [ f _ @ open-window ] with-ui ] (( -- )) define-declared
+ ] [ 2drop current-vocab (>>main) ] 3bi ;
+
+SYNTAX: MAIN-WINDOW:
+ CREATE world-attributes parse-main-window define-main-window ;