⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zi8hmi.c

📁 印尼字库和输入法
💻 C
📖 第 1 页 / 共 5 页
字号:
    UI_NULL_IMAGE,
    NULL,
    {WHITE},                    /* { 206,206,206,100 }, */
    {BLACK},
    {BLACK},
    {WHITE},                    /* {   128,128,128,100 }, */
    0,
};

#else /* defined (MONO_LCD) */ 
UI_filled_area MMI_ZI_COMPOSITION_WINDOW_filler = 
{
    UI_FILLED_AREA_TYPE_COLOR,  /* |UI_FILLED_AREA_SINGLE_BORDER, */
    UI_NULL_IMAGE,
    NULL,
    {182, 189, 210, 100},       /* { 206,206,206,100 }, */
    {0, 0, 0, 0},
    {0, 0, 0, 100},
    {10, 36, 106, 100},         /* {   128,128,128,100 }, */
    0,
};
#endif /* defined (MONO_LCD) */ 
ZI8BOOL ziNoDrawRightArrowSymbol;
ZI8BOOL ziNoDrawCandidateRightArrowSymbol;
KEYID ziCurrKeyId;

#if defined (MONO_LCD)
/* PMT Dara 24/11/04 ..changed for the MonoLcd */
color MMI_ZI_COMPONENT_SELECTOR_COLOR = {BLACK};    /* WHITE..........as it was yellow colour earlier */

/* PMT end */
color MMI_ZI_COMPONENT_SELECTION_TXT_COLOR = {WHITE};
#else /* defined (MONO_LCD) */ 
color MMI_ZI_COMPONENT_SELECTOR_COLOR = {255, 248, 175, 100};
color MMI_ZI_COMPONENT_SELECTION_TXT_COLOR = {255, 0, 0, 100};
#endif /* defined (MONO_LCD) */ 
#if !defined(MMI_LOW_MEMORY_PHONE) || defined(__MMI_MESSAGES_EMS__)
EMSTextFormat ziKeepEMSTextFormat;
#endif 
ZI8LONG ziMultilineEditorHeight;

#if !defined(MMI_LOW_MEMORY_PHONE) || defined(__MMI_MESSAGES_EMS__)
ZI8LONG ziEMSEditorHeight;
#endif 

ZI8BOOL ziFrameTimerStart;

/* MTK Terry temp solution for composition and candidate window display */
#if !defined(MMI_LOW_MEMORY_PHONE) || defined(__MMI_MESSAGES_EMS__)
#define ZI_COMPOSITION_Y UI_device_height-MMI_BUTTON_BAR_HEIGHT-1-MMI_multitap_height-1-MMI_multitap_height
#define ZI_CANDIDATE_Y UI_device_height-MMI_BUTTON_BAR_HEIGHT-1-MMI_multitap_height
#endif /* !defined(MMI_LOW_MEMORY_PHONE) || defined(__MMI_MESSAGES_EMS__) */ 

extern S32 MMI_multiline_inputbox_x;
extern S32 MMI_multiline_inputbox_y;
extern S32 MMI_multiline_inputbox_width;
extern S32 MMI_multiline_inputbox_height;
extern S32 UI_device_height;
extern S32 MMI_title_y;
extern S32 MMI_title_height;
extern S32 MMI_button_bar_height;
extern S32 MMI_multitap_x;
extern S32 MMI_multitap_y;
extern S32 MMI_multitap_width;
extern S32 MMI_multitap_height;

#if !defined(MMI_LOW_MEMORY_PHONE) || defined(__MMI_MESSAGES_EMS__)
extern UI_EMS_input_box MMI_EMS_inputbox;
#endif 

extern S16 MMI_current_input_type;

