aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/digraph_utils.h
diff options
context:
space:
mode:
authorTom Ouyang <ouyang@google.com>2013-04-02 17:23:57 -0700
committerTom Ouyang <ouyang@google.com>2013-04-10 14:35:49 -0700
commit25e8eda9afb5c36703bd50b263ab0dd3a3b38d31 (patch)
treef4166a33f5e77dcf508befd0ad8c50d13bdff146 /native/jni/src/digraph_utils.h
parentfb3e805722975c39a47e29cfe6c27dd8a8f30701 (diff)
downloadlatinime-25e8eda9afb5c36703bd50b263ab0dd3a3b38d31.tar.gz
latinime-25e8eda9afb5c36703bd50b263ab0dd3a3b38d31.tar.xz
latinime-25e8eda9afb5c36703bd50b263ab0dd3a3b38d31.zip
Add mechanism to handle digraphs in DicNode
This is needed to support for German umlaut handling for both gesture and typing input. Bug: 8493920 Change-Id: I292e2a4911c54aa5566c38411016a220bb35a1f4
Diffstat (limited to 'native/jni/src/digraph_utils.h')
-rw-r--r--native/jni/src/digraph_utils.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/native/jni/src/digraph_utils.h b/native/jni/src/digraph_utils.h
index 6e364b67a..94435228e 100644
--- a/native/jni/src/digraph_utils.h
+++ b/native/jni/src/digraph_utils.h
@@ -27,21 +27,34 @@ class DigraphUtils {
SECOND_DIGRAPH_CODEPOINT
} DigraphCodePointIndex;
+ typedef enum {
+ DIGRAPH_TYPE_NONE,
+ DIGRAPH_TYPE_GERMAN_UMLAUT,
+ DIGRAPH_TYPE_FRENCH_LIGATURES
+ } DigraphType;
+
typedef struct { int first; int second; int compositeGlyph; } digraph_t;
static bool hasDigraphForCodePoint(const int dictFlags, const int compositeGlyphCodePoint);
static int getAllDigraphsForDictionaryAndReturnSize(
- const int dictFlags, const digraph_t **digraphs);
+ const int dictFlags, const digraph_t **const digraphs);
static int getDigraphCodePointForIndex(const int dictFlags, const int compositeGlyphCodePoint,
const DigraphCodePointIndex digraphCodePointIndex);
+ static int getDigraphCodePointForIndex(const int compositeGlyphCodePoint,
+ const DigraphCodePointIndex digraphCodePointIndex);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(DigraphUtils);
- static const digraph_t *getDigraphForCodePoint(
- const int dictFlags, const int compositeGlyphCodePoint);
+ static DigraphType getDigraphTypeForDictionary(const int dictFlags);
+ static int getAllDigraphsForDigraphTypeAndReturnSize(
+ const DigraphType digraphType, const digraph_t **const digraphs);
+ static const digraph_t *getDigraphForCodePoint(const int compositeGlyphCodePoint);
+ static const digraph_t *getDigraphForDigraphTypeAndCodePoint(
+ const DigraphType digraphType, const int compositeGlyphCodePoint);
static const digraph_t GERMAN_UMLAUT_DIGRAPHS[];
static const digraph_t FRENCH_LIGATURES_DIGRAPHS[];
+ static const DigraphType USED_DIGRAPH_TYPES[];
};
} // namespace latinime
#endif // DIGRAPH_UTILS_H