AmendHub

Download

jcs

/

subtext

/

main_menu.h

 

(View History)

jcs   *: Add dynamically configured main menu Latest amendment: 281 on 2022-11-11

1 /*
2 * Copyright (c) 2022 joshua stein <jcs@jcs.org>
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17 #ifndef __MAIN_MENU_H__
18 #define __MAIN_MENU_H__
19
20 enum main_menu_action {
21 ACTION_NONE = -1,
22 ACTION_BOARD_SHOW_FIRST,
23 ACTION_BOARD_SHOW_1,
24 ACTION_BOARD_SHOW_2,
25 ACTION_BOARD_SHOW_3,
26 ACTION_BOARD_SHOW_4,
27 ACTION_BOARD_SHOW_5,
28 ACTION_BOARD_SHOW_6,
29 ACTION_BOARD_SHOW_7,
30 ACTION_BOARD_SHOW_8,
31 ACTION_BOARD_SHOW_9,
32 ACTION_BOARD_SHOW_10,
33 ACTION_CHAT,
34 ACTION_FILES_MENU,
35 ACTION_GOODBYE,
36 ACTION_MAIL_COMPOSE,
37 ACTION_MAIL_MENU,
38 ACTION_MOTD,
39 ACTION_PAGE_ANSWER,
40 ACTION_PAGE_SEND,
41 ACTION_PAGE_SEND_OR_ANSWER,
42 ACTION_RECENT_LOGINS,
43 ACTION_SETTINGS_OR_SIGNUP,
44 ACTION_SETTINGS,
45 ACTION_SIGNUP,
46 ACTION_SHOW_MENU,
47 ACTION_SYSOP_MENU,
48 ACTION_WHOS_ONLINE
49 };
50
51 struct main_menu_option {
52 short action;
53 char menu_key;
54 char all_keys[20];
55 char label[200];
56 };
57
58 extern struct main_menu_option *main_menu_options;
59
60 void main_menu_init(void);
61 void main_menu_edit(void);
62 struct main_menu_option * main_menu_parse(char *opts, size_t len);
63
64 #endif