Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
TUI is a developer facing API built upon the SHMIF libraries in order to provide a stable interface (SHMIF itself isn't intended to be used directly outside the Arcan project) for creating text-oriented applications while taking advantage of most of the features exposed by SHMIF.
Its purpose is to provide a middle ground between the common high-level UI frameworks (HTML5, GTK, QT, ...) and glyph-based NCurses/Turbo-Vision like "character-stream" APIs.
The idea and status thus far is covered in two blog posts:
The core argument is that the UI frameworks are much too complex, expensive and complicated to use, while the curses- like text user interfaces lack system integration for things like popups, window decorations, interactive IPC (clipboard, drag and drop, ...), error-prone and inefficient due to the weak separation of contents and metadata, legacy ridden due to the reliance on terminal protocols, with poor internationalisation.
One of the more difficult parts of maintaining a monospaced 'cell' view of textual user interfaces is modern text rendering in an international context. If it is not handled, a large part of the world is excluded and we all suffer for it. If it is handled, a very noticeable processing overhead is added.
The compromise that is used in TUI thus far is to default to a simple 'latin like script languages' where you have one character, a custom ID and a shaping break attribute per cell - along with per row reshaping hooks on rendering.
There is currently only a single implementation and renderer for the TUI api, and that is the one in shmif/arcan itself. There are bindings for the Lua language as part of the shmif/ sources in the main arcan repository - and a tool for testing them out in src/tools/ltui.
There are a few key applications that drive the development forward and to help finding rough edges in the API itself. The biggest, and most useful one, at the moment is the built-in terminal emulator (framserver/default/terminal).
Current ones in development are the "hidden" debughooks interface inside shmif, (non-public as of yet) a ltui- based UI driver for neovim, a lldb UI and a CLI shell ("LASH"). The translators in Senseye are also slowly being migrated to use it.
When those key projects are mature enough, the last two pieces - a packing format that is suitable for remote rendering (so that rendering can be pushed out of the client process and into the display server one) will be finalised, along with a standalone build of the Arcan terminal itself - to be used as a linux console replacement (think kmscon) or as a normal "terminal" inside Xorg/OSX/...
With documentation still pending, so far, please refer to
for the C library header,
src/tools/ltui for playing around with the Lua
bindings (with documentation in doc/lua-tui-md), and
for a C based skeleton for the API itself.