chiark / gitweb /
terminal: add page handling for terminals
authorDavid Herrmann <dh.herrmann@gmail.com>
Fri, 13 Jun 2014 17:00:29 +0000 (19:00 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Fri, 18 Jul 2014 10:53:41 +0000 (12:53 +0200)
commit28622e8f5b28412d97bf2f3a5df49c419be1e2c5
treeb41b43667333ef63d368ff29949e5b7be5f21e65
parent952f4b59592088f15615eb404c828aaac31bfe82
terminal: add page handling for terminals

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.
src/libsystemd-terminal/term-internal.h
src/libsystemd-terminal/term-page.c