summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-12-21 13:04:31 +0800
committerPeng Wu <alexepico@gmail.com>2011-12-21 13:04:31 +0800
commit5ed777d199dcfd8d24df8d6800564c19a8f6f327 (patch)
tree8e1d76aa414dc721b92ca87d5ee5e3d5e3e8518f
parentda0c48d52aad4541d38d45ad3490b151029b7f26 (diff)
downloadlibpinyin-5ed777d199dcfd8d24df8d6800564c19a8f6f327.tar.gz
libpinyin-5ed777d199dcfd8d24df8d6800564c19a8f6f327.tar.xz
libpinyin-5ed777d199dcfd8d24df8d6800564c19a8f6f327.zip
add pinyin_in_chewing_keyboard
-rw-r--r--src/libpinyin.ver1
-rw-r--r--src/pinyin.cpp7
-rw-r--r--src/pinyin.h2
3 files changed, 10 insertions, 0 deletions
diff --git a/src/libpinyin.ver b/src/libpinyin.ver
index 88ccb2e..f4e8932 100644
--- a/src/libpinyin.ver
+++ b/src/libpinyin.ver
@@ -17,6 +17,7 @@ LIBPINYIN {
pinyin_parse_more_double_pinyins;
pinyin_parse_chewing;
pinyin_parse_more_chewings;
+ pinyin_in_chewing_keyboard;
pinyin_get_candidates;
pinyin_choose_candidate;
pinyin_clear_constraint;
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index 1097b7f..f4a20fe 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -421,6 +421,13 @@ size_t pinyin_parse_more_chewings(pinyin_instance_t * instance,
return parse_len;
}
+bool pinyin_in_chewing_keyboard(pinyin_instance_t * instance,
+ const char key, const char ** symbol) {
+ pinyin_context_t * & context = instance->m_context;
+ return context->m_chewing_parser->in_chewing_scheme(key, symbol);
+}
+
+
/* internal definition */
typedef struct {
pinyin_context_t * m_context;
diff --git a/src/pinyin.h b/src/pinyin.h
index 8778715..3948340 100644
--- a/src/pinyin.h
+++ b/src/pinyin.h
@@ -83,6 +83,8 @@ bool pinyin_parse_chewing(pinyin_instance_t * instance,
ChewingKey * onekey);
size_t pinyin_parse_more_chewings(pinyin_instance_t * instance,
const char * chewings);
+bool pinyin_in_chewing_keyboard(pinyin_instance_t * instance,
+ const char key, const char ** symbol);
bool pinyin_get_candidates(pinyin_instance_t * instance,
size_t offset,