C
WORD GridTranslateMsg( void * pObj, GOL_MSG * pMsg );
Overview
This function evaluates the message from a user if the message will affect the object or not. The table below enumerates the translated messages for each event of the touch screen and keyboard inputs.
Translated Message |
Input Source |
Set/Clear State Bit |
Description |
GRID_MSG_TOUCHED |
Touch Screen |
none |
If any touch events occurs and the x,y position falls in the face of the grid. |
GRID_MSG_ITEM_SELECTED |
Keyboard |
EVENT_KEYSCAN |
If event occurs and parameter1 passed matches the object’s ID and parameter 2 passed matches SCAN_SPACE_PRESSED or SCAN_CR_PRESSED. |
GRID_MSG_UP |
Keyboard |
EVENT_KEYSCAN |
If event occurs and parameter1 passed matches the object’s ID and parameter 2 passed matches SCAN_UP_PRESSED. |
GRID_MSG_DOWN |
Keyboard |
EVENT_KEYSCAN |
If event occurs and parameter1 passed matches the object’s ID and parameter 2 passed matches SCAN_DOWN_PRESSED. |
GRID_MSG_LEFT |
Keyboard |
EVENT_KEYSCAN |
If event occurs and parameter1 passed matches the object’s ID and parameter 2 passed matches SCAN_LEFT_PRESSED. |
GRID_MSG_RIGHT |
Keyboard |
EVENT_KEYSCAN |
If event occurs and parameter1 passed matches the object’s ID and parameter 2 passed matches SCAN_RIGHT_PRESSED. |
OBJ_MSG_INVALID |
Any |
Any |
If the message did not affect the object. |
Input Parameters
Input Parameters |
Description |
GOL_MSG * pMsg |
Pointer to the message struct containing the message from the user interface. |
pGrid |
The pointer to the object where the message will be evaluated to check if the message will affect the object. |
Returns
Returns the translated message depending on the received GOL message:
- GRID_MSG_TOUCHED - when the grid object is touched.
- GRID_MSG_ITEM_SELECTED – when key scan SCAN_SPACE_PRESSED or SCAN_CR_PRESSED are detected.
- GRID_MSG_UP – when key scan SCAN_UP_PRESSED is detected.
- GRID_MSG_DOWN – when key scan SCAN_DOWN_PRESSED is detected.
- GRID_MSG_LEFT – when key scan SCAN_LEFT_PRESSED is detected.
- GRID_MSG_RIGHT – when key scan SCAN_RIGHT_PRESSED is detected.
- OBJ_MSG_INVALID – Button is not affected
Preconditions
none
Side Effects
none