1 /* src/client/control.h
3 * Routines for handling control input from the keyboard.
9 #include <stdint.h> /* uint8_t */
13 /* Tries to call by "key" for player actions triggering messages to the server.
14 * The appropriate Command struct's .server_msg will be sent, followed by a " ",
15 * followed by either a string representation of the numerical value of the
16 * Command struct's .arg, or, if .arg == 'i', world.player_inventory_select.
17 * Returns 1 on success, 0 on failure.
19 extern uint8_t player_control(int key);
21 /* Try to call by "key" actions for active window's keybindings/geometry config
22 * view. Return 1 on success, 0 on failure.
24 extern uint8_t wingeom_control(int key);
25 extern uint8_t winkeyb_control(int key);
27 /* Try to call by "key" basic window and game management actions that do not
28 * send a message to the server and do not change individual windows'
29 * keybindings or geometries. Returns 0 on failure, 2 for calling a "quit"
30 * action (to be handled externally) and 1 for calling any other action.
32 extern uint8_t meta_control(int key);