parent
ffd08e3788
commit
30ab10a144
|
@ -38,9 +38,9 @@ class GestureSuggest : public SuggestInterface {
|
||||||
if (!mSuggestInterface) {
|
if (!mSuggestInterface) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return mSuggestInterface->getSuggestions(pInfo, traverseSession, inputXs,
|
return mSuggestInterface->getSuggestions(pInfo, traverseSession, inputXs, inputYs, times,
|
||||||
inputYs, times, pointerIds, codes, inputSize, commitPoint, outWords, frequencies,
|
pointerIds, codes, inputSize, commitPoint, outWords, frequencies, outputIndices,
|
||||||
outputIndices, outputTypes);
|
outputTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setGestureSuggestFactoryMethod(SuggestInterface *(*factoryMethod)(int, int)) {
|
static void setGestureSuggestFactoryMethod(SuggestInterface *(*factoryMethod)(int, int)) {
|
||||||
|
@ -50,11 +50,11 @@ class GestureSuggest : public SuggestInterface {
|
||||||
private:
|
private:
|
||||||
DISALLOW_IMPLICIT_CONSTRUCTORS(GestureSuggest);
|
DISALLOW_IMPLICIT_CONSTRUCTORS(GestureSuggest);
|
||||||
static SuggestInterface *getGestureSuggestInstance(int maxWordLength, int maxWords) {
|
static SuggestInterface *getGestureSuggestInstance(int maxWordLength, int maxWords) {
|
||||||
if (sGestureSuggestFactoryMethod) {
|
if (!sGestureSuggestFactoryMethod) {
|
||||||
return sGestureSuggestFactoryMethod(maxWordLength, maxWords);
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
return sGestureSuggestFactoryMethod(maxWordLength, maxWords);
|
||||||
|
}
|
||||||
|
|
||||||
static SuggestInterface *(*sGestureSuggestFactoryMethod)(int, int);
|
static SuggestInterface *(*sGestureSuggestFactoryMethod)(int, int);
|
||||||
SuggestInterface *mSuggestInterface;
|
SuggestInterface *mSuggestInterface;
|
||||||
|
|
|
@ -28,8 +28,8 @@ class SuggestInterface {
|
||||||
virtual int getSuggestions(ProximityInfo *pInfo, void *traverseSession, int *inputXs,
|
virtual int getSuggestions(ProximityInfo *pInfo, void *traverseSession, int *inputXs,
|
||||||
int *inputYs, int *times, int *pointerIds, int *codes, int inputSize, int commitPoint,
|
int *inputYs, int *times, int *pointerIds, int *codes, int inputSize, int commitPoint,
|
||||||
int *outWords, int *frequencies, int *outputIndices, int *outputTypes) const = 0;
|
int *outWords, int *frequencies, int *outputIndices, int *outputTypes) const = 0;
|
||||||
SuggestInterface() { };
|
SuggestInterface() {};
|
||||||
virtual ~SuggestInterface() { };
|
virtual ~SuggestInterface() {};
|
||||||
private:
|
private:
|
||||||
DISALLOW_COPY_AND_ASSIGN(SuggestInterface);
|
DISALLOW_COPY_AND_ASSIGN(SuggestInterface);
|
||||||
};
|
};
|
||||||
|
|
|
@ -38,9 +38,9 @@ class TypingSuggest : public SuggestInterface {
|
||||||
if (!mSuggestInterface) {
|
if (!mSuggestInterface) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return mSuggestInterface->getSuggestions(pInfo, traverseSession, inputXs,
|
return mSuggestInterface->getSuggestions(pInfo, traverseSession, inputXs, inputYs, times,
|
||||||
inputYs, times, pointerIds, codes, inputSize, commitPoint, outWords, frequencies,
|
pointerIds, codes, inputSize, commitPoint, outWords, frequencies, outputIndices,
|
||||||
outputIndices, outputTypes);
|
outputTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setTypingSuggestFactoryMethod(SuggestInterface *(*factoryMethod)(int, int)) {
|
static void setTypingSuggestFactoryMethod(SuggestInterface *(*factoryMethod)(int, int)) {
|
||||||
|
@ -50,11 +50,11 @@ class TypingSuggest : public SuggestInterface {
|
||||||
private:
|
private:
|
||||||
DISALLOW_IMPLICIT_CONSTRUCTORS(TypingSuggest);
|
DISALLOW_IMPLICIT_CONSTRUCTORS(TypingSuggest);
|
||||||
static SuggestInterface *getTypingSuggestInstance(int maxWordLength, int maxWords) {
|
static SuggestInterface *getTypingSuggestInstance(int maxWordLength, int maxWords) {
|
||||||
if (sTypingSuggestFactoryMethod) {
|
if (!sTypingSuggestFactoryMethod) {
|
||||||
return sTypingSuggestFactoryMethod(maxWordLength, maxWords);
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
return sTypingSuggestFactoryMethod(maxWordLength, maxWords);
|
||||||
|
}
|
||||||
|
|
||||||
static SuggestInterface *(*sTypingSuggestFactoryMethod)(int, int);
|
static SuggestInterface *(*sTypingSuggestFactoryMethod)(int, int);
|
||||||
SuggestInterface *mSuggestInterface;
|
SuggestInterface *mSuggestInterface;
|
||||||
|
|
Loading…
Reference in New Issue