Permalink
Browse files

Update docs a bit.

  • Loading branch information...
1 parent 7a55fd2 commit 10c0e2e563dbcbcba6dde2b964fdf2eedb57ce4e @nsf committed Mar 26, 2010
Showing with 17 additions and 10 deletions.
  1. +12 −8 NOTES
  2. +5 −2 WHEREWHAT
View
20 NOTES
@@ -10,9 +10,9 @@ KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT
And that's it. If you don't want input problems, stick to these.
-2. Termbox support all major ASCII combinations, but there are some
+2. Termbox supports all major ASCII combinations, but there are some
interesting moments. Particulary there are a lot of key clashes (few
-keys or combos does the same thing). I can list all of these.
+keys or combos does the same thing). I can list all of these:
CTRL+I, TAB (0x09)
CTRL+2, CTRL+TILDE (0x00)
@@ -26,11 +26,11 @@ CTRL+8, BACKSPACE2 (0x7F) [ASCII 'DELETE' key]
Some terminals emit ASCII 'DELETE' as BACKSPACE, and real BACKSPACE
as CTRL+BACKSPACE. The point is, it is possible that some terminals
-do thing in a different ways. I'm not sure right now, should I fix this.
+do things in different ways. I'm not sure right now, should I fix this.
You should keep these things in mind when developing a termbox application.
-3. Termbox supports two input parsing mode.
+3. Termbox supports two input parsing modes:
- TB_INPUT_ESC - It checks known ESC sequences and if there is no match
0x1B (ESC) symbol is TB_KEY_ESC. Alt+<KEY> combinations don't work.
- TB_INPUT_ALT - It checks known ESC sequences and if there is no match
@@ -39,11 +39,15 @@ You should keep these things in mind when developing a termbox application.
You can switch between these two modes using tb_select_input_mode() func.
-4. Termbox supports *only* the UTF-8 encoding on input and on output. Get a
-decent terminal emulator with support! Also it means that it will probably
-work with ASCII keymaps. UTF-8 is backward compatible with ASCII.
+4. Termbox supports *only* the UTF-8 encoding on input and on output. Get a
+decent terminal emulator with unicode support! Also it means that it will
+probably work with ASCII keymaps. UTF-8 is backward compatible with ASCII.
-5. Probably you don't want to port existing applications to this library.
+5. The available color set and attribute set is restricted the same way as key
+set. Even though there are 256-color terminals you will not be able to use
+additional colors.
+
+6. Probably you don't want to port existing applications to this library.
But you might want to develop new applications with it. Despite the fact
that library isn't super portable and super stable like ncurses, it will
do the job. If you complain about different Shift+F1, Ctrl+KEY_LEFT
View
7 WHEREWHAT
@@ -4,17 +4,19 @@ SOURCES
-------
termbox.c / termbox.h - main files of termbox library, you generally only
-need to include termbox.h in you projects.
+need to include termbox.h in your projects.
ringbuffer.c / ringbuffer.h - simple ring buffer, I use it for buffering
input. Because terminals theoretically can work via network (which is
-slow and unpredictable), this feature is 'must have'.
+slow and unpredictable), this feature is a 'must have'.
term.c / term.h - terminal specific database. It resembles terminfo
database, but only for fairly popular terminals.
input.c - this is the input parsing code.
+utf8.c - simple utf8 <-> unicode converting code.
+
SCRIPTS
-------
@@ -28,6 +30,7 @@ different TERM environment variable. *this script is deprecated*
compile.sh - currently I use it to compile everything. Maybe there will
be a Makefile someday.
+*deprecated, use CMakeLists.txt or Makefile instead*
collectkeys.py - this script collects keys and other terminfo capabilities
from terminfo database, it generates code which then is being inserted

0 comments on commit 10c0e2e

Please sign in to comment.