All posts

undefined

Posted On Oct 8th, 2021

Some update to the module names for better understanding and organization:

  • Shell: It was AppBackend, is the module that hold the pty pair, send commands to ptm and read from ptm.
  • Terminal: It was AppFrontend, is the module that provide display and most of the interaction.
  • Cursor: The cursor in the terminal, new characters coming from the Shell/ptm will be inserted at cursor position.
  • Characters: The module provide some utilities to work with characters, like translate key code to input chars,…
┌────────┐        ┌──────────────────┐
│  ptm   │◀──────▶│  device::Shell   │
└─┬────▲─┘        └──────┬────▲──────┘
  │    │               read   │
┌─▼────┴─┐               │  write
│  pts   │        ┏━━━━━━▼━━━━┻━━━━━━┓
├────────┤        ┃ winit::EventLoop ┃
│ $SHELL │        ┗━━━━━━━━┳━━━━━━━━━┛
└────────┘                 │udpate

                  ┌────────▼─────────┐
                  │terminal::Terminal│
                  └─────┬────────────┘

                  ┌─────▼────┐
                  │  Cursor  │
                  ├──────────┴────┐
                  │ CharacterGrid │
                  └───────────────┘

Howerver, the current implementation not really using any cursor, and the rendered cursor is the fake one.

The terminal now also draw the background of each character of the grid. Although this might need to get refactored
later on if the performance is not great.

The set_data method of the terminal now being changed to be able to handle control characters later on. Next up
will be scrolling and a proper cursor handling.

82f1712