public protocol BLTerminalInterface : AnyObject

API for talking to BearLibTerminal. See BLTerminal for the concrete implementation. Use BLTerminal.main to get the main instance.

Each docstring briefly explains how it relates to the C API, so you’ll probably want to refer to the original documentation for more information.

By writing your code against this protocol instead of the concrete BLTerminal type, you enable unit testing and possible cross-platform compatibility adapters in the future.

  • waitForExit() Extension method

    Block until the user quits. This isn’t part of the original BearLibTerminal library, but it’s convenient for quick experiments.



    public func waitForExit()