version 1.172, 2009/11/05 10:44:36 |
version 1.173, 2009/11/05 19:29:41 |
|
|
|
|
/* TTY information. */ |
/* TTY information. */ |
struct tty_key { |
struct tty_key { |
|
char ch; |
int key; |
int key; |
char *string; |
|
|
|
RB_ENTRY(tty_key) entry; |
struct tty_key *left; |
|
struct tty_key *right; |
|
|
|
struct tty_key *next; |
}; |
}; |
|
|
struct tty_term { |
struct tty_term { |
|
|
void (*key_callback)(int, struct mouse_event *, void *); |
void (*key_callback)(int, struct mouse_event *, void *); |
void *key_data; |
void *key_data; |
struct event key_timer; |
struct event key_timer; |
|
struct tty_key *key_tree; |
size_t ksize; /* maximum key size */ |
|
RB_HEAD(tty_keys, tty_key) ktree; |
|
}; |
}; |
|
|
/* TTY command context and function pointer. */ |
/* TTY command context and function pointer. */ |
|
|
int tty_term_flag(struct tty_term *, enum tty_code_code); |
int tty_term_flag(struct tty_term *, enum tty_code_code); |
|
|
/* tty-keys.c */ |
/* tty-keys.c */ |
int tty_keys_cmp(struct tty_key *, struct tty_key *); |
|
RB_PROTOTYPE(tty_keys, tty_key, entry, tty_keys_cmp); |
|
void tty_keys_init(struct tty *); |
void tty_keys_init(struct tty *); |
void tty_keys_free(struct tty *); |
void tty_keys_free(struct tty *); |
int tty_keys_next(struct tty *); |
int tty_keys_next(struct tty *); |