24 lines
1002 B
C
24 lines
1002 B
C
#ifndef CONTEXT_H
|
|
#define CONTEXT_H
|
|
#define KEY_DOWN 0402 /* down-arrow key */
|
|
#define KEY_UP 0403 /* up-arrow key */
|
|
#define KEY_LEFT 0404 /* left-arrow key */
|
|
#define KEY_RIGHT 0405 /* right-arrow key */
|
|
#define KEY_HOME 0406 /* home key */
|
|
#define KEY_BACKSPACE 0407 /* backspace key */
|
|
#define KEY_F0 0410 /* Function keys. Space for 64 */
|
|
#define KEY_F(n) (KEY_F0+(n)) /* Value of function key n */
|
|
#define KEY_ESC 0xff1b
|
|
|
|
/*** context
|
|
Actions in timesynk rely on a context system that handles input differently based on the type of action. It does so by setting the current_context pointer to one of the *Context functions declared in this header file. From there, the Interface calls the function with the input as a parameter.
|
|
***/
|
|
void (*current_context)(int key_press); // pointer to current context
|
|
|
|
void globalContext(int key_press);
|
|
void consoleContext(int key_press);
|
|
void walkContext(int key_press);
|
|
void lookContext(int key_press);
|
|
void activateContext(int key_press);
|
|
#endif
|