Ejemplo n.º 1
0
 /**
  * Call this in the "mouse up" handler.  It will take care for
  * resetting this object when the mouse/finger has moved too much.
  */
 void Moved(RasterPoint _location) {
   if (clock.IsDefined() &&
       manhattan_distance(location, _location) > MAX_DISTANCE_PX)
     Reset();
 }
Ejemplo n.º 2
0
/**
 * Acts as if the user had just interacted with XCSoar.
 */
void
ResetUserIdle()
{
    user_idle_clock.Update();
}
Ejemplo n.º 3
0
 /**
  * Reset the object, discard any previous click it may have
  * remembered.
  */
 void Reset() {
   clock.Reset();
 }
Ejemplo n.º 4
0
bool
IsUserIdle(unsigned duration_ms)
{
    return user_idle_clock.Check(duration_ms);
}