From 993bcbca62bee26aa3c23bc8edfd6dbe8eb66ad4 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 21 Mar 2013 10:54:18 +0800 Subject: clean up pinyin.h --- src/pinyin.cpp | 2 ++ src/pinyin.h | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/pinyin.cpp b/src/pinyin.cpp index b0bef83..35ac171 100644 --- a/src/pinyin.cpp +++ b/src/pinyin.cpp @@ -30,6 +30,8 @@ using namespace pinyin; /* a glue layer for input method integration. */ +typedef GArray * CandidateVector; /* GArray of lookup_candidate_t */ + struct _pinyin_context_t{ pinyin_option_t m_options; diff --git a/src/pinyin.h b/src/pinyin.h index a9ba9e9..d7f57e8 100644 --- a/src/pinyin.h +++ b/src/pinyin.h @@ -26,7 +26,11 @@ #include #include "novel_types.h" #include "pinyin_custom2.h" -#include "chewing_key.h" + +namespace pinyin{ +typedef struct _ChewingKey ChewingKey; +typedef struct _ChewingKeyRest ChewingKeyRest; +}; using pinyin::pinyin_option_t; using pinyin::DoublePinyinScheme; @@ -53,8 +57,6 @@ typedef struct _lookup_candidate_t lookup_candidate_t; typedef struct _import_iterator_t import_iterator_t; -typedef GArray * CandidateVector; /* GArray of lookup_candidate_t */ - enum lookup_candidate_type_t{ BEST_MATCH_CANDIDATE = 1, NORMAL_CANDIDATE, @@ -570,8 +572,6 @@ bool pinyin_token_add_unigram_frequency(pinyin_instance_t * instance, /* hack here. */ typedef ChewingKey PinyinKey; typedef ChewingKeyRest PinyinKeyPos; -typedef ChewingKeyVector PinyinKeyVector; -typedef ChewingKeyRestVector PinyinKeyPosVector; #define LIBPINYIN_FORMAT_VERSION "0.8.92" -- cgit