On Tue, Jul 22, 2014 at 3:29 PM, Stephan Beal <[email protected]> wrote:
> On Tue, Jul 22, 2014 at 3:21 PM, Konstantin Khomoutov < > [email protected]> wrote: > >> 1. http://godoc.org/github.com/nsf/termbox-go >> > > And we're halfway to one in s2 (which means, by extension, libfossil): > For completeness: Done! Example script: http://fossil.wanderinghorse.net/repos/cwal/index.cgi/finfo?name=s2/mod_termbox.s2 [stephan@host:~/cvs/fossil/cwal/s2]$ ./s2sh mod_termbox.s2 <interactive session snipped> tb.attr = {"bold": 256, "default": 0, "reverse": 1024, "underline": 512} tb.colors = {"black": 1, "blue": 5, "cyan": 7, "default": 0, "green": 3, "magenta": 6, "red": 2, "white": 8, "yellow": 4} Output mode: 1 modes: GRAYSCALE 4 216 3 256 2 NORMAL 1 CURRENT 0 Input mode: 2 modes: ALT 2 ESC 1 CURRENT 0 Summary of termbox: fairly low-level, but infinitely simpler than. However, to be really useful it needs: a) some higher-level APIs like box/panel management. It only recognizes one window/screen element, and provides no APIs to store the current screen state, so creating panels and whatnot requires getting their z-ordering correct and (potentially) rendering everything from the bottom up. i.e. a lot of the optimizations curses already does. b) a key mapping/dispatching mechanism. This is easier to do from script space than C, though. c) higher-level widgets like string input. That gets complex quickly if you want to support any basic line editing. So there's still lots of higher-level work to do before it can be really useful, but it provides most of the low-level bits UIs need. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

