void CGenericTouchInputHandler::OnTimeout() { CSingleLock lock(m_critical); switch (m_gestureState) { case TouchGestureSingleTouch: setGestureState(TouchGestureSingleTouchHold); OnSingleTouchHold(m_pointers[0].down.x, m_pointers[0].down.y); OnLongPress(m_pointers[0].down.x, m_pointers[0].down.y, 1); break; case TouchGestureMultiTouchStart: if (!m_pointers[0].moving && !m_pointers[1].moving) { setGestureState(TouchGestureMultiTouchHold); OnMultiTouchHold(m_pointers[0].down.x, m_pointers[0].down.y); OnLongPress(fabs((m_pointers[0].down.x + m_pointers[1].down.x) / 2), fabs((m_pointers[0].down.y + m_pointers[1].down.y) / 2), 2); } break; default: break; } }
void CTouchInput::OnTimeout() { CSingleLock lock(m_critical); switch (m_gestureState) { case TouchGestureSingleTouch: setGestureState(TouchGestureSingleTouchHold); OnSingleTouchHold(m_pointers[0].down.x, m_pointers[0].down.y); OnSingleLongPress(m_pointers[0].down.x, m_pointers[0].down.y); break; case TouchGestureMultiTouchStart: if (!m_pointers[0].moving && !m_pointers[1].moving) { setGestureState(TouchGestureMultiTouchHold); OnMultiTouchHold(m_pointers[0].down.x, m_pointers[0].down.y); OnDoubleLongPress(m_pointers[0].down.x, m_pointers[0].down.y, m_pointers[1].down.x, m_pointers[1].down.y); } break; default: break; } }