This commit is contained in:
parent
b72aed920b
commit
ef8fd8851a
|
@ -43,9 +43,9 @@ how they work under the hood.
|
||||||
- Code-points: integer representing a Unicode character. Must be representable
|
- Code-points: integer representing a Unicode character. Must be representable
|
||||||
in 32 bits as utf-8; largest supported value is 0x10000.
|
in 32 bits as utf-8; largest supported value is 0x10000.
|
||||||
|
|
||||||
Mu will let you convert between bytes, code-point-utf8s and code-points using `copy`,
|
Mu will let you convert between `byte`, `code-point-utf8` and `code-point`
|
||||||
and trust that you know what you're doing. Be aware that doing so is only
|
using `copy`, and trust that you know what you're doing. Be aware that doing
|
||||||
correct for English/Latin characters, digits and symbols.
|
so is only correct for English/Latin characters, digits and symbols (ASCII).
|
||||||
|
|
||||||
### Functions
|
### Functions
|
||||||
|
|
||||||
|
@ -120,8 +120,8 @@ signatures.mu for their full type signatures.
|
||||||
- `append-byte-hex`: writes textual representation of lowest byte in hex to
|
- `append-byte-hex`: writes textual representation of lowest byte in hex to
|
||||||
a stream of bytes. Does not write a '0x' prefix.
|
a stream of bytes. Does not write a '0x' prefix.
|
||||||
- `read-byte`: reads a single byte from a stream of bytes.
|
- `read-byte`: reads a single byte from a stream of bytes.
|
||||||
- `read-code-point-utf8`: reads a single unicode code-point-utf8 (up to 4 bytes) from a
|
- `read-code-point-utf8`: reads a single unicode code-point-utf8 (up to 4
|
||||||
stream of bytes.
|
bytes) from a stream of bytes.
|
||||||
|
|
||||||
#### reading/writing hex representations of integers
|
#### reading/writing hex representations of integers
|
||||||
|
|
||||||
|
@ -197,7 +197,8 @@ automatically read and update the cursor position in various ways.
|
||||||
These primitives always silently fail if the desired movement would go out
|
These primitives always silently fail if the desired movement would go out
|
||||||
of screen bounds.
|
of screen bounds.
|
||||||
- `move-cursor-to-left-margin-of-next-line`
|
- `move-cursor-to-left-margin-of-next-line`
|
||||||
- `move-cursor-rightward-and-downward`: move cursor one code-point-utf8 to the right
|
- `move-cursor-rightward-and-downward`: move cursor one code-point-utf8 to the
|
||||||
|
right.
|
||||||
|
|
||||||
- `draw-text-rightward-from-cursor`: truncate at some right margin.
|
- `draw-text-rightward-from-cursor`: truncate at some right margin.
|
||||||
- `draw-text-rightward-from-cursor-over-full-screen`: truncate at right edge
|
- `draw-text-rightward-from-cursor-over-full-screen`: truncate at right edge
|
||||||
|
@ -254,8 +255,9 @@ Assertions for tests:
|
||||||
#### events
|
#### events
|
||||||
|
|
||||||
`read-key` reads a single key from the keyboard and returns it if it exists.
|
`read-key` reads a single key from the keyboard and returns it if it exists.
|
||||||
Returns 0 if no key has been pressed. Currently only support single-byte keys,
|
Returns 0 if no key has been pressed. Currently only supports single-byte
|
||||||
which are identical to their code-point and code-point-utf8 representations.
|
(ASCII) keys, which are identical to their code-point and code-point-utf8
|
||||||
|
representations.
|
||||||
|
|
||||||
`read-line-from-keyboard` reads keys from keyboard, echoes them to screen
|
`read-line-from-keyboard` reads keys from keyboard, echoes them to screen
|
||||||
(with given fg/bg colors) and accumulates them in a stream until it encounters
|
(with given fg/bg colors) and accumulates them in a stream until it encounters
|
||||||
|
|
Loading…
Reference in New Issue