Update copyright year to 2015.
[cboard.git] / src / rcfile.h
blob75d0f576994175326d38525262e186f057b6e5d1
1 /* vim:tw=78:ts=8:sw=4:set ft=c: */
2 /*
3 Copyright (C) 2002-2015 Ben Kibbey <bjk@luxsci.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef RCFILE_H
20 #define RCFILE_H
22 static const struct custom_key_s {
23 int mode;
24 char *name;
25 key_func *func;
26 int r;
27 } config_keys[] = {
28 { MODE_PLAY, "select", do_play_select, 0},
29 { MODE_PLAY, "commit", do_play_commit, 0},
30 { MODE_PLAY, "cancel_selected", do_play_cancel_selected, 0},
31 { MODE_PLAY, "set_clock", do_play_set_clock, 0},
32 // { MODE_PLAY, "switch_turn", do_play_switch_turn, 0},
33 { MODE_PLAY, "undo", do_play_undo, 1},
34 { MODE_PLAY, "go", do_play_go, 0},
35 { MODE_PLAY, "send_command", do_play_send_command, 0},
36 { MODE_PLAY, "toggle_play_eh", do_play_toggle_eh_mode, 0},
37 { MODE_PLAY, "toggle_engine", do_play_toggle_engine, 0},
38 { MODE_PLAY, "toggle_human", do_play_toggle_human, 0},
39 { MODE_PLAY, "help", do_play_help, 0},
40 { MODE_PLAY, "toggle_pause", do_play_toggle_pause, 0},
41 { MODE_PLAY, "history_mode", do_play_history_mode, 0},
42 { MODE_PLAY, "edit_mode", do_play_edit_mode, 0},
43 { MODE_HISTORY, "jump_next", do_history_jump_next, 1},
44 { MODE_HISTORY, "jump_prev", do_history_jump_prev, 1},
45 { MODE_HISTORY, "next", do_history_next, 1},
46 { MODE_HISTORY, "prev", do_history_prev, 1},
47 { MODE_HISTORY, "half_move_toggle", do_history_half_move_toggle, 0},
48 { MODE_HISTORY, "rotate_board", do_history_rotate_board, 1},
49 { MODE_HISTORY, "jump", do_history_jump, 1},
50 { MODE_HISTORY, "find_next", do_history_find_next, 1},
51 { MODE_HISTORY, "find_new", do_history_find_new, 0},
52 { MODE_HISTORY, "find_prev", do_history_find_prev, 1},
53 { MODE_HISTORY, "annotate", do_history_annotate, 0},
54 { MODE_HISTORY, "rav_next", do_history_rav_next, 0},
55 { MODE_HISTORY, "rav_prev", do_history_rav_prev, 0},
56 { MODE_HISTORY, "menu", do_history_menu, 0},
57 { MODE_HISTORY, "toggle", do_history_toggle, 0},
58 { MODE_HISTORY, "help", do_history_help, 0},
59 { MODE_EDIT, "select", do_edit_select, 0},
60 { MODE_EDIT, "commit", do_edit_commit, 0},
61 { MODE_EDIT, "cancel_selected", do_edit_cancel_selected, 0},
62 { MODE_EDIT, "delete", do_edit_delete, 0},
63 { MODE_EDIT, "insert", do_edit_insert, 0},
64 { MODE_EDIT, "toggle_castle", do_edit_toggle_castle, 0},
65 { MODE_EDIT, "enpassant", do_edit_enpassant, 0},
66 { MODE_EDIT, "switch_turn", do_edit_switch_turn, 0},
67 { MODE_EDIT, "help", do_edit_help, 0},
68 { MODE_EDIT, "exit", do_edit_exit, 0},
69 { -1, "tag_edit", do_global_tag_edit, 0},
70 { -1, "tag_view", do_global_tag_view, 0},
71 { -1, "find_new", do_global_find_new, 0},
72 { -1, "find_next", do_global_find_next, 1},
73 { -1, "find_prev", do_global_find_prev, 1},
74 { -1, "new_game", do_global_new_game, 0},
75 { -1, "new_all", do_global_new_all, 0},
76 { -1, "copy_game", do_global_copy_game, 0},
77 { -1, "next_game", do_global_next_game, 1},
78 { -1, "prev_game", do_global_prev_game, 1},
79 { -1, "game_jump", do_global_game_jump, 1},
80 { -1, "toggle_delete", do_global_toggle_delete, 0},
81 { -1, "delete_game", do_global_delete_game, 0},
82 { -1, "resume_game", do_global_resume_game, 0},
83 { -1, "save_game", do_global_save_game, 0},
84 { -1, "about", do_global_about, 0},
85 { -1, "quit", do_global_quit, 0},
86 { -1, "toggle_engine_window", do_global_toggle_engine_window, 0},
87 { -1, "toggle_board_details", do_global_toggle_board_details, 0},
88 { -1, "redraw", do_global_redraw, 0},
89 { -1, "help", do_global_help, 0},
90 { -1, NULL, NULL, 0}
93 void set_config_defaults();
94 void parse_rcfile(const char *filename);
95 void add_key_binding(struct key_s ***, key_func *, wint_t c, char *, int);
96 void set_default_keys();
98 #endif