diff --git a/src/command.h b/src/command.h
index 3a7d61d9d6322c2d13eea2bb84dc17eb959bf5c8..e770a1d62aa96124f3443197bb9c31f6e1758f67 100644 (file)
--- a/src/command.h
+++ b/src/command.h
#define COMMAND_H
#include "config.h"
+#include "Compiler.h"
#include <stddef.h>
+#include <stdbool.h>
#ifndef NCMPC_MINI
#include <stdio.h>
CMD_SCREEN_HELP,
CMD_SCREEN_LYRICS,
CMD_SCREEN_OUTPUTS,
+ CMD_SCREEN_CHAT,
CMD_LYRICS_UPDATE,
CMD_EDIT,
CMD_INTERRUPT,
#ifdef ENABLE_KEYDEF_SCREEN
command_definition_t *get_command_definitions(void);
+size_t get_cmds_max_name_width(command_definition_t *cmds);
#endif
-command_t find_key_command(int key, command_definition_t *cmds);
+gcc_pure
+command_t
+find_key_command(int key, const command_definition_t *cmds);
void command_dump_keys(void);
#ifndef NCMPC_MINI
-int check_key_bindings(command_definition_t *cmds, char *buf, size_t size);
-int write_key_bindings(FILE *f, int all);
+/**
+ * @return true on success, false on error
+ */
+bool
+check_key_bindings(command_definition_t *cmds, char *buf, size_t size);
+
+/**
+ * @return true on success, false on error
+ */
+bool
+write_key_bindings(FILE *f, int all);
#endif
+gcc_pure
const char *key2str(int key);
+
+gcc_pure
const char *get_key_description(command_t command);
+
+gcc_pure
const char *get_key_command_name(command_t command);
-const char *get_key_names(command_t command, int all);
+
+gcc_pure
+const char *get_key_names(command_t command, bool all);
+
+gcc_pure
command_t get_key_command(int key);
-command_t get_key_command_from_name(char *name);
-int assign_keys(command_t command, int keys[MAX_COMMAND_KEYS]);
+gcc_pure
+command_t
+get_key_command_from_name(const char *name);
+
+/**
+ * @return true on success, false on error
+ */
+bool
+assign_keys(command_t command, int keys[MAX_COMMAND_KEYS]);
+
+gcc_pure
command_t get_keyboard_command(void);
#endif