Outcurses: Difference between revisions

Line 209: Line 209:
I implemented panelreels as tightly-interwoven UI code in two projects during the early 2010s: [[growlight]] and [[omphalos]]. In both projects, the ncurses code ran to thousand of lines, and rapidly became difficult to maintain (I only resolved [https://github.com/dankamongmen/growlight/issues/23 one bug] in growlight's UI late in 2019). The system did, however, seem both performant and useful, with general applications. I resolved to [https://github.com/dankamongmen/growlight/issues/43 extract] the code from [https://github.com/dankamongmen/omphalos/issues/21 both] projects, unify it, and make it generally available. Both applications were built around a common core, with pluggable UIs defining distinct applications, each registering callbacks defined by their core's interface. Omphalos defined more callbacks than growlight:
I implemented panelreels as tightly-interwoven UI code in two projects during the early 2010s: [[growlight]] and [[omphalos]]. In both projects, the ncurses code ran to thousand of lines, and rapidly became difficult to maintain (I only resolved [https://github.com/dankamongmen/growlight/issues/23 one bug] in growlight's UI late in 2019). The system did, however, seem both performant and useful, with general applications. I resolved to [https://github.com/dankamongmen/growlight/issues/43 extract] the code from [https://github.com/dankamongmen/omphalos/issues/21 both] projects, unify it, and make it generally available. Both applications were built around a common core, with pluggable UIs defining distinct applications, each registering callbacks defined by their core's interface. Omphalos defined more callbacks than growlight:


<tt>omphalos/ui/ncurses.c<tt> 2019-11-06 (0.99.9~pre):
<tt>omphalos/ui/ncurses.c</tt> 2019-11-06 (0.99.9~pre):
<pre>
<pre>
   pctx.iface.packet_read = packet_callback;
   pctx.iface.packet_read = packet_callback;