#include "kbd.h";
typedef void (*KBDExtTpEventCallback)( void* param, KBDTpEvent event, u16 pressd_id, u16 current_id, int x, int y );
param | Parameters passed to the callback function |
event | Type of generated event |
pressed_id | The event button ID first touched before the event occurred |
current_id | The event button ID touched when the event occurred |
x | The x-coordinate of the stylus when the event occurred |
y | The y-coordinate of the stylus when the event occurred |
None.
Defines the format for the additional touch event callback function called by KBD_Update()
(or KBD_UpdateValue()
) when an additional touch event occurs. The enum KBDTpEvent
defines the following states:
KBD_TP_NONE |
The callback function is not called in this state. |
KBD_DOWN |
The instant the additional event button is touched. For both pressed_id and current_id the ID of the pressed event button is stored. |
KBD_REPEAT |
The state in which the additional event button continues to be touched. If the ID for the pressed event button is stored in both pressed_id and current_id, it indicates the instant the repeat trigger input occurs. On the other hand, two different IDs indicate a state that waits for a repeat trigger input event. |
KBD_UP |
The instant the stylus is removed from the touch panel. This state results only if an additional event button is touched when the touch begins or immediately prior to release. The event button ID at the beginning of the touch is stored in pressed_id, and the event button ID for immediately prior to release is stored in current_id. |
KBD_DRAG |
The additional event button is being dragged. This state results only if an additional event button is touched when the touch begins. The event button ID at the beginning of the touch is stored in pressed_id, that for for the currently touched event button ID in current_id. |
The values that can be set as event button IDs are defined below.
0x0000 - 0x00ff:
Keyboard Buttons0x0100 - 0xfeff:
Additional Touch Event Buttons that can be added by the application0xff00 - 0xffff:
System Reserved IDs
The following ID is assigned to a region with no events.
#define KBD_BUTTON_ID_NONE 0xff00
CONFIDENTIAL