|
Welcome to the EyeBot
Version 7 - RPi1
A Controller For Various Hardware IO
|
Defines functions for the key input. More...
Functions | |
| int | KEYInit (void) |
| Open the evdev device file for reading touch events. Load the key configuration file (if found), else use the hardcoded default value. More... | |
| KEYMODE | KEYSetTM (KEYMODE mode) |
| Set mode for key touch map. More... | |
| KEYMODE | KEYGetTM (TOUCH_MAP **ptouch_map) |
| Get current mode and touch map (region map). More... | |
| int | KEYSetRegion (int index, BOX *region) |
| Manually set region data into current touch map. Only used in KEYTM_REGIONS mode. If region is 0x0, resets the touch map (mode becomes KEYTM_UNKNOWN). More... | |
| int | KEYGetRegion (int index, BOX *region) |
| Copy specific region data out from the current touch map. Only used in KEYTM_REGIONS mode. More... | |
| int | KEYNoTouch (TOUCH_EVENT *rawtouch) |
| Validate there's no touch on screen surface. More... | |
| int | KEYGetRAW (TOUCH_EVENT *rawtouch) |
| Gets raw touch info - a non-blocking function. Mainly used for calibration and testing. More... | |
| KEYCODE | KEYDecode (TOUCH_EVENT *rawtouch) |
| Decode raw touch info into a keycode based on the current touch map. Mainly used for testing. More... | |
| int | KEYRelease (void) |
| Close the evdev device file and stop checking any key touch event. More... | |
| int | inside (int x, int y, BOX rect) |
| Check if a point is inside a rectangle. More... | |
| int | KEYIdle (int idle) |
| Enable/disable event checking procedure. More... | |
| KEYCODE | KEYWait (KEYCODE excode) |
| Wait for specific keys only. More... | |
| KEYCODE | KEYGet (void) |
| Wait for a touch event and return keycode (including KEY_INVALID - undefined keycode). More... | |
| COORD_PAIR | KEYGetXY () |
| Wait for a touch event and return the XY-coordinate. More... | |
| int | KEYXY (int *x, int *y) |
| Wait for a touch event and return the XY-coordinate. More... | |
| KEYCODE | KEYRead (void) |
| Read a keycode and returns. Function does not wait, thus includes KEY_TIMEOUT. More... | |
| int | activate_escape (int escape) |
Defines functions for the key input.
| int inside | ( | int | x, |
| int | y, | ||
| BOX | rect | ||
| ) |
Check if a point is inside a rectangle.
| int | x : X-coordinate of the point |
| int | y : Y-coordinate of the point |
| BOX | rect : rectangle structure |
| KEYCODE KEYDecode | ( | TOUCH_EVENT * | rawtouch | ) |
Decode raw touch info into a keycode based on the current touch map. Mainly used for testing.
| TOUCH_EVENT* | rawtouch : pointer to TOUCH_EVENT structure |
| KEYCODE KEYGet | ( | void | ) |
Wait for a touch event and return keycode (including KEY_INVALID - undefined keycode).
| int KEYGetRAW | ( | TOUCH_EVENT * | rawtouch | ) |
Gets raw touch info - a non-blocking function. Mainly used for calibration and testing.
| TOUCH_EVENT* | rawtouch : pointer to TOUCH_EVENT structure |
| int KEYGetRegion | ( | int | index, |
| BOX * | region | ||
| ) |
Copy specific region data out from the current touch map. Only used in KEYTM_REGIONS mode.
| int | index : Index for region |
| BOX* | region : Pointer to a storage for region data |
| KEYMODE KEYGetTM | ( | TOUCH_MAP ** | ptouch_map | ) |
Get current mode and touch map (region map).
| TOUCH_MAP** | ptouch_map : Pointer to a TOUCH_MAP structure |
| COORD_PAIR KEYGetXY | ( | void | ) |
Wait for a touch event and return the XY-coordinate.
| int KEYIdle | ( | int | idle | ) |
Enable/disable event checking procedure.
| int | idle : user request |
Valid values for idle:
| int KEYInit | ( | void | ) |
Open the evdev device file for reading touch events. Load the key configuration file (if found), else use the hardcoded default value.
| int KEYNoTouch | ( | TOUCH_EVENT * | rawtouch | ) |
Validate there's no touch on screen surface.
| TOUCH_EVENT* | rawtouch : pointer to TOUCH_EVENT structure this is optional! only if raw data needed! else, use 0x0! |
| KEYCODE KEYRead | ( | void | ) |
Read a keycode and returns. Function does not wait, thus includes KEY_TIMEOUT.
| int KEYRelease | ( | void | ) |
Close the evdev device file and stop checking any key touch event.
| int KEYSetRegion | ( | int | index, |
| BOX * | region | ||
| ) |
Manually set region data into current touch map. Only used in KEYTM_REGIONS mode. If region is 0x0, resets the touch map (mode becomes KEYTM_UNKNOWN).
| int | index : Index for region |
| BOX* | region : Pointer to a region data |
| KEYMODE KEYSetTM | ( | KEYMODE | mode | ) |
Set mode for key touch map.
| KEYMODE | mode : Requested touch map mode |
| KEYCODE KEYWait | ( | KEYCODE | excode | ) |
Wait for specific keys only.
| KEYCODE | excode : Expected keycode values (bit XORed) |
| int KEYXY | ( | int * | x, |
| int * | y | ||
| ) |
Wait for a touch event and return the XY-coordinate.
| x | a pointer to the horizontal coord |
| y | a pointer to the vertical coord |
1.8.10