MCPcopy Create free account
hub / github.com/comaps/comaps / DetectLongTap

Method DetectLongTap

libs/drape_frontend/user_event_stream.cpp:1147–1161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1145}
1146
1147void UserEventStream::DetectLongTap(Touch const & touch)
1148{
1149 ASSERT_EQUAL(m_state, STATE_TAP_DETECTION, ());
1150
1151 if (DetectForceTap(touch))
1152 return;
1153
1154 if (m_touchTimer.ElapsedMilliseconds() > kLongTouchMs)
1155 {
1156 TEST_CALL(LONG_TAP_DETECTED);
1157 m_state = STATE_EMPTY;
1158 if (m_listener)
1159 m_listener->OnTap(m2::PointD(touch.m_location), true /* isLongTap */);
1160 }
1161}
1162
1163bool UserEventStream::DetectDoubleTap(Touch const & touch)
1164{

Callers

nothing calls this directly

Calls 2

ElapsedMillisecondsMethod · 0.80
OnTapMethod · 0.45

Tested by

no test coverage detected