termtab-0.1.0.0: TUI guitar tablature and score editor
Safe HaskellNone
LanguageGHC2021

Termtab.UI

Description

Wires up and runs the Brick application: assembles the App record from the pieces defined elsewhere (Termtab.UI.Keybindings for input, "Termtab.UI.Widgets.*" for rendering, Termtab.UI.NotationGraphics for image blitting), resolves terminal graphics capabilities before Brick takes over the terminal, and tears everything down again on exit.

Synopsis

Documentation

runUI :: Maybe FilePath -> Song -> IO () Source #

Entry point for the interactive editor: detect the terminal's graphics protocol and colors, load the Bravura glyph font if available, run Brick's main loop starting from initAppState, then clean up the glyph font and any live PlaybackEnv on exit. Graphics detection happens before mkVty grabs the terminal because the foreground-color query itself reads stdin, which would otherwise race vty's own input-reading thread.