summaryrefslogtreecommitdiff
path: root/src/libsystemd-terminal/term-screen.c
AgeCommit message (Collapse)Author
2014-11-30terminal/screen: fix GL/GR double-mappingDavid Herrmann
We must not call screen_map() multiple times for the same input char. Fix the double-mapping for GL/GR maps are correctly applied.
2014-10-16terminal: log unsupported ANSI or DEC mode changesTom Gundersen
2014-10-16terminal: split ANSI from DEC mode changesTom Gundersen
2014-10-05terminal: remove an unused initializationThomas Hindoe Paaboel Andersen
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 restoring of screen flagsTom Gundersen
2014-10-03terminal/screen: adjust screen age only on updateDavid Herrmann
Instead of increasing the screen-age on redraw, we now increase it only on real updates. This is effectively the same, but avoids increased age counters on backbuffer rendering. Therefore, we can now check age counters against fronbuffers safely, while rendering frames in background.
2014-10-03terminal/screen: add color converterDavid Herrmann
Terminals use pseudo color-codes mixed with 8bit and 24bit colors. Provide a color-converter so external renderers only have to deal with ARGB32 colors. This requires a color-palette as input as there's no fixed mapping. We provide a default, but maybe we wanna support external palettes in the future.
2014-10-03terminal/screen: add cursor renderingDavid Herrmann
This is the most simple way to render cursors: flip attr->inverse of the cursor cell. This causes the background and foreground colors of the cursor-cell to be inversed. Now that we render cursors ourselves, make subterm not call into the parent terminal to render cursors.
2014-10-03terminal/screen: mark cursor dirty on enabled/disableDavid Herrmann
If we hide or show the cursor, we change visual attributes and have to mark the underlying cell as dirty. Otherwise, the terminal will not be redrawn.
2014-10-03terminal/screen: add keyboard mappingDavid Herrmann
Implement the feed_keyboard() handling by mapping XKB keys according to DEC-VT behavior. Public information on terminal key-mappings is pretty scarce. We only implement the most basic mapping for now. Further improvements welcome!
2014-10-03terminal: add screen rendererDavid Herrmann
We don't want to expose the term_screen internals for rendering. Therefore, provide an iterator that allows external renderers to draw terminals.
2014-10-03terminal: make utf8 decoder return lengthDavid Herrmann
Lets return the parsed length in term_utf8_decode() instead of a buffer pointer. Store the pointer in the passed argument. This makes it adhere to the systemd coding-style, were we always avoid returning pointers, but store them in output arguments. In this case, the storage is not allocated, so it doesn't fit 100% to this idiom, but still looks much nicer.
2014-10-02terminal: add helpers to retrieve page dimensionsDavid Herrmann
Allow term users to retrieve the page dimensions of a terminal screen. This is needed to properly calculate the grid dimensions when rendering.
2014-08-30Fix a few more typosRuben Kerkhof
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.