diff options
| author | Albert Cervin <albert@acervin.com> | 2022-12-06 12:58:51 +0100 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2022-12-06 12:58:51 +0100 |
| commit | 66d50bd7b04922a91fbe3e4d49c68070ec1a7b14 (patch) | |
| tree | 87600e117f4262555bcc875b09e050536cbee492 /src/binding.h | |
| parent | 78410b18e5d4d117b714eb9f34c689920c32a985 (diff) | |
| download | dged-66d50bd7b04922a91fbe3e4d49c68070ec1a7b14.tar.gz dged-66d50bd7b04922a91fbe3e4d49c68070ec1a7b14.tar.xz dged-66d50bd7b04922a91fbe3e4d49c68070ec1a7b14.zip | |
Add minibuffer
Diffstat (limited to 'src/binding.h')
| -rw-r--r-- | src/binding.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/binding.h b/src/binding.h index 260a463..8a703c3 100644 --- a/src/binding.h +++ b/src/binding.h @@ -32,6 +32,15 @@ struct binding { }; }; +struct lookup_result { + bool found; + uint8_t type; + union { + struct command *command; + struct keymap *keymap; + }; +}; + struct commands; struct keymap keymap_create(const char *name, uint32_t capacity); @@ -39,5 +48,5 @@ void keymap_bind_keys(struct keymap *keymap, struct binding *bindings, uint32_t nbindings); void keymap_destroy(struct keymap *keymap); -struct command *lookup_key(struct keymap *keymaps, uint32_t nkeymaps, - struct key *key, struct commands *commands); +struct lookup_result lookup_key(struct keymap *keymaps, uint32_t nkeymaps, + struct key *key, struct commands *commands); |