#if !defined(MMI_LOW_MEMORY_PHONE) || defined(__MMI_MESSAGES_EMS__)
extern S16 MMI_current_input_ext_type;
#endif 
// #ifdef __MMI_DEFAULT_THEME_3__
#if !defined(__MTK_TARGET__) && defined(MMI_LOW_MEMORY_PHONE)
extern const UI_filled_area MMI_multitap_filler;
#else 
extern CONST_HARDWARE UI_filled_area MMI_multitap_filler;
#endif 
#if defined(MONO_LCD)
color multitap_selector_txt_col_Default = BLACK;

/* PMT Dara 24/11/04 ....as selected text should be WHITE */
color multitap_selected_txt_col_Default = WHITE;    /* BLACK */

/* PMT end */
#else /* defined(MONO_LCD) */ 
extern CONST_HARDWARE color multitap_selector_txt_col_Default;
extern CONST_HARDWARE color multitap_selected_txt_col_Default;
#endif /* defined(MONO_LCD) */ 
// #endif
extern U8 inline_full_screen_edit_changed;
extern U8 wgui_inline_list_menu_disable_done;

#if !defined(MMI_LOW_MEMORY_PHONE) || defined(__MMI_MESSAGES_EMS__)
extern EMSTextFormat wgui_EMS_text_format;
#endif 
extern U8 wgui_singleline_inputbox_RSK_label_clear;
extern UI_theme *current_UI_theme;
extern UI_multitap_input_theme *current_multitap_input_theme;
extern U8 category28_RSK_label_clear;
extern UI_string_type category28_RSK_label_string;
extern PU8 category28_RSK_label_icon;
extern U8 wgui_inputbox_RSK_label_clear;
extern UI_string_type wgui_inputbox_RSK_label_string;
extern PU8 wgui_inputbox_RSK_label_icon;

extern void (*wgui_inline_edit_DONE_function) (void);
extern void EntryInLineMultilineEditorOption(void);

extern void (*gui_start_timer) (S32 count, void (*callback) (void));

#if !defined(MMI_LOW_MEMORY_PHONE) || defined(__MMI_MESSAGES_EMS__)
extern void gui_show_EMS_input_box(UI_EMS_input_box *b);
#endif 
extern void gui_show_single_line_input_box(single_line_input_box *b);
extern void (*gui_BLT_double_buffer) (S32 x1, S32 y1, S32 x2, S32 y2);
extern void (*gui_lock_double_buffer) (void);
extern void (*gui_unlock_double_buffer) (void);
extern void gui_create_single_line_input_box_use_buffer(
                single_line_input_box *b,
                S32 x,
                S32 y,
                S32 width,
                S32 height,
                UI_string_type buffer,
                S32 length);
extern void gui_single_line_input_box_next(single_line_input_box *b);
extern void gui_single_line_input_box_previous(single_line_input_box *b);
extern void (*hide_multitap) (void);
extern void gui_single_line_input_box_goto_first_character(single_line_input_box *b);

#if !defined(MMI_LOW_MEMORY_PHONE) || defined(__MMI_MESSAGES_EMS__)
extern void wgui_EMS_redraw_remaining_characters_display(void);

/* extern void gui_EMS_input_box_insert_character(UI_EMS_input_box *b,UI_character_type c); */
extern void gui_EMS_input_box_backspace(UI_EMS_input_box *b);
extern void gui_EMS_input_box_delete_all(UI_EMS_input_box *b);
extern void gui_EMS_input_box_previous(UI_EMS_input_box *b);
extern void gui_EMS_input_box_next(UI_EMS_input_box *b);
extern void gui_EMS_input_box_previous_line(UI_EMS_input_box *b);
extern void gui_EMS_input_box_next_line(UI_EMS_input_box *b);
extern S32 gui_EMS_input_box_highlight_cursor_end(UI_EMS_input_box *b);
extern S32 gui_EMS_input_box_highlight_cursor_start(UI_EMS_input_box *b);
extern S32 gui_EMS_input_box_highlight_cursor_number(UI_EMS_input_box *b, S32 numOfChar);
extern void register_category28_handle_right_softkey_up(void);
extern void handle_category28_input(void);
extern void show_EMS_inputbox(void);
extern void gui_resize_EMS_input_box(UI_EMS_input_box *b, S32 width, S32 height);

