Angband
ui-input.h
Go to the documentation of this file.
1 
19 #ifndef INCLUDED_UI_INPUT_H
20 #define INCLUDED_UI_INPUT_H
21 
22 #include "cmd-core.h"
23 #include "game-event.h"
24 #include "ui-event.h"
25 #include "ui-term.h"
26 
32 struct cmd_info
33 {
34  const char *desc;
37  void (*hook)(void);
39 };
40 
45 {
46  const char *name;
47  struct cmd_info *list;
48  size_t len;
49 };
50 
51 #define SCAN_INSTANT ((u32b) -1)
52 #define SCAN_OFF 0
53 
54 extern struct cmd_info cmd_item[];
55 extern struct cmd_info cmd_action[];
56 extern struct cmd_info cmd_item_manage[];
57 extern struct cmd_info cmd_info[];
58 extern struct cmd_info cmd_util[];
59 extern struct cmd_info cmd_hidden[];
60 extern struct command_list cmds_all[];
61 
62 extern struct keypress *inkey_next;
63 extern u32b inkey_scan;
64 extern bool inkey_flag;
65 extern u16b lazymove_delay;
66 extern bool msg_flag;
67 
68 void flush(game_event_type unused, game_event_data *data, void *user);
69 ui_event inkey_ex(void);
70 void anykey(void);
71 struct keypress inkey(void);
72 ui_event inkey_m(void);
73 void display_message(game_event_type unused, game_event_data *data, void *user);
74 void bell_message(game_event_type unused, game_event_data *data, void *user);
75 void message_flush(game_event_type unused, game_event_data *data, void *user);
76 void clear_from(int row);
77 bool askfor_aux_keypress(char *buf, size_t buflen, size_t *curs, size_t *len,
78  struct keypress keypress, bool firsttime);
79 bool askfor_aux(char *buf, size_t len, bool (*keypress_h)(char *, size_t, size_t *, size_t *, struct keypress, bool));
80 bool get_character_name(char *buf, size_t buflen);
81 char get_char(const char *prompt, const char *options, size_t len,
82  char fallback);
83 bool (*get_file)(const char *suggested_name, char *path, size_t len);
84 bool get_com_ex(const char *prompt, ui_event *command);
85 void pause_line(struct term *term);
86 void textui_input_init(void);
87 ui_event textui_get_command(int *count);
88 bool key_confirm_command(unsigned char c);
89 bool textui_process_key(struct keypress kp, unsigned char *c, int count);
90 
91 #endif /* INCLUDED_UI_INPUT_H */