Changeset 38138 in project


Ignore:
Timestamp:
01/19/20 23:39:36 (5 weeks ago)
Author:
justinmeiners
Message:

formatting fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/termbox

    r38137 r38138  
    1515=== API
    1616
    17 <procedure> (termbox-init)</procedure>
     17<procedure> (termbox-init) -> Integer</procedure>
    1818<procedure> (termbox-shutdown)</procedure>
    1919
    20 Initializes the termbox library.
     20Initializes the termbox library and returns 0 if succeeded.
    2121The init function should be called before any other functions.
    2222Shutdown must be called before exiting, otherwise the terminal
     
    3232
    3333Clears the internal back buffer using default color or the
    34 color/attributes set by termbox-set-clear function.
     34color/attributes set by '''termbox-set-clear''' function.
    3535
    3636<procedure> (termbox-set-clear [fg u16] [bg u16] ) </procedure>
    3737
    38 Specifies the values that will be applied when calling termbox-clear.
     38Specifies the values that will be applied when calling '''termbox-clear'''.
    3939
    4040<procedure> (termbox-present) </procedure>
     
    82821. Esc input mode.
    8383When ESC sequence is in the buffer and it doesn't match any known
    84 ESC sequence => ESC means tb/key/esc.
     84ESC sequence => ESC means '''tb/key/esc'''.
    8585
    86862. Alt input mode.
    8787When ESC sequence is in the buffer and it doesn't match any known
    88 sequence => ESC enables tb/mod/alt modifier for the next keyboard event.
     88sequence => ESC enables '''tb/mod/alt''' modifier for the next keyboard event.
    8989
    90 You can also apply tb/input/mouse via bitwise OR operation to either of the
    91 modes (e.g. tb/input/esc | tb/input/mouse). If none of the main two modes
     90You can also apply '''tb/input/mouse''' via bitwise OR operation to either of the
     91modes (e.g. '''tb/input/esc''' | tb/input/mouse). If none of the main two modes
    9292were set, but the mouse mode was, tb/input/esc mode is used. If for some
    93 reason you've decided to use (tb/input/esc | tb/input/alt) combination, it
    94 will behave as if only tb/input/esc was selected.
     93reason you've decided to use '''(tb/input/esc | tb/input/alt)''' combination, it
     94will behave as if only '''tb/input/esc''' was selected.
    9595 
    9696If 'mode' is tb/input/current, it returns the current input mode.
    97 Default termbox input mode is tb/input/esc.
     97Default termbox input mode is '''tb/input/esc'''.
    9898
    9999<procedure> (termbox-select-output-mode [mode integer]) </procedure>
    100100
    101101Sets the termbox output mode. Termbox has three output options:
    102 1. `tb/output/normal`  => [1..8]
     1021. '''tb/output/normal'''  => [1..8]
    103103This mode provides 8 different colors:
    104104black, red, green, yellow, blue, magenta, cyan, white
    105105
    106 Shortcut: tb/color/black, tb/color/red, ...
    107 Attributes: tb/attrib/bold, tb/attrib/underline, tb/attrib/reverse
     106Shortcut: '''tb/color/black''', '''tb/color/red''', ...
     107Attributes: '''tb/attrib/bold, '''tb/attrib/underline''', '''tb/attrib/reverse'''
    108108
    109109Example usage:
    110110    (tb-change-cell x y #\@ (bitwise-ior tb/color/black tb/attrib/bold) tb/color/red)
    111111 
    112 2. tb/output/256 => [0..256]
     1122. '''tb/output/256''' => [0..256]
    113113In this mode you can leverage the 256 terminal mode:
    114114* 0x00 - 0x07: the 8 colors as in tb/output/normal
     
    121121    (tb-change-cell x  y #\@ #xb8 #xf0)
    122122
    123 3. tb/output/216 => [0..216]
     1233. '''tb/output/216''' => [0..216]
    124124This mode supports the 3rd range of the 256 mode only.
    125125But you don't need to provide an offset.
    126126
    127 4. tb/output/grayscale  => [0..23]
     1274. '''tb/output/grayscale'''  => [0..23]
    128128This mode supports the 4th range of the 256 mode only.
    129129But you dont need to provide an offset.
Note: See TracChangeset for help on using the changeset viewer.