diff options
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. */ |