summaryrefslogtreecommitdiffstats
path: root/src/pinyin.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-03-21 16:27:01 +0800
committerPeng Wu <alexepico@gmail.com>2013-03-21 16:27:01 +0800
commit5956a44f8a2b1d890b318a9517d23de895428586 (patch)
treee10c7dc56c272f3724baa7b9db53915b73178078 /src/pinyin.cpp
parent33fbca959cd63cf5de0c36695d9ec03dd8d7095a (diff)
downloadlibpinyin-5956a44f8a2b1d890b318a9517d23de895428586.tar.gz
libpinyin-5956a44f8a2b1d890b318a9517d23de895428586.tar.xz
libpinyin-5956a44f8a2b1d890b318a9517d23de895428586.zip
write methods
Diffstat (limited to 'src/pinyin.cpp')
-rw-r--r--src/pinyin.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index 34e6bde..c857ae5 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -1984,6 +1984,32 @@ bool pinyin_get_pinyin_key_rest(pinyin_instance_t * instance,
return true;
}
+bool pinyin_get_key_rest_positions(pinyin_instance_t * instance,
+ ChewingKeyRest * key_rest,
+ guint16 * begin, guint16 * end) {
+ if (begin)
+ *begin = key_rest->m_raw_begin;
+
+ if (end)
+ *end = key_rest->m_raw_end;
+
+ return true;
+}
+
+bool pinyin_get_key_rest_length(pinyin_instance_t * instance,
+ ChewingKeyRest * key_rest,
+ guint16 * len) {
+ *len = key_rest->length();
+ return true;
+}
+
+bool pinyin_get_raw_full_pinyin(pinyin_instance_t * instance,
+ const gchar ** utf8_str) {
+ *utf8_str = instance->m_raw_full_pinyin;
+ return true;
+}
+
+
/**
* Note: prefix is the text before the pre-edit string.
*/