From 05c2c6e853ce05a0843ae34f1df6a2226e255dc8 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 28 Jun 2016 11:06:40 +0800 Subject: add comments --- src/pinyin.cpp | 2 -- src/pinyin.h | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/pinyin.cpp b/src/pinyin.cpp index ca3fa78..28d5be2 100644 --- a/src/pinyin.cpp +++ b/src/pinyin.cpp @@ -2819,8 +2819,6 @@ bool pinyin_get_character_offset(pinyin_instance_t * instance, size_t * poffset) { pinyin_context_t * context = instance->m_context; FacadePhraseIndex * phrase_index = context->m_phrase_index; - - PhoneticKeyMatrix & matrix = instance->m_matrix; MatchResults results = instance->m_match_results; size_t offset = 0; diff --git a/src/pinyin.h b/src/pinyin.h index c691197..863e945 100644 --- a/src/pinyin.h +++ b/src/pinyin.h @@ -952,17 +952,49 @@ bool pinyin_get_phrase_token(pinyin_instance_t * instance, guint index, phrase_token_t * token); - +/** + * pinyin_get_full_pinyin_auxiliary_text: + * @instance: the pinyin instance. + * @input: the user input. + * @cursor: the current cursor. + * @aux_text: the auxiliary text. + * @returns: whether the get operation is successful. + * + * Get the auxiliary text for full pinyin. + * + */ bool pinyin_get_full_pinyin_auxiliary_text(pinyin_instance_t * instance, const char * input, size_t cursor, gchar ** aux_text); +/** + * pinyin_get_double_pinyin_auxiliary_text: + * @instance: the pinyin instance. + * @input: the user input. + * @cursor: the current cursor. + * @aux_text: the auxiliary text. + * @returns: whether the get operation is successful. + * + * Get the auxiliary text for double pinyin. + * + */ bool pinyin_get_double_pinyin_auxiliary_text(pinyin_instance_t * instance, const char * input, size_t cursor, gchar ** aux_text); +/** + * pinyin_get_chewing_auxiliary_text: + * @instance: the pinyin instance. + * @input: the user input. + * @cursor: the current cursor. + * @aux_text: the auxiliary text. + * @returns: whether the get operation is successful. + * + * Get the auxiliary text for chewing. + * + */ bool pinyin_get_chewing_auxiliary_text(pinyin_instance_t * instance, const char * input, size_t cursor, -- cgit