From 9a4e99b436efefa00277d592ff67798eb491e87a Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Sun, 12 May 2024 22:55:43 +0200 Subject: Improve API docs and configure system There is now a super minimalistic configure script that automatically detects the event system (epoll/kqueue) and generates a config.h and a config.mk. --- src/dged/binding.h | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'src/dged/binding.h') diff --git a/src/dged/binding.h b/src/dged/binding.h index f2a531d..79f8c47 100644 --- a/src/dged/binding.h +++ b/src/dged/binding.h @@ -52,8 +52,31 @@ enum binding_type { .keymap = keymap_ \ } +/** + * Define a key binding. + * + * Used like BINDING((mod), key, "") where + * the key modifier is optional. + */ #define BINDING(...) BINDING_INNER(__VA_ARGS__) + +/** + * Define a prefix (a keybinding for a keymap). + * + * Used like PREFIX((mod), key, ) where + * the key modifier is optional. + */ #define PREFIX(...) PREFIX_INNER(__VA_ARGS__) + +/** + * Define an anonymous binding, i.e. a binding directly to a function. + * + * Note the function that this key binds to cannot usually be + * executed dynamically (with M-x). + * + * Used like ANONYMOUS_BINDING((mod), key, ) where + * the key modifier is optional. + */ #define ANONYMOUS_BINDING(...) ANONYMOUS_BINDING_INNER(__VA_ARGS__) /** @@ -110,7 +133,7 @@ struct keymap keymap_create(const char *name, uint32_t capacity); * * @param keymap The keymap to bind keys in. * @param bindings Bindings to add. - * @param nbindings Number of bindings in @ref bindings. + * @param nbindings Number of bindings in @p bindings. */ void keymap_bind_keys(struct keymap *keymap, struct binding *bindings, uint32_t nbindings); @@ -127,7 +150,7 @@ void keymap_destroy(struct keymap *keymap); * Lookup the binding for a key in a set of keymaps. * * @param keymaps The keymaps to look in. - * @param nkeymaps The number of keymaps in @ref keymaps. + * @param nkeymaps The number of keymaps in @p keymaps. * @param key The keystroke to look up bindings for. * @param commands Available commands for lookup. * @returns A @ref lookup_result with the result of the lookup. -- cgit v1.2.3