/** * @file * @section AUTHORS * * Authors: * Eamon Walsh * * @section LICENSE * * This file is in the public domain. */ #ifndef _LINPICKER_INPUT_H_ #define _LINPICKER_INPUT_H_ #include /* The secure attention keys */ #define LINPICK_SWITCH_SAK KEY_TAB #define LINPICK_LABEL_SAK KEY_CAPSLOCK struct mouse_event { int x, y; int dx, dy, dz; }; static inline int clamp_value(int val, int max) { if (val <= 0) return 0; else if (val >= max) return max - 1; else return val; } static inline int scale_value(int val, int max, int scale) { if (val <= 0) return 0; else if (val >= max) return scale; else return (val * scale) / max; } int input_initialize(int argc, char *argv[]); void input_shutdown(void); #endif /* _LINPICKER_INPUT_H_ */