home · contact · privacy
MAJOR re-write. Split plomrogue into a server and a client. Re-wrote large parts
[plomrogue] / src / client / control.h
1 /* src/client/control.h
2  *
3  * Routines for handling control input from the keyboard.
4  */
5
6 #ifndef CONTROL_H
7 #define CONTROL_H
8
9 #include <stdint.h> /* uint8_t, uint16_t */
10
11
12
13 /* Try to call by "key" player actions triggering messages to the server. Return
14  * 1 on success, 0 on failure.
15  */
16 extern uint8_t player_control(int key);
17
18 /* Try to call by "key" actions for active window's keybindings/geometry config
19  * view. Return 1 on success, 0 on failure.
20  */
21 extern uint8_t wingeom_control(int key);
22 extern uint8_t winkeyb_control(int key);
23
24 /* Try to call by "key" basic window and game management actions that do not
25  * send a message to the server and do not change individual windows'
26  * keybindings or geometries. Returns 0 on failure, 2 for calling a "quit"
27  * action (to be handled externally) and 1 for calling any other action.
28  */
29 extern uint8_t meta_control(int key);
30
31
32
33 #endif