Figure 1

if points are buffered, then
  return next buffered touch point
if no touch present, then
  return NULL touch point
if internal touch buffer overflowed, then
  returned unbuffered touch point
while internal touch buffer is not full
  calculate instantaneous touch centroid
  set button-type flag
  if untouch occurs, then
    stop buffering touches
return first touch point