]> icculus.org git repositories - btb/d2x.git/blob - main/cli.h
clean up names
[btb/d2x.git] / main / cli.h
1 /*
2  *  Code for controlling the console
3  *  Based on an early version of SDL_Console
4  *
5  *  Written By: Garrett Banuk <mongoose@mongeese.org>
6  *  Code Cleanup and heavily extended by: Clemens Wacha <reflex-2000@gmx.net>
7  *  Ported to use native Descent interfaces by: Bradley Bell <btb@icculus.org>
8  *
9  *  This is free, just be sure to give us credit when using it
10  *  in any of your programs.
11  */
12
13 #ifndef _CLI_H_
14 #define _CLI_H_ 1
15
16 // Insert or Overwrite characters?
17 extern int CLI_insert_mode;
18
19 void cli_init(void);
20 /* executes the command typed in at the console (called if you press ENTER)*/
21 void cli_execute();
22 /* Gets called when TAB was pressed */
23 void cli_autocomplete(void);
24 /* draws the commandline the user is typing in to the screen. called by update? */
25 void cli_draw(int y);
26 /* Gets called if you press the LEFT key (move cursor left) */
27 void cli_cursor_left(void);
28 /* Gets called if you press the RIGHT key (move cursor right) */
29 void cli_cursor_right(void);
30 /* Gets called if you press the HOME key (move cursor to the beginning of the line */
31 void cli_cursor_home(void);
32 /* Gets called if you press the END key (move cursor to the end of the line*/
33 void cli_cursor_end(void);
34 /* Called if you press DELETE (deletes character under the cursor) */
35 void cli_cursor_del(void);
36 /* Called if you press BACKSPACE (deletes character left of cursor) */
37 void cli_cursor_backspace(void);
38 /* Called if you type in a character (add the char to the command) */
39 void cli_add_character(char character);
40 /* Called if you press Ctrl-C (deletes the commandline) */
41 void cli_clear(void);
42 /* Called if you press UP key (switches through recent typed in commands */
43 void cli_history_prev(void);
44 /* Called if you press DOWN key (switches through recent typed in commands */
45 void cli_history_next(void);
46
47 #endif /* _CLI_H_ */