OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 |
| 5 #ifndef SERVICES_PREDICTION_TOUCH_POSITION_CORRECTION_H_ |
| 6 #define SERVICES_PREDICTION_TOUCH_POSITION_CORRECTION_H_ |
| 7 |
| 8 #include "mojo/services/prediction/public/interfaces/prediction.mojom.h" |
| 9 |
| 10 // NOTE: This class has been translated to C++ and modified from the Android |
| 11 // Open Source Project. Specifically from some functions of the following file: |
| 12 // https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/ |
| 13 // android-5.1.1_r8/java/src/com/android/inputmethod/keyboard/internal/ |
| 14 // TouchPositionCorrection.java |
| 15 |
| 16 namespace prediction { |
| 17 |
| 18 class TouchPositionCorrection { |
| 19 public: |
| 20 TouchPositionCorrection(); |
| 21 ~TouchPositionCorrection(); |
| 22 |
| 23 bool IsValid(); |
| 24 |
| 25 int GetRows(); |
| 26 float GetX(const int row); |
| 27 float GetY(const int row); |
| 28 float GetRadius(const int row); |
| 29 |
| 30 private: |
| 31 static const int TOUCH_POSITION_CORRECTION_RECORD_SIZE; |
| 32 |
| 33 bool enabled; |
| 34 float* xs; |
| 35 float* ys; |
| 36 float* radii; |
| 37 }; // class TouchPositionCorrection |
| 38 |
| 39 } // namespace prediction |
| 40 |
| 41 #endif // SERVICES_PREDICTION_TOUCH_POSITION_CORRECTION_H_ |
OLD | NEW |