diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-10-06 23:27:19 +0100 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-10-06 23:27:19 +0100 |
commit | f5c6ecf9af6a024c1c4a0d486303516a6381ddc7 (patch) | |
tree | 1d96e396a737e68c5136d7a6008b54336482185b /termkey-internal.h | |
parent | d871cb39c6f52b14e9722ea76e978a931b599203 (diff) | |
download | termo-f5c6ecf9af6a024c1c4a0d486303516a6381ddc7.tar.gz termo-f5c6ecf9af6a024c1c4a0d486303516a6381ddc7.tar.xz termo-f5c6ecf9af6a024c1c4a0d486303516a6381ddc7.zip |
Moved CSI-related code out of termkey.c into new driver-csi.c
Diffstat (limited to 'termkey-internal.h')
-rw-r--r-- | termkey-internal.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/termkey-internal.h b/termkey-internal.h new file mode 100644 index 0000000..e9fe1fd --- /dev/null +++ b/termkey-internal.h @@ -0,0 +1,39 @@ +#ifndef GUARD_TERMKEY_INTERNAL_H_ +#define GUARD_TERMKEY_INTERNAL_H_ + +#include "termkey.h" + +#include <stdint.h> +#include <termios.h> + +struct termkey_driver +{ + void *(*new_driver)(void); + void (*free_driver)(void *); +}; + +struct termkey { + int fd; + int flags; + unsigned char *buffer; + size_t buffstart; // First offset in buffer + size_t buffcount; // NUMBER of entires valid in buffer + size_t buffsize; // Total malloc'ed size + + struct termios restore_termios; + char restore_termios_valid; + + int waittime; // msec + + char is_closed; + + int nkeynames; + const char **keynames; + + struct termkey_driver driver; + void *driver_info; +}; + +void *termkeycsi_new_driver(termkey_t *t); + +#endif |