summaryrefslogtreecommitdiff
path: root/src/libsystemd-terminal/term-internal.h
AgeCommit message (Collapse)Author
2015-07-27terminal: drop unfinished codeDavid Herrmann
This drops the libsystemd-terminal and systemd-consoled code for various reasons: * It's been sitting there unfinished for over a year now and won't get finished any time soon. * Since its initial creation, several parts need significant rework: The input handling should be replaced with the now commonly used libinput, the drm accessors should coordinate the handling of mode-object hotplugging (including split connectors) with other DRM users, and the internal library users should be converted to sd-device and friends. * There is still significant kernel work required before sd-console is really useful. This includes, but is not limited to, simpledrm and drmlog. * The authority daemon is needed before all this code can be used for real. And this will definitely take a lot more time to get done as no-one else is currently working on this, but me. * kdbus maintenance has taken up way more time than I thought and it has much higher priority. I don't see me spending much time on the terminal code in the near future. If anyone intends to hack on this, please feel free to contact me. I'll gladly help you out with any issues. Once kdbus and authorityd are finished (whenever that will be..) I'll definitely pick this up again. But until then, lets reduce compile times and maintenance efforts on this code and drop it for now.
2014-12-11treewide: correct spacing near eol in code commentsTorstein Husebø
2014-10-05terminal/screen: add support for alternate screen buffersTom Gundersen
Hook up SM/RM 47/1047-1049 and enable alternate screen buffers for term applications. (David: rebased on top of -git, renamed helpers and added docs)
2014-10-05terminal/screen: save state in separate objectDavid Herrmann
Terminal state can be saved/restored by applications. To simplify our internal handling, put all affected state into a separate object. Especially with alternate screen buffers, this will simplify our code significantly.
2014-10-05terminal: fix TERM_FLAG_* commentDavid Herrmann
7BIT mode is enabled by default. Fix the comment to state this correctly.
2014-10-02terminal: add term.h header for library usersDavid Herrmann
Like all the other parts of libsystemd-terminal, split API of term-internal.h into term.h so we can use it from systemd-consoled.
2014-07-18terminal: add screen-handlingDavid Herrmann
The screen-layer represents the terminal-side (compared to the host-side). It connects term_parser with term_page and implements all the required control sequences. We do not implement all available control sequences. Even though our parser recognizes them, there is no need to handle them. Most of them are legacy or unused. We try to be as compatible to xterm, so if we missed something, we can implement it later. However, all the VT510 / VT440 stuff can safely be skipped (who needs terminal macros? WTF?). The keyboard-handling is still missing. It will be added once systemd-console is available and we pulled in the key-definitions.
2014-07-18terminal: add parser state-machineDavid Herrmann
The term-parser is used to parse any input from TTY-clients. It reads CSI, DCS, OSC and ST control sequences and normal escape sequences. It doesn't do anything with the parsed data besides detecting the sequence and returning it. The caller has to react to them. The parser also comes with its own UTF-8 helpers. The reason for that is that we don't want to assert() or hard-fail on parsing errors. Instead, we treat any invalid UTF-8 sequences as ISO-8859-1. This allows pasting invalid data into a terminal (which cannot be controlled through the TTY, anyway) and we still deal with it in a proper manner. This is _required_ for 8-bit and 7-bit DEC modes (including the g0-g3 mappings), so it's not just an ugly fallback because we can (it's still horribly ugly but at least we have an excuse).
2014-07-18terminal: add page handling for terminalsDavid Herrmann
The page-layer is a one-dimensional array of lines. Combined with the one-dimensional lines, you get a two-dimensional page. However, both implementations, lines and pages only deal with their own dimension. That means, lines don't know anything about other lines, and pages don't know anything about cells. Apart from pages, this also introduces history objects. A history object is a scroll-back buffer. As some pages like alt-buffers don't have histories, we keep them separate. Pages itself forward all cell-related operations to the related line. Only line-related operations are directly handled by the page. This is mostly scrolling and history. To support proper resizing, we also keep a fill-state just like lines do for cells.
2014-07-18terminal: extend RGB attributesDavid Herrmann
There're 3 supported color-modes: term-color-codes, 256-color-code and rgb-color. We now use the term-color as default so zero(attr) will do what you'd expect. Furthermore, we split rgb and 256color so users can forward them properly without requiring an internal RGB converter. Furthermore, a "hidden" field according to VT510rm manual is added.
2014-07-17ui/term: add line/cell/char handling for terminal pagesDavid Herrmann
This commit introduces libsystemd-ui, a systemd-internal helper library that will contain all the UI related functionality. It is going to be used by systemd-welcomed, systemd-consoled, systemd-greeter and systemd-er. Further use-cases may follow. For now, this commit only adds terminal-page handling based on lines only. Follow-up commits will add more functionality.