highlighter_gesture_util.h 966 B

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2017 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_HIGHLIGHTER_HIGHLIGHTER_GESTURE_UTIL_H_
  5. #define ASH_HIGHLIGHTER_HIGHLIGHTER_GESTURE_UTIL_H_
  6. #include "ash/ash_export.h"
  7. #include "ui/gfx/geometry/rect_f.h"
  8. namespace fast_ink {
  9. class FastInkPoints;
  10. }
  11. namespace ash {
  12. // Highlighter gesture recognition result type. This enum is used to back
  13. // an UMA histogram and should be treated as append-only.
  14. enum class HighlighterGestureType {
  15. kNotRecognized = 0,
  16. kHorizontalStroke,
  17. kClosedShape,
  18. kGestureCount
  19. };
  20. // Returns the recognized gesture type.
  21. HighlighterGestureType ASH_EXPORT
  22. DetectHighlighterGesture(const gfx::RectF& box,
  23. const gfx::SizeF& pen_tip_size,
  24. const fast_ink::FastInkPoints& points);
  25. } // namespace ash
  26. #endif // ASH_HIGHLIGHTER_HIGHLIGHTER_GESTURE_UTIL_H_