case Native_WM_TOUCH_Event.TOUCH_DOWN:{
// logger.debug("TOUCH_DOWN ==> ID:" + wmTouchEvent.id + " x:" + wmTouchEvent.x + " y:" + wmTouchEvent.y);
InputCursor c = new InputCursor();
long cursorID = c.getId();
MTWin7TouchInputEvt touchEvt = new MTWin7TouchInputEvt(this, wmTouchEvent.x, wmTouchEvent.y, wmTouchEvent.contactSizeX, wmTouchEvent.contactSizeY, MTFingerInputEvt.INPUT_DETECTED, c);
int touchID = wmTouchEvent.id;
ActiveCursorPool.getInstance().putActiveCursor(cursorID, c);
touchToCursorID.put(touchID, cursorID);
this.enqueueInputEvent(touchEvt);
break;
}case Native_WM_TOUCH_Event.TOUCH_MOVE:{
// logger.debug("TOUCH_MOVE ==> ID:" + wmTouchEvent.id + " x:" + wmTouchEvent.x + " y:" + wmTouchEvent.y);
// System.out.println("Contact area X:" + wmTouchEvent.contactSizeX + " Y:" + wmTouchEvent.contactSizeY);
Long cursorID = touchToCursorID.get(wmTouchEvent.id);
if (cursorID != null){
InputCursor c = ActiveCursorPool.getInstance().getActiveCursorByID(cursorID);
if (c != null){
MTWin7TouchInputEvt te = new MTWin7TouchInputEvt(this, wmTouchEvent.x, wmTouchEvent.y, wmTouchEvent.contactSizeX, wmTouchEvent.contactSizeY, MTFingerInputEvt.INPUT_UPDATED, c);
this.enqueueInputEvent(te);
}
}
break;
}case Native_WM_TOUCH_Event.TOUCH_UP:{
// logger.debug("TOUCH_UP ==> ID:" + wmTouchEvent.id + " x:" + wmTouchEvent.x + " y:" + wmTouchEvent.y);
Long cursorID = touchToCursorID.get(wmTouchEvent.id);
if (cursorID != null){
InputCursor c = ActiveCursorPool.getInstance().getActiveCursorByID(cursorID);
if (c != null){
MTWin7TouchInputEvt te = new MTWin7TouchInputEvt(this, wmTouchEvent.x, wmTouchEvent.y, wmTouchEvent.contactSizeX, wmTouchEvent.contactSizeY, MTFingerInputEvt.INPUT_ENDED, c);
this.enqueueInputEvent(te);
}
ActiveCursorPool.getInstance().removeCursor(cursorID);
touchToCursorID.remove(wmTouchEvent.id);
}