diff options
author | Peng Wu <alexepico@gmail.com> | 2011-09-08 18:16:27 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2011-09-08 18:16:27 +0800 |
commit | 72bd72e041428dd5c503d26a3feaad8eaa10a155 (patch) | |
tree | 4abd1c63b18a209b4ce32e66cb71f08252f59f07 /src/pinyin.h | |
parent | 03838c2f47ab836302e7d7aa85cc37e093fdbb45 (diff) | |
download | libpinyin-72bd72e041428dd5c503d26a3feaad8eaa10a155.tar.gz libpinyin-72bd72e041428dd5c503d26a3feaad8eaa10a155.tar.xz libpinyin-72bd72e041428dd5c503d26a3feaad8eaa10a155.zip |
begin to polish pinyin public api
Diffstat (limited to 'src/pinyin.h')
-rw-r--r-- | src/pinyin.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/pinyin.h b/src/pinyin.h index dae5e55..45fa9fd 100644 --- a/src/pinyin.h +++ b/src/pinyin.h @@ -34,19 +34,19 @@ extern "C" { typedef struct _pinyin_context_t pinyin_context_t; +typedef struct { + pinyin_context_t * m_context; + PinyinKeyVector m_pinyin_keys; + PinyinKeyPosVector m_pinyin_poses; + CandidateConstraints m_constraints; + MatchResults m_match_results; +} pinyin_instance_t; + pinyin_context_t * pinyin_init(const char * systemdir, const char * userdir); void pinyin_fini(pinyin_context_t * context); -bool pinyin_alloc_auxiliary_arrays(pinyin_context_t * context, - PinyinKeyVector * pinyin_keys, - PinyinKeyPosVector * pinyin_poses, - CandidateConstraints * constraints, - MatchResults * match_results); -bool pinyin_free_auxiliary_arrays(pinyin_context_t * context, - PinyinKeyVector * pinyin_keys, - PinyinKeyPosVector * pinyin_poses, - CandidateConstraints * constraints, - MatchResults * match_results); +pinyin_instance_t * pinyin_get_instance(pinyin_context_t * context); +void pinyin_release_instance(pinyin_instance_t * instance); bool pinyin_set_options(pinyin_context_t * context, PinyinCustomSettings * custom); |