aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.h
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-06-05 11:21:43 +0000
committerKalle Wallin <kaw@linux.se>2004-06-05 11:21:43 +0000
commitf55a67b3f882641abe5a9b14b045d7ce71964af7 (patch)
tree181c15b1c59df30b2e28058f2648e5e701e57c4f /src/command.h
parent677eb1ad30321d83f6196672ea1798c0e1712870 (diff)
downloadmpd-f55a67b3f882641abe5a9b14b045d7ce71964af7.tar.gz
mpd-f55a67b3f882641abe5a9b14b045d7ce71964af7.tar.xz
mpd-f55a67b3f882641abe5a9b14b045d7ce71964af7.zip
Changed directory layout (for future use of gettext)
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1342 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/command.h')
-rw-r--r--src/command.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/src/command.h b/src/command.h
new file mode 100644
index 000000000..1ce67e894
--- /dev/null
+++ b/src/command.h
@@ -0,0 +1,76 @@
+#ifndef COMMAND_H
+#define COMMAND_H
+
+#define MAX_COMMAND_KEYS 3
+
+typedef enum
+{
+ CMD_NONE = 0,
+ CMD_PLAY,
+ CMD_SELECT,
+ CMD_PAUSE,
+ CMD_STOP,
+ CMD_TRACK_NEXT,
+ CMD_TRACK_PREVIOUS,
+ CMD_SEEK_FORWARD,
+ CMD_SEEK_BACKWARD,
+ CMD_SHUFFLE,
+ CMD_RANDOM,
+ CMD_CLEAR,
+ CMD_DELETE,
+ CMD_REPEAT,
+ CMD_CROSSFADE,
+ CMD_VOLUME_UP,
+ CMD_VOLUME_DOWN,
+ CMD_SAVE_PLAYLIST,
+ CMD_TOGGLE_FIND_WRAP,
+ CMD_TOGGLE_AUTOCENTER,
+ CMD_LIST_PREVIOUS,
+ CMD_LIST_NEXT,
+ CMD_LIST_FIRST,
+ CMD_LIST_LAST,
+ CMD_LIST_NEXT_PAGE,
+ CMD_LIST_PREVIOUS_PAGE,
+ CMD_LIST_FIND,
+ CMD_LIST_FIND_NEXT,
+ CMD_LIST_RFIND,
+ CMD_LIST_RFIND_NEXT,
+ CMD_LIST_MOVE_UP,
+ CMD_LIST_MOVE_DOWN,
+ CMD_SCREEN_UPDATE,
+ CMD_SCREEN_PREVIOUS,
+ CMD_SCREEN_NEXT,
+ CMD_SCREEN_PLAY,
+ CMD_SCREEN_FILE,
+ CMD_SCREEN_SEARCH,
+ CMD_SCREEN_KEYDEF,
+ CMD_SCREEN_HELP,
+ CMD_QUIT
+} command_t;
+
+typedef struct
+{
+ int keys[MAX_COMMAND_KEYS];
+ command_t command;
+ char *name;
+ char *description;
+} command_definition_t;
+
+command_definition_t *get_command_definitions(void);
+command_t find_key_command(int key, command_definition_t *cmds);
+
+void command_dump_keys(void);
+int check_key_bindings(void);
+int write_key_bindings(FILE *f);
+
+char *key2str(int key);
+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