diff options
author | Kalle Wallin <kaw@linux.se> | 2004-04-14 18:57:27 +0000 |
---|---|---|
committer | Kalle Wallin <kaw@linux.se> | 2004-04-14 18:57:27 +0000 |
commit | 67b647313985a8ee32ddd2bc4f90326048273813 (patch) | |
tree | fbaf762eb2b207c2004228ee0154a469e0ea55f7 /command.h | |
parent | 4856b0b4af47f316c497ecaaf740186f23dd11fd (diff) | |
download | mpd-67b647313985a8ee32ddd2bc4f90326048273813.tar.gz mpd-67b647313985a8ee32ddd2bc4f90326048273813.tar.xz mpd-67b647313985a8ee32ddd2bc4f90326048273813.zip |
Added command names (used with key bindings).
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@752 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'command.h')
-rw-r--r-- | command.h | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -1,3 +1,7 @@ +#ifndef COMMAND_H +#define COMMAND_H + +#define MAX_COMMAND_KEYS 3 typedef enum { @@ -40,13 +44,24 @@ typedef enum typedef struct { - int keys[3]; + int keys[MAX_COMMAND_KEYS]; command_t command; + char *name; char *description; } command_definition_t; void command_dump_keys(void); -char *command_get_keys(command_t command); +int check_key_bindings(void); +int write_key_bindings(FILE *f); + +char *get_key_description(command_t command); +char *get_key_command_name(command_t command); +char *get_key_names(command_t command, int all); +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]); command_t get_keyboard_command(void); + +#endif |