UI initialization and the event loop
Factor handbook » UI framework » Developing UI backends

Next:UI backend window management

An UI backend is required to define a method on the (with-ui) word. This word should contain backend initialization, together with some boilerplate:
IN: shells : ui ... backend-specific initialization ... start-ui ... more backend-specific initialization ... ... start event loop here ... ;

The above word must call the following:
start-ui ( quot -- )

The (with-ui) word must not return until the event loop has stopped and the UI has been shut down.