aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/proximity_info.h
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/proximity_info.h')
-rw-r--r--native/src/proximity_info.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/native/src/proximity_info.h b/native/src/proximity_info.h
index 3190e73ef..b1e8236d3 100644
--- a/native/src/proximity_info.h
+++ b/native/src/proximity_info.h
@@ -37,7 +37,8 @@ public:
const int keybaordHeight, const int gridWidth, const int gridHeight,
const uint32_t *proximityCharsArray, const int keyCount, const int32_t *keyXCoordinates,
const int32_t *keyYCoordinates, const int32_t *keyWidths, const int32_t *keyHeights,
- const int32_t *keyCharCodes, int themeId);
+ const int32_t *keyCharCodes, const float *sweetSpotCenterXs,
+ const float *sweetSpotCenterYs, const float *sweetSpotRadii);
~ProximityInfo();
bool hasSpaceProximity(const int x, const int y) const;
void setInputParams(const int* inputCodes, const int inputLength);
@@ -55,11 +56,10 @@ public:
private:
// The max number of the keys in one keyboard layout
static const int MAX_KEY_COUNT_IN_A_KEYBOARD = 64;
- // The upper limit of the char code in TOUCH_POSITION_CORRECTION_GROUP
- static const int MAX_GROUPED_CHAR_CODE = 127;
+ // The upper limit of the char code in mCodeToKeyIndex
+ static const int MAX_CHAR_CODE = 127;
int getStartIndexFromCoordinates(const int x, const int y) const;
- void initializeCodeToGroup();
void initializeCodeToKeyIndex();
const int MAX_PROXIMITY_CHARS_SIZE;
const int KEYBOARD_WIDTH;
@@ -69,7 +69,6 @@ private:
const int CELL_WIDTH;
const int CELL_HEIGHT;
const int KEY_COUNT;
- const int THEME_ID;
const int *mInputCodes;
uint32_t *mProximityCharsArray;
int32_t mKeyXCoordinates[MAX_KEY_COUNT_IN_A_KEYBOARD];
@@ -77,10 +76,12 @@ private:
int32_t mKeyWidths[MAX_KEY_COUNT_IN_A_KEYBOARD];
int32_t mKeyHeights[MAX_KEY_COUNT_IN_A_KEYBOARD];
int32_t mKeyCharCodes[MAX_KEY_COUNT_IN_A_KEYBOARD];
+ float mSweetSpotCenterXs[MAX_KEY_COUNT_IN_A_KEYBOARD];
+ float mSweetSpotCenterYs[MAX_KEY_COUNT_IN_A_KEYBOARD];
+ float mSweetSpotRadii[MAX_KEY_COUNT_IN_A_KEYBOARD];
int mInputLength;
unsigned short mPrimaryInputWord[MAX_WORD_LENGTH_INTERNAL];
- int mCodeToGroup[MAX_GROUPED_CHAR_CODE + 1];
- int mCodeToKeyIndex[MAX_GROUPED_CHAR_CODE + 1];
+ int mCodeToKeyIndex[MAX_CHAR_CODE + 1];
};
} // namespace latinime