summaryrefslogtreecommitdiffstats
path: root/src/pinyin.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-02-21 13:14:55 +0800
committerPeng Wu <alexepico@gmail.com>2013-02-21 13:14:55 +0800
commit932126ad426803596f17a7ad320c8ded1ea8b2d7 (patch)
treeaa644ff00d77fd6d4b5a1828b7a51bfbf8979ca8 /src/pinyin.cpp
parent6d73c79f073d241d57375a2c1078f4dc580d3bd9 (diff)
downloadlibpinyin-932126ad426803596f17a7ad320c8ded1ea8b2d7.tar.gz
libpinyin-932126ad426803596f17a7ad320c8ded1ea8b2d7.tar.xz
libpinyin-932126ad426803596f17a7ad320c8ded1ea8b2d7.zip
write pinyin_get_pinyin_strings
Diffstat (limited to 'src/pinyin.cpp')
-rw-r--r--src/pinyin.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index 2b9eb69..e880bb1 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -1763,6 +1763,19 @@ bool pinyin_get_pinyin_string(pinyin_instance_t * instance,
return true;
}
+bool pinyin_get_pinyin_strings(pinyin_instance_t * instance,
+ ChewingKey * key,
+ gchar ** shengmu,
+ gchar ** yunmu) {
+ *shengmu = NULL; *yunmu = NULL;
+ if (0 == key->get_table_index())
+ return false;
+
+ *shengmu = key->get_shengmu_string();
+ *yunmu = key->get_yunmu_string();
+ return true;
+}
+
bool pinyin_token_get_phrase(pinyin_instance_t * instance,
phrase_token_t token,
guint * len,