diff options
author | Peng Wu <alexepico@gmail.com> | 2016-06-30 14:30:46 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-06-30 14:36:21 +0800 |
commit | c4f57271683ec7eb98b43ee4aae94cff1b341483 (patch) | |
tree | 222ddfee0fc4caa5b4d2e83ae0f802805298e989 /src/pinyin.h | |
parent | 60934ae69936452dffeceee9544c0d1016f8d6dd (diff) | |
download | libpinyin-c4f57271683ec7eb98b43ee4aae94cff1b341483.tar.gz libpinyin-c4f57271683ec7eb98b43ee4aae94cff1b341483.tar.xz libpinyin-c4f57271683ec7eb98b43ee4aae94cff1b341483.zip |
begin to add pinyin_remember_user_input function
Diffstat (limited to 'src/pinyin.h')
-rw-r--r-- | src/pinyin.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/pinyin.h b/src/pinyin.h index 610070e..9599aab 100644 --- a/src/pinyin.h +++ b/src/pinyin.h @@ -994,7 +994,22 @@ bool pinyin_get_chewing_auxiliary_text(pinyin_instance_t * instance, size_t cursor, gchar ** aux_text); -/* hack here. */ +/** + * pinyin_remember_user_input: + * @instance: the pinyin instance. + * @phrase: the utf8 phrase. + * @count: the count of the phrase, -1 to use the default value. + * @returns: whether the phrase is remembered. + * + * Remember the current phrase and pinyin pair. + * + */ +bool pinyin_remember_user_input(pinyin_instance_t * instance, + const char * phrase, + gint count); + + +/* for compatibility. */ typedef ChewingKey PinyinKey; typedef ChewingKeyRest PinyinKeyPos; |