diff options
author | 2011-07-14 15:43:42 +0900 | |
---|---|---|
committer | 2011-07-14 15:47:32 +0900 | |
commit | d24df43eaf1f7a7a9a9fcf31a45f0c2b2e11b698 (patch) | |
tree | 75d21d2ad20d3e5ec69cae7e9680920df471011e /native/src/proximity_info.h | |
parent | f7f2e82e8bbd14c00298d09be987e3c666195f50 (diff) | |
download | latinime-d24df43eaf1f7a7a9a9fcf31a45f0c2b2e11b698.tar.gz latinime-d24df43eaf1f7a7a9a9fcf31a45f0c2b2e11b698.tar.xz latinime-d24df43eaf1f7a7a9a9fcf31a45f0c2b2e11b698.zip |
(Step2)Move functions related to proximity to proximity_info.cpp
Change-Id: Iae0eb2a5cd758bda820fa42b4bc3eb3d2665bf96
Diffstat (limited to 'native/src/proximity_info.h')
-rw-r--r-- | native/src/proximity_info.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/native/src/proximity_info.h b/native/src/proximity_info.h index 0d7c9c56e..435a60151 100644 --- a/native/src/proximity_info.h +++ b/native/src/proximity_info.h @@ -25,6 +25,12 @@ namespace latinime { class ProximityInfo { public: + typedef enum { // Used as a return value for character comparison + SAME_OR_ACCENTED_OR_CAPITALIZED_CHAR, // Same char, possibly with different case or accent + NEAR_PROXIMITY_CHAR, // It is a char located nearby on the keyboard + UNRELATED_CHAR // It is an unrelated char + } ProximityType; + ProximityInfo(const int maxProximityCharsSize, const int keyboardWidth, const int keybaordHeight, const int gridWidth, const int gridHeight, const uint32_t *proximityCharsArray); @@ -32,6 +38,12 @@ public: bool hasSpaceProximity(const int x, const int y) const; void setInputParams(const int* inputCodes, const int inputLength); const int* getProximityCharsAt(const int index) const; + unsigned short getPrimaryCharAt(const int index) const; + bool existsCharInProximityAt(const int index, const int c) const; + bool existsAdjacentProximityChars(const int index) const; + ProximityType getMatchedProximityId( + const int index, const unsigned short c, const int skipPos, + const int excessivePos, const int transposedPos) const; bool sameAsTyped(const unsigned short *word, int length) const; private: int getStartIndexFromCoordinates(const int x, const int y) const; |