diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2011-08-28 17:50:18 +0100 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2011-08-28 17:50:18 +0100 |
commit | 26384996486963bc2f097f44a82a5c07e0dfe69e (patch) | |
tree | 58c7da5748c3a635ff4cb49e419f3153552e6ca6 /termkey.h.in | |
parent | 713351788373e764fc1c66ae1960b36ea6096b02 (diff) | |
download | termo-26384996486963bc2f097f44a82a5c07e0dfe69e.tar.gz termo-26384996486963bc2f097f44a82a5c07e0dfe69e.tar.xz termo-26384996486963bc2f097f44a82a5c07e0dfe69e.zip |
Move canonicalisation flags into their own bitfield with their own accessor and named constants
Diffstat (limited to 'termkey.h.in')
-rw-r--r-- | termkey.h.in | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/termkey.h.in b/termkey.h.in index 59a4f02..8c58eea 100644 --- a/termkey.h.in +++ b/termkey.h.in @@ -144,11 +144,15 @@ enum { TERMKEY_FLAG_RAW = 1 << 2, // Input is raw bytes, not UTF-8 TERMKEY_FLAG_UTF8 = 1 << 3, // Input is definitely UTF-8 TERMKEY_FLAG_NOTERMIOS = 1 << 4, // Do not make initial termios calls on construction - TERMKEY_FLAG_SPACESYMBOL = 1 << 5, // Space is symbolic rather than Unicode + TERMKEY_FLAG_SPACESYMBOL = 1 << 5, // Sets TERMKEY_CANON_SPACESYMBOL TERMKEY_FLAG_CTRLC = 1 << 6, // Allow Ctrl-C to be read as normal, disabling SIGINT TERMKEY_FLAG_EINTR = 1 << 7 // Return ERROR on signal (EINTR) rather than retry }; +enum { + TERMKEY_CANON_SPACESYMBOL = 1 << 0, // Space is symbolic rather than Unicode +}; + void termkey_check_version(int major, int minor); TermKey *termkey_new(int fd, int flags); @@ -163,6 +167,9 @@ void termkey_set_flags(TermKey *tk, int newflags); int termkey_get_waittime(TermKey *tk); void termkey_set_waittime(TermKey *tk, int msec); +int termkey_get_canonflags(TermKey *tk); +void termkey_set_canonflags(TermKey *tk, int); + void termkey_canonicalise(TermKey *tk, TermKeyKey *key); TermKeyResult termkey_getkey(TermKey *tk, TermKeyKey *key); |