aboutsummaryrefslogtreecommitdiff
path: root/termkey-internal.h
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-12-10 00:23:47 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-12-10 00:23:47 +0000
commitef669c134d9352d88ae020803c7ee280083523f8 (patch)
treefe1e5b91fcf94ad0cceffed39c627319cd27568d /termkey-internal.h
parenteee8ddcee317bdd1717734b95ab5e8d0b968619d (diff)
downloadtermo-ef669c134d9352d88ae020803c7ee280083523f8.tar.gz
termo-ef669c134d9352d88ae020803c7ee280083523f8.tar.xz
termo-ef669c134d9352d88ae020803c7ee280083523f8.zip
Complete change of driver internals - peek and return size but don't eat bytes; eat later in getkey()
Diffstat (limited to 'termkey-internal.h')
-rw-r--r--termkey-internal.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/termkey-internal.h b/termkey-internal.h
index 645a7da..dce83a6 100644
--- a/termkey-internal.h
+++ b/termkey-internal.h
@@ -13,7 +13,7 @@ struct termkey_driver
void (*free_driver)(void *info);
void (*start_driver)(termkey_t *tk, void *info);
void (*stop_driver)(termkey_t *tk, void *info);
- termkey_result (*getkey)(termkey_t *tk, void *info, termkey_key *key, int force);
+ termkey_result (*peekkey)(termkey_t *tk, void *info, termkey_key *key, int force, size_t *nbytes);
};
struct keyinfo {
@@ -56,9 +56,8 @@ struct termkey {
// Now some "protected" methods for the driver to call but which we don't
// want exported as real symbols in the library
struct {
- void (*eat_bytes)(termkey_t *tk, size_t count);
void (*emit_codepoint)(termkey_t *tk, long codepoint, termkey_key *key);
- termkey_result (*getkey_simple)(termkey_t *tk, termkey_key *key, int force);
+ termkey_result (*peekkey_simple)(termkey_t *tk, termkey_key *key, int force, size_t *nbytes);
} method;
};