aboutsummaryrefslogtreecommitdiff
path: root/examples/dte/bind.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/dte/bind.h')
-rw-r--r--examples/dte/bind.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/dte/bind.h b/examples/dte/bind.h
new file mode 100644
index 0000000..22d89bd
--- /dev/null
+++ b/examples/dte/bind.h
@@ -0,0 +1,20 @@
1#ifndef BIND_H
2#define BIND_H
3
4#include <stdbool.h>
5#include "command/cache.h"
6#include "editor.h"
7#include "terminal/key.h"
8#include "util/intmap.h"
9#include "util/macros.h"
10#include "util/string.h"
11
12void add_binding(IntMap *bindings, KeyCode key, CachedCommand *cc) NONNULL_ARGS;
13void remove_binding(IntMap *bindings, KeyCode key) NONNULL_ARGS;
14const CachedCommand *lookup_binding(const IntMap *bindings, KeyCode key) NONNULL_ARGS;
15bool handle_binding(EditorState *e, InputMode mode, KeyCode key) NONNULL_ARGS WARN_UNUSED_RESULT;
16void free_bindings(IntMap *bindings) NONNULL_ARGS;
17bool dump_bindings(const IntMap *bindings, const char *flag, String *buf) NONNULL_ARGS WARN_UNUSED_RESULT;
18
19#endif
20