summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2015-08-04 11:13:06 +0800
committerPeng Wu <alexepico@gmail.com>2015-08-04 11:13:06 +0800
commit12b885acfccf4baf897368abdbf15de42342ef2f (patch)
tree64cbcfe8d1ef9bc91c4f012f3f8705380e777c4e
parent963f73d36934002d5152c6f8e40f0a9d9c1fa80c (diff)
downloadlibzhuyin-12b885acfccf4baf897368abdbf15de42342ef2f.tar.gz
libzhuyin-12b885acfccf4baf897368abdbf15de42342ef2f.tar.xz
libzhuyin-12b885acfccf4baf897368abdbf15de42342ef2f.zip
rename zhuyin_guess_candidates to zhuyin_guess_candidates_after_cursor
-rw-r--r--src/libzhuyin.ver2
-rw-r--r--src/zhuyin.cpp8
-rw-r--r--src/zhuyin.h8
3 files changed, 9 insertions, 9 deletions
diff --git a/src/libzhuyin.ver b/src/libzhuyin.ver
index c448734..be217df 100644
--- a/src/libzhuyin.ver
+++ b/src/libzhuyin.ver
@@ -24,7 +24,7 @@ LIBZHUYIN {
zhuyin_parse_more_chewings;
zhuyin_get_parsed_input_length;
zhuyin_in_chewing_keyboard;
- zhuyin_guess_candidates;
+ zhuyin_guess_candidates_after_cursor;
zhuyin_choose_candidate;
zhuyin_clear_constraint;
zhuyin_lookup_tokens;
diff --git a/src/zhuyin.cpp b/src/zhuyin.cpp
index 68b6269..8bd86eb 100644
--- a/src/zhuyin.cpp
+++ b/src/zhuyin.cpp
@@ -77,7 +77,7 @@ struct _lookup_candidate_t{
guint32 m_freq; /* the amplifed gfloat numerical value. */
public:
_lookup_candidate_t() {
- m_candidate_type = NORMAL_CANDIDATE;
+ m_candidate_type = NORMAL_CANDIDATE_AFTER_CURSOR;
m_phrase_string = NULL;
m_token = null_token;
m_new_pinyins = NULL;
@@ -1175,7 +1175,7 @@ static bool _compute_phrase_strings_of_items(zhuyin_instance_t * instance,
g_free(sentence);
break;
}
- case NORMAL_CANDIDATE:
+ case NORMAL_CANDIDATE_AFTER_CURSOR:
zhuyin_token_get_phrase
(instance, candidate->m_token, NULL,
&(candidate->m_phrase_string));
@@ -1294,8 +1294,8 @@ static bool _free_candidates(CandidateVector candidates) {
return true;
}
-bool zhuyin_guess_candidates(zhuyin_instance_t * instance,
- size_t offset) {
+bool zhuyin_guess_candidates_after_cursor(zhuyin_instance_t * instance,
+ size_t offset) {
zhuyin_context_t * & context = instance->m_context;
pinyin_option_t & options = context->m_options;
diff --git a/src/zhuyin.h b/src/zhuyin.h
index 24128eb..44c383a 100644
--- a/src/zhuyin.h
+++ b/src/zhuyin.h
@@ -41,7 +41,7 @@ typedef struct _import_iterator_t import_iterator_t;
typedef enum _lookup_candidate_type_t{
BEST_MATCH_CANDIDATE = 1,
- NORMAL_CANDIDATE,
+ NORMAL_CANDIDATE_AFTER_CURSOR,
ZOMBIE_CANDIDATE
} lookup_candidate_type_t;
@@ -332,7 +332,7 @@ size_t zhuyin_get_parsed_input_length(zhuyin_instance_t * instance);
bool zhuyin_in_chewing_keyboard(zhuyin_instance_t * instance,
const char key, gchar *** symbols);
/**
- * zhuyin_guess_candidates:
+ * zhuyin_guess_candidates_after_cursor:
* @instance: the zhuyin instance.
* @offset: the offset in the pinyin keys.
* @returns: whether a list of tokens are gotten.
@@ -340,8 +340,8 @@ bool zhuyin_in_chewing_keyboard(zhuyin_instance_t * instance,
* Guess the candidates at the offset.
*
*/
-bool zhuyin_guess_candidates(zhuyin_instance_t * instance,
- size_t offset);
+bool zhuyin_guess_candidates_after_cursor(zhuyin_instance_t * instance,
+ size_t offset);
/**
* zhuyin_choose_candidate: