write methods
authorPeng Wu <alexepico@gmail.com>
Thu, 21 Mar 2013 08:27:01 +0000 (16:27 +0800)
committerPeng Wu <alexepico@gmail.com>
Thu, 21 Mar 2013 08:27:01 +0000 (16:27 +0800)
src/pinyin.cpp
src/pinyin.h

index 34e6bdecc8848942864cb52d001e62f8a32c7e34..c857ae5d45a4961d92160dbe70633b46477aa0ba 100644 (file)
@@ -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.
  */
index a038327bfddfb00f1f24481eb01cb2d9c2dc496b..d8863acd108fb04be735e3d5cb01c3d571ef1db1 100644 (file)
@@ -597,8 +597,8 @@ bool pinyin_get_key_rest_length(pinyin_instance_t * instance,
                                 ChewingKeyRest * key_rest,
                                 guint16 * len);
 
-bool pinyin_get_raw_pinyin_input(pinyin_instance_t * instance,
-                                 const gchar ** utf8_str);
+bool pinyin_get_raw_full_pinyin(pinyin_instance_t * instance,
+                                const gchar ** utf8_str);