/*! * \brief 短按删除键处理函数 * \param void * \return * \note * \example * \author weizhiping * \date 2010-10-9 9:49:29 */ void GBInputBox_DeletkeyHandler(void) { #if __MTK__ > 0 PCLayoutAbstract pltAbstractObj = Global_GetCurrentLayoutObject(); PCLayoutControl pLtCtl = Global_GetLayoutCtl(); gui_reset_clip(); gdi_layer_lock_frame_buffer(); gui_push_clip(); gui_push_text_clip(); if (pLtCtl->engineOutputInfo.bCandWindOpen) { // pltAbstractObj->bSendEngineKeyEvent = GBTrue; // pltAbstractObj->engineKeyEvent = GBKEY_BACK; // Global_FillEventGroup(GBIME_CT_NORMAL_KEY_UP, GBKEY_BACK, 0); GBEngine_SendKeyEvent(Global_GetEnineInstance(), GBKEY_BACK, 0);//引擎pOutputString没有更新[BUG 611] //GBIME_Paint(); } else { GBInputBox_DeleteChar(); } gui_pop_clip(); gui_pop_text_clip(); gdi_layer_unlock_frame_buffer(); gdi_lcd_repaint_all(); GBInputBox_UpdateSoftKeyLabel(); #endif }
/***************************************************************************** * FUNCTION * mmi_pen_editor_get_candidates_from_hand_writing * DESCRIPTION * Get the candidates from the handwriting module * PARAMETERS * void * RETURNS * The number of the candidates *****************************************************************************/ int mmi_pen_editor_get_candidates_from_hand_writing(void) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ UI_character_type candidate_buffer[PEN_EDITOR_MAX_CANDIDATE_SIZE]; int num = 0; mmi_pen_editor_input_type_enum hand_writing_type; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ hand_writing_type = mmi_pen_editor_get_hand_writing_type_by_input_mode(MMI_current_input_mode); if (hand_writing_type != 0) { num = mmi_pen_editor_hand_writing_get_candidates( (U16*) gPenEditorStrokeBuffer, candidate_buffer, hand_writing_type, PEN_EDITOR_CANDIDATE_SIZE); switch (hand_writing_type) { case PEN_EDITOR_UPPER_CASE_ENGLISH: mmi_pen_editor_resort_candidates(candidate_buffer, num, PEN_EDITOR_SORT_CAPITAL_FIRST); break; case PEN_EDITOR_LOWER_CASE_ENGLISH: mmi_pen_editor_resort_candidates(candidate_buffer, num, PEN_EDITOR_SORT_NON_CAPITAL_FIRST); break; default: break; } } /* W05.33 Fix numeric_leading_zero issue make sure that the first candidate can be '0' */ { U8 temp = numeric_leading_zero; set_leading_zero(TRUE); /* W05.36 Check the Candidates List, if empty return 0 */ if (mmi_pen_editor_reset_candidate_and_composition_box(mmi_pen_editor_get_candidate_box(), candidate_buffer, num, MMI_TRUE)) { set_leading_zero(temp); } else { set_leading_zero(temp); return 0; } } gdi_layer_lock_frame_buffer(); mmi_pen_editor_hide_virtual_keyboard_area(); mmi_pen_editor_show_candidate_area(MMI_FALSE, PEN_EDITOR_CANDIDATE_ON_AND_FOCUS); gdi_layer_unlock_frame_buffer(); gdi_lcd_repaint_all(); return num; }
/*! * \brief 长按删除处理函数 * \param void * \return * \note * \example * \author weizhiping * \date 2010-10-9 9:49:00 */ void GBInputBox_DeleteAllHandler(void) { #if __MTK__ > 0 PCLayoutControl pLtCtl = Global_GetLayoutCtl(); gui_reset_clip(); gdi_layer_lock_frame_buffer(); gui_push_clip(); gui_push_text_clip(); // 循环清空引擎输入串内容 if (pLtCtl->engineOutputInfo.bCandWindOpen) { GBEngine_Reset(Global_GetEnineInstance()); //while (pEngineOutputInfo->.inputStringLen > 0) { //GBEventHandler(GBKEY_BACK, 0);//引擎pOutputString没有更新[BUG 611] } //GBIME_Paint(); } else // 清空编辑器输入框内容 { // if(!GBInputBoxIsEmpty() && gbCurInputBox.pfDeleteAll) // { // (*gbCurInputBox.pfDeleteAll)(); // } // mmi_imc_message_struct msg_ptr; // msg_ptr.message_id = MMI_IMC_MESSAGE_CLEAR_ALL; // msg_ptr.param_0 = 1; // msg_ptr.param_1 = 0; // mmi_imc_send_message( &msg_ptr ); GBInputBox_DeleteAll(); } gui_pop_clip(); gui_pop_text_clip(); gdi_layer_unlock_frame_buffer(); gdi_lcd_repaint_all(); // 重置功能按键及引擎状态并关闭候选框 //GBResetFuncKey(); //GBInputMethodReset(); //GBDrawCandWnd(1); #endif }