#endif /* !defined(MMI_LOW_MEMORY_PHONE) || defined(__MMI_MESSAGES_EMS__) */ 
extern S8 *UCS2Strcat(S8 *strDestination, const S8 *strSource);
extern S8 *UCS2Strcpy(S8 *strDestination, const S8 *strSource);
extern S32 UCS2Strlen(const S8 *arrOut);
extern S32 gui_single_line_input_box_highlight_cursor_start(single_line_input_box *b);
extern void (*gui_cancel_timer) (void (*callback) (void));
extern void gui_multi_line_input_box_insert_character(multi_line_input_box *b, UI_character_type c);
extern void gui_multi_line_input_box_delete_character(multi_line_input_box *b);
extern void gui_multi_line_input_box_previous(multi_line_input_box *b);
extern void gui_multi_line_input_box_next(multi_line_input_box *b);
extern void wgui_redraw_remaining_characters_display(void);
extern S32 gui_multi_line_input_box_highlight_cursor_number(multi_line_input_box *b, S32 n);
extern void wgui_register_inputbox_handle_right_softkey_up(void);
extern void gui_multi_line_input_box_delete_all(multi_line_input_box *b);
extern void wgui_handle_inputbox_input(void);
extern void show_multiline_inputbox(void);
extern S32 gui_single_line_input_box_highlight_cursor_number(single_line_input_box *b, S32 numOfChar);
extern S32 gui_single_line_input_box_insert_string(single_line_input_box *b, UI_string_type s, S32 o);
extern void (*gui_reset_clip) (void);

#if defined(MONO_LCD)
extern color(*gui_color) (color c);
#else 
extern color(*gui_color) (U8 r, U8 g, U8 b);
#endif 

extern void draw_resizeable_arrow(S32 x, S32 y, U8 arrow_type, color c, S32 width, S32 height);
extern void draw_arrow(S32 x, S32 y, U8 arrow_type, color c);
extern void (*gui_putpixel) (S32 x, S32 y, color c);
extern U16 StopMyTimer(U16 nTimerId);
extern U16 StartMyTimerInt(U16 nTimerId, U32 nTimeDuration, oslTimerFuncPtr TimerExpiry, U8 alignment);
extern void wgui_register_singleline_inputbox_handle_right_softkey_up(void);
extern void wgui_handle_singleline_inputbox_input(void);
extern void redraw_input_mode_only(void);
extern void redraw_fixed_list(void);
extern void gui_show_fixed_list_menu(fixed_list_menu *m);
extern void PbookListSearchEntryReq(void);
extern void show_softkey_background(void);
extern void UI_editor_play_tone_cannot_insert(void);
extern void register_category28_handle_clear_key_up(void);
extern void wgui_register_inputbox_handle_clear_key_up(void);
extern void wgui_handle_inputbox_right_softkey_up(void);
extern void handle_category28_right_softkey_up(void);
extern void (*multiline_inputbox_input_callback) (void);

#if defined(__MMI_ZI_DYNAMIC_LAN_LIB_INIT__)

#if defined(__MMI_ZI_TR_CHINESE__) && defined(__MMI_ZI_TAIWAN__)
extern ZI8BOOL Initialize_TR_DATA(void);
#endif 

#if defined(__MMI_ZI_SM_CHINESE__)
extern ZI8BOOL Initialize_SM_DATA(void);
#endif 

extern ZI8_LANGUAGE_ENTRY ziLanguageLibs[];

#endif /* defined(__MMI_ZI_DYNAMIC_LAN_LIB_INIT__) */ 
/* ************************************************************************ */

static ZI8UCHAR CenterOutCandidates(ZI8UCHAR);
static ZI8UCHAR CenterOutIndex(ZI8UCHAR);

static ZI8BOOL IMEinsertChar(ZI8WCHAR);
static ZI8BOOL IMEdeleteChar(void);
static int IMEinsertText(PZI8WCHAR);
static void IMEtoCapMode(PZI8WCHAR);

static void IMEchangeInputMethod(void);
static ZI8BOOL IMEchangeSubLanguage(ZI8BOOL);

static void IMEstartEZI_STROKE(void);
static void IMEstartEZI_PHONETIC(ZI8UCHAR);
static void IMEstartEZI_PINYIN(void);
static void IMEstartEZI_BOPOMOFO(void);
static void IMEstartEZI_ABC(void);
static void IMEstartEZI_MULTITAP_PINYIN(void);
static void IMEstartEZI_MULTITAP_BOPOMOFO(void);
static void IMEstartEZI_THAI(void);

#ifdef __MMI_ZI_ARABIC__        
static void IMEstartEZI_ARABIC(void);
#endif 

#ifdef __MMI_ZI_PERSIAN__ 
static void IMEstartEZI_PERSIAN(void);
#endif 


#ifdef __MMI_ZI_HINDI__
static void IMEstartEZI_HINDI(void);
#endif 

#ifdef __MMI_ZI_HEBREW__        
static void IMEstartEZI_HEBREW(void);
#endif 

IME_RETURN_CODE IMEprocessKey(KEYID keyID, int, int);
static IME_RETURN_CODE IMEprocessKeyEZI_STROKE(KEYID, int, int);
static IME_RETURN_CODE IMEprocessKey1Phonetic(KEYID, int, int);
static IME_RETURN_CODE IMEprocessKey2Phonetic(KEYID, int, int);
static IME_RETURN_CODE IMEprocessKeyMultitapPhonetic(KEYID, int, int);
static IME_RETURN_CODE IMEprocessKey1N2Phonetic(KEYID, int, int);
static IME_RETURN_CODE IMEprocessKeyDirectPhonetic(KEYID, int, int);
static IME_RETURN_CODE IMEprocessKeyEZI_ABC(KEYID, int, int);
static IME_RETURN_CODE IMEprocessKeyEZI_THAI(KEYID, int, int);

#ifdef __MMI_ZI_ARABIC__        /* can be remove while checking Arabic into GPRS branch */
static IME_RETURN_CODE IMEprocessKeyEZI_ARABIC(KEYID, int, int);
#endif 

#ifdef __MMI_ZI_PERSIAN__       /* can be remove while checking Persian into GPRS branch */
static IME_RETURN_CODE IMEprocessKeyEZI_PERSIAN(KEYID, int, int);
#endif 


#ifdef __MMI_ZI_HINDI__ /* Hindi */
static IME_RETURN_CODE IMEprocessKeyEZI_HINDI(KEYID, int, int);
#endif 

#ifdef __MMI_ZI_HEBREW__        /* can be remove while checking Hebrew into GPRS branch */
static IME_RETURN_CODE IMEprocessKeyEZI_HEBREW(KEYID, int, int);
#endif 

void InitZiInputMethod(void);

void ZiKey0PressHandler(void);
void ZiKey1PressHandler(void);
void ZiKey2PressHandler(void);
void ZiKey3PressHandler(void);
void ZiKey4PressHandler(void);
void ZiKey5PressHandler(void);
void ZiKey6PressHandler(void);
void ZiKey7PressHandler(void);
void ZiKey8PressHandler(void);
void ZiKey9PressHandler(void);

void ZiKeyArrowUPHandler(void);
void ZiKeyArrowRightHandler(void);
void ZiKeyArrowDownHandler(void);
void ZiKeyArrowLeftHandler(void);

/* PMT dara added for UP & DOWN long press functionality */
#ifdef MMI_LOW_MEMORY_PHONE
void ZiKeyArrowDownLongPressHandler(void);  /* dara...Zi ..29/11/2k4 */
void ZiKeyArrowUPLongPressHandler(void);
#endif /* MMI_LOW_MEMORY_PHONE */ 
/* PMT end */

void ZiKeyStarPressHandler(void);
void ZiKeyStarLongPressHandler(void);
void ZiKeyHashPressHandler(void);
void ZiKeyHashLongPressHandler(void);

void ZiKeyLSKPressHandler(void);
void ZiKeyLSKLongPressHandler(void);
void ZiKeyRSKPressHandler(void);
void ZiKeyRSKLongPressHandler(void);

void ZiDisplay(void);
void ZiDisplayForEmsEditorEndFrame(void);
void ZiChangeInputMethod(INPUT_MODE inputMode);

void ZiClearKeyStarAndPoundHandler(void);
void ZiClearKeyNavigationHandler(void);
void ZiClearArrowKeyLeftHandler(void);
void ZiClearArrowKeyRightHandler(void);
void ZiClearKey0To9Handler(void);

#if defined(__MTK_TARGET__)
int wcslen(char *);
char wcscat(char *, char *);
char wcscpy(char *, char *);
#endif /* defined(__MTK_TARGET__) */ 
ZI8WCHAR ZI_towupper(ZI8WCHAR wChar);
ZI8WCHAR ZI_towlower(ZI8WCHAR wChar);
void ZiInuptMethodEnterSinglelineInputBox(void);
void ZiInuptMethodExitSinglelineInputBox(void);
void ZiInuptMethodEnterCategory5(void);
void ZiInuptMethodExitCategory5(void);
void ZiInuptMethodEnterCategory28(void);
void ZiInuptMethodExitCategory28(void);
void ZiInputBoxScreenStateChange(void);
void ZiInputMethodExit(void);
void ZiHideCompositionArea(void);
ZI8UCHAR ZiMaxLengthCheck(void);
void ZiMultitapKeyTimeoutHandler(void);
void ZiSetCandidateWindowCurrentTheme(void);

#if !defined(MMI_LOW_MEMORY_PHONE) || defined(__MMI_MESSAGES_EMS__)
extern icontext_button MMI_softkeys[];
#endif 
/* **************** */
/* Global variables */
/* **************** */
ZI8UCHAR IMEprediction_Startat;

ZI8WCHAR labelSoftR[MAX_CHAR_PER_LINE + 1];
ZI8WCHAR labelSoftL[MAX_CHAR_PER_LINE + 1];
ZI8WCHAR labelTop[MAX_CHAR_PER_LINE + 1];

ZI8UCHAR dictionaryPUD[MAX_DICTIONARY_SIZE];
ZI8UCHAR dictionaryUWD[MAX_DICTIONARY_SIZE];
ZI8UCHAR dictionaryUWD_ZH[MAX_DICTIONARY_SIZE];
SUPPORTED_LANGUAGES dictLanguage;
PB_ORDER pbOrder;
ZI8BOOL bNoComponent;
IME_PHONETIC_METHOD iStepID;
ZI8BOOL bComponentOn2ndKey;
ZI8BOOL bNoRadicals;
ALPHA_LANGUAGE IMEalphaLangID;

ZI8UCHAR IMEsubLanguage;
INPUT_MODE IMEmethodZH;
INPUT_MODE IMEmethodLast;
ZI8UCHAR IMEletterCase;
ZI8UCHAR IMEpudID;
ZI8UCHAR IMEuwdID;
ZI8UCHAR IMEuwd_ZHID;
ZI8UCHAR IMEoemID;
ZI8BOOL bUseZHUWD;
ZI8BOOL bZHwordCand;
ZI8BOOL bSingleChar;

#if 0
/* under construction !*/
#endif /* 0 */ 

/* *************** */
/* Local variables */
/* *************** */
static int IMEnumOfChars;
static int IMEmaxBufferSize;
static IME_TEXT_TYPE IMEtextType;
static ZI8BOOL IMEsearchPB;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -