📄 wgui_ems_categories.c
字号:
extern void KonkaKey5PressHandler(void);
extern void KonkaKey6PressHandler(void);
extern void KonkaKey7PressHandler(void);
extern void KonkaKey8PressHandler(void);
extern void KonkaKey9PressHandler(void);
extern void KonkaKeyArrowUPHandler(void);
extern void KonkaKeyArrowRightHandler(void);
extern void KonkaKeyArrowDownHandler(void);
extern void KonkaKeyArrowLeftHandler(void);
extern void KonkaKeyStarPressHandler(void);
extern void KonkaKeyStarLongPressHandler(void);
extern void KonkaKeyHashPressHandler(void);
extern void KonkaKeyHashLongPressHandler(void);
extern void KonkaKeyLSKPressHandler(void);
extern void KonkaKeyLSKLongPressHandler(void);
extern void KonkaKeyRSKPressHandler(void);
extern void KonkaKeyRSKLongPressHandler(void);
extern void KonkaChangeInputMethod(INPUT_MODE inputMode);
extern void KonkaClearKeyStarAndPoundHandler();
extern void KonkaClearKeyNavigationHandler();
extern void KonkaClearKey0To9Handler();
extern void KonkaInuptMethodEnterCategory28(void);
extern void KonkaInuptMethodExitCategory28(void);
extern void KonkaDisplay(void);
extern void KonkaInputBoxScreenStateChange(void);
#elif defined __MMI_ITAP__
#include "iTapHmiDef.h"
#include "iTapHmiStruct.h"
#include "iTapHmiGprot.h"
#elif defined(__MMI_GB__) //OK
#include "gb_wrapper.h"
#endif
//PMT dara added for Multitap thai
#ifdef __MMI_MULTITAP_THAI__
void handle_category28_change_input_mode_bymultitapthai(void);
#endif
byte EMS_inputbox_check_multitap_thai_input(UI_character_type inputchar,byte *updatef);
extern void handle_category28_change_input_mode(void);
extern void wgui_set_EMS_inputbox_RSK(void);
extern void wgui_EMS_redraw_input_information_bar(void);
extern void pixtel_UI_EMS_change_DCS(UI_EMS_input_box *b);
#ifdef __MMI_MESSAGES_EMS__
extern void EMS_cancel_object_focus(void);
#endif
//MTK end
//MTK Elvis
extern U16 StopMyTimer(U16 nTimerId);
extern U16 StartMyTimerInt(U16 nTimerId,U32 nTimeDuration,oslTimerFuncPtr TimerExpiry, U8 alignment);
//MTK end
//W05.36 Fix Vietnamese Tone Input Issue
extern void set_current_input_box_type(mmi_editor_inoutbox_enum input_box_type);
//MTK Elvis for prefered input method
extern S16 MMI_prefered_input_type;
//MTK end
extern void dm_set_scr_bg_image_no_draw(U16 image_id, S8* file_name, S32 x, S32 y, U8 opacity);//092005 grayscale Calvin
/* Functions for 7-bit GSM character set encoding */
#define EMS_ESCAPE_CHARACTER (27)
#define EMS_SPACE_CHARACTER (32)
#define EMS_CR_CHARACTER (13)
#define EMS_EURO_CHARACTER_UCS2 (0x20AC)
#define EMS_EURO_CHARACTER (0xA2)
extern const U8 AsciiToDefaultArray[];
extern const U8 ExtendedAsciiToDefaultArray[];
extern const U8 DefaultToExtendedAsciiArray[];
extern const U8 DefaultToAsciiArray[];
/* 070505 Calvin Start */
#if defined (__MMI_WALLPAPER_ON_BOTTOM__)
static UI_image_ID_type editor_scr_bg_ID;
static S8* editor_scr_bg_filename;
static S32 editor_scr_bg_x, editor_scr_bg_y;
static U8 editor_scr_bg_opacity;//070505 Calvin added
#endif
/* 070505 Calvin End */
extern U8 PhnsetGetDefEncodingType(void);
//START VIKAS PMT 20051217
#ifdef UI_SMALL_IMAGE_SELECTOR_SCREEN
small_image_selector_struct small_image_selector;
#endif
//END VIKAS PMT 20051217
/*MTK Terry for RSK Display*/
void handle_category28_input(void);
#if(!UI_DISABLE_EMS_CATEGORY_SCREENS)
#if(!EMS_USE_GSM_EXTENDED)
/* Call after EMSUnpack */
void EMS_ConvertGSM7BitDefaultEncodingToAscii(EMSData *data)
{ U16 c,OffsetToText;
U8* textBuffer=data->textBuffer;
U16 textBufferLength=data->textLength;
if(textBuffer==NULL) return;
ResetCurrentPosition(data);
while((OffsetToText=data->CurrentPosition.OffsetToText)<textBufferLength)
{
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
c=(U16)(textBuffer[OffsetToText+1]|(textBuffer[OffsetToText]<<8));
#else
c=(U16)(textBuffer[OffsetToText]|(textBuffer[OffsetToText+1]<<8));
#endif
if((c&0xff00)!=0)
{
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
textBuffer[OffsetToText+1]=(U8)(c&0xff);
textBuffer[OffsetToText+0]=(U8)(c>>8);
#else
textBuffer[OffsetToText]=(U8)(c&0xff);
textBuffer[OffsetToText+1]=(U8)(c>>8);
#endif
}
else if(c==EMS_ESCAPE_CHARACTER)
{ c=EMS_SPACE_CHARACTER;
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
textBuffer[OffsetToText+1]=(U8)(c&0xff);
textBuffer[OffsetToText+0]=(U8)(c>>8);
#else
textBuffer[OffsetToText]=(U8)(c&0xff);
textBuffer[OffsetToText+1]=(U8)(c>>8);
#endif
}
else
{ if(c==EMS_CR_CHARACTER)
{ ForwardCurrentPosition(data,1);
CancelCurrentPosition(data,1);
BackwardCurrentPosition(data,1);
}
else
{
c=DefaultToAsciiArray[c];
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
textBuffer[OffsetToText+1]=(U8)(c&0xff);
textBuffer[OffsetToText+0]=(U8)(c>>8);
#else
textBuffer[OffsetToText]=(U8)(c&0xff);
textBuffer[OffsetToText+1]=(U8)(c>>8);
#endif
}
}
if(ForwardCurrentPosition(data,1)!=1) break;
}
ResetCurrentPosition(data);
}
/* Call before EMSPack */
void EMS_ConvertAsciiEncodingToGSM7BitDefault(EMSData *data)
{ U16 c,OffsetToText;
U8* textBuffer=data->textBuffer;
U16 textBufferLength=data->textLength;
if(textBuffer==NULL) return;
ResetCurrentPosition(data);
while((OffsetToText=data->CurrentPosition.OffsetToText)<textBufferLength)
{
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
c=(U16)(textBuffer[OffsetToText+1]|(textBuffer[OffsetToText]<<8));
#else
c=(U16)(textBuffer[OffsetToText]|(textBuffer[OffsetToText+1]<<8));
#endif
if((c&0xff00)==0)
{
c=AsciiToDefaultArray[c];
}
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
textBuffer[OffsetToText+1]=(U8)(c&0xff);
textBuffer[OffsetToText+0]=(U8)(c>>8);
#else
textBuffer[OffsetToText]=(U8)(c&0xff);
textBuffer[OffsetToText+1]=(U8)(c>>8);
#endif
if(ForwardCurrentPosition(data,1)!=1) break;
}
ResetCurrentPosition(data);
}
#if defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__)
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
/* under construction !*/
#else
/* under construction !*/
#endif
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#else
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif
/* under construction !*/
/* under construction !*/
/* under construction !*/
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
/* under construction !*/
/* under construction !*/
#else
/* under construction !*/
/* under construction !*/
#endif
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
/* under construction !*/
#else
/* under construction !*/
#endif
/* under construction !*/
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
/* under construction !*/
/* under construction !*/
#else
/* under construction !*/
/* under construction !*/
#endif
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
/* under construction !*/
#else
/* under construction !*/
#endif
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
/* under construction !*/
#else
/* under construction !*/
#endif
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
/* under construction !*/
/* under construction !*/
#else
/* under construction !*/
/* under construction !*/
#endif
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
/* under construction !*/
#else
/* under construction !*/
#endif
/* under construction !*/
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
/* under construction !*/
/* under construction !*/
#else
/* under construction !*/
/* under construction !*/
#endif
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#else
/* Call after EMSUnpack */
void EMS_ConvertGSM7BitDefaultEncodingToAsciiWithExtended(EMSData *data)
{ U16 c,OffsetToText;
U8* textBuffer=data->textBuffer;
U16 textBufferLength=data->textLength;
if(textBuffer==NULL) return;
ResetCurrentPosition(data);
if(data->dcs==SMSAL_DEFAULT_DCS)
{
while((OffsetToText=data->CurrentPosition.OffsetToText)<textBufferLength)
{
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
c=(U16)(textBuffer[OffsetToText+1]|(textBuffer[OffsetToText]<<8));
#else
c=(U16)(textBuffer[OffsetToText]|(textBuffer[OffsetToText+1]<<8));
#endif
if((c&0xff00)!=0)
{
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
textBuffer[OffsetToText+1]=(U8)(c&0xff);
textBuffer[OffsetToText+0]=(U8)(c>>8);
#else
textBuffer[OffsetToText]=(U8)(c&0xff);
textBuffer[OffsetToText+1]=(U8)(c>>8);
#endif
}
else if(c==EMS_ESCAPE_CHARACTER)
{
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
textBuffer[OffsetToText+1]=(U8)(c&0xff);
textBuffer[OffsetToText+0]=(U8)(c>>8);
// if(ForwardCurrentPosition(data,1)!=1) break;
data->CurrentPosition.OffsetToText += 2;
if((OffsetToText=data->CurrentPosition.OffsetToText)>=textBufferLength) break;
OffsetToText=data->CurrentPosition.OffsetToText;
c=(U16)(textBuffer[OffsetToText+1]|(textBuffer[OffsetToText]<<8));
c=DefaultToExtendedAsciiArray[c];
if(c==0x00)
{
CancelCurrentPosition(data, 1);
data->CurrentPosition.OffsetToText -= 2;
}
else
{
textBuffer[OffsetToText+1]=(U8)(c&0xff);
textBuffer[OffsetToText+0]=(U8)(c>>8);
}
#else
textBuffer[OffsetToText]=(U8)(c&0xff);
textBuffer[OffsetToText+1]=(U8)(c>>8);
// if(ForwardCurrentPosition(data,1)!=1) break;
data->CurrentPosition.OffsetToText += 2;
OffsetToText=data->CurrentPosition.OffsetToText;
c=(U16)(textBuffer[OffsetToText]|(textBuffer[OffsetToText+1]<<8));
c=DefaultToExtendedAsciiArray[c];
if(c==0x00)
{
CancelCurrentPosition(data, 1);
data->CurrentPosition.OffsetToText -= 2;
}
else
{
textBuffer[OffsetToText]=(U8)(c&0xff);
textBuffer[OffsetToText+1]=(U8)(c>>8);
}
#endif
}
else
{ c=DefaultToAsciiArray[c];
#if(EMS_BYTE_ORDER_BIG_ENDIAN)
textBuffer[OffsetToText+1]=(U8)(c&0xff);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -