diff options
author | Peng Wu <alexepico@gmail.com> | 2012-12-04 10:04:09 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2012-12-04 10:04:09 +0800 |
commit | 3d1f1928a5d3317e90767a094466f3b2a0604254 (patch) | |
tree | da166271c3a582927619c6e312fbbe7300dd13d8 /src/pinyin.cpp | |
parent | 9cb03603a51252708a0f43992ce9d40e38e88a55 (diff) | |
download | libpinyin-3d1f1928a5d3317e90767a094466f3b2a0604254.tar.gz libpinyin-3d1f1928a5d3317e90767a094466f3b2a0604254.tar.xz libpinyin-3d1f1928a5d3317e90767a094466f3b2a0604254.zip |
write pinyin_get_chewing/pinyin_string
Diffstat (limited to 'src/pinyin.cpp')
-rw-r--r-- | src/pinyin.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp index a7d83be..bba9f1a 100644 --- a/src/pinyin.cpp +++ b/src/pinyin.cpp @@ -1795,6 +1795,29 @@ bool pinyin_reset(pinyin_instance_t * instance){ return true; } +bool pinyin_get_chewing_string(pinyin_instance_t * instance, + ChewingKey * key, + gchar ** utf8_str) { + *utf8_str = NULL; + if (0 == key->get_table_index()) + return false; + + *utf8_str = key->get_chewing_string(); + return true; +} + +bool pinyin_get_pinyin_string(pinyin_instance_t * instance, + ChewingKey * key, + gchar ** utf8_str) { + *utf8_str = NULL; + if (0 == key->get_table_index()) + return false; + + *utf8_str = key->get_pinyin_string(); + return true; +} + + /** * Note: prefix is the text before the pre-edit string. */ |