mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-02 01:40:13 -05:00
terminal: add 'charset_designator' enum to make code more self-documenting
This commit also renames the term_set_single_shift_ascii_printer() function to term_single_shift(), since the former is overly verbose and not really even accurate.
This commit is contained in:
parent
3c609771c5
commit
e030a2ca08
3 changed files with 19 additions and 18 deletions
|
|
@ -189,10 +189,11 @@ enum cursor_origin { ORIGIN_ABSOLUTE, ORIGIN_RELATIVE };
|
|||
enum cursor_keys { CURSOR_KEYS_DONTCARE, CURSOR_KEYS_NORMAL, CURSOR_KEYS_APPLICATION };
|
||||
enum keypad_keys { KEYPAD_DONTCARE, KEYPAD_NUMERICAL, KEYPAD_APPLICATION };
|
||||
enum charset { CHARSET_ASCII, CHARSET_GRAPHIC };
|
||||
enum charset_designator { G0, G1, G2, G3 };
|
||||
|
||||
struct charsets {
|
||||
int selected;
|
||||
int saved;
|
||||
enum charset_designator selected;
|
||||
enum charset_designator saved;
|
||||
enum charset set[4]; /* G0-G3 */
|
||||
};
|
||||
|
||||
|
|
@ -606,7 +607,7 @@ bool term_shutdown(struct terminal *term);
|
|||
int term_destroy(struct terminal *term);
|
||||
|
||||
void term_update_ascii_printer(struct terminal *term);
|
||||
void term_set_single_shift_ascii_printer(struct terminal *term, int selected);
|
||||
void term_single_shift(struct terminal *term, enum charset_designator idx);
|
||||
|
||||
void term_reset(struct terminal *term, bool hard);
|
||||
bool term_to_slave(struct terminal *term, const void *data, size_t len);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue