Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efb63246 authored by Satoshi Kataoka's avatar Satoshi Kataoka
Browse files

Change native functions' interface for gesture

Change-Id: I106a858f0be7452dd89f425805a6f72aa88c3f65
parent a3f5f51e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,8 @@ include $(CLEAR_VARS)
LATIN_IME_SRC_DIR := src

LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)/gesture
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)/gesture/impl

LOCAL_CFLAGS += -Werror -Wall

+2 −1
Original line number Diff line number Diff line
@@ -44,7 +44,8 @@ Dictionary::Dictionary(void *dict, int dictSize, int mmapFd, int dictBufAdjust,
            fullWordMultiplier, maxWordLength, maxWords, options);
    mBigramDictionary = new BigramDictionary(mDict + headerSize, maxWordLength);
    mGestureDecoder = new GestureDecoder(maxWordLength, maxWords);
    mGestureDecoder->setDict(mUnigramDictionary, mBigramDictionary);
    mGestureDecoder->setDict(mUnigramDictionary, mBigramDictionary,
            mDict + headerSize /* dict root */, 0 /* root pos */);
}

Dictionary::~Dictionary() {
+2 −1
Original line number Diff line number Diff line
@@ -28,7 +28,8 @@ class IncrementalDecoderImpl : IncrementalDecoderInterface {

 public:
     IncrementalDecoderImpl(int maxWordLength, int maxWords) { };
     void setDict(const UnigramDictionary *dict, const BigramDictionary *bigram) { };
     void setDict(const UnigramDictionary *dict, const BigramDictionary *bigram,
             const uint8_t *dictRoot, int rootPos) { };
     void setPrevWord(const int32_t *prevWord, int prevWordLength) { };
     void reset() { };

+2 −1
Original line number Diff line number Diff line
@@ -31,7 +31,8 @@ class IncrementalDecoderInterface {
            int *pointerIds, int *codes, int inputSize, int commitPoint, bool isMainDict,
            unsigned short *outWords, int *frequencies, int *outputIndices) = 0;
    virtual void reset() = 0;
    virtual void setDict(const UnigramDictionary *dict, const BigramDictionary *bigram) = 0;
    virtual void setDict(const UnigramDictionary *dict, const BigramDictionary *bigram,
            const uint8_t *dictRoot, int rootPos) = 0;
    virtual void setPrevWord(const int32_t *prevWord, int prevWordLength) = 0;
    virtual ~IncrementalDecoderInterface() { };
};
Loading