registerTouchSendHook
Function Usage
Registers the data sending hook function of the touch engine client.
Restrictions
N/A
Prototype
int registerTouchSendHook(TOUCHSENDHOOK hook)
Parameters
Field Name |
Input/Output |
Field Type |
Description |
|---|---|---|---|
hook |
Input |
TOUCHSENDHOOK |
The engine users need to mount the touch data sending function they have implemented to this hook. public interface TOUCHSENDHOOK { void touchSendData(byte[] data, int length); }
|
Returns
Data type: int
The value can be:
- VMI_SUCCESS: Success
- VMI_TOUCH_CLIENT_SENDHOOK_REGISTER_FAIL: The touch engine client fails to register the function for sending touch data.
Example Call
1 2 3 4 5 6 7 8 9 10 11 12 13 | public class DataPipe implements TOUCHSENDHOOK { void touchSendData(byte[] data, int length) { // Implement the code of the data sending function. ... } } void Test() { int ret = VmiTouch.getInstance().registerTouchSendHook( DataPipe.getInstance()); } |
Parent topic: External APIs of the Touch Engine Client (Java)