+
+unsigned gesture_points(Gesture gesture)
+{
+ switch(gesture)
+ {
+ case GESTURE_NONE: return 0;
+ case GESTURE_TAP: return 1;
+ case GESTURE_TAP_2: return 2;
+ case GESTURE_TAP_3: return 3;
+ case GESTURE_DRAG: return 1;
+ case GESTURE_DRAG_2: return 2;
+ case GESTURE_DRAG_3: return 3;
+ case GESTURE_PINCH: return 2;
+ case GESTURE_ROTATE: return 2;
+ default: throw invalid_argument("gesture_points");
+ }
+}
+