mmibookshared.c
来自「是一个手机功能的模拟程序」· C语言 代码 · 共 1,349 行 · 第 1/5 页
C
1,349 行
#define MENU_ITEM( msg, handler, attrFunction ) \
{ 0,0,0, (char *) msg, 0, (MenuFunc)handler, attrFunction }
#define MENU_ITEM_SUB_MENU( msg, sub_menu,handler, attrFunction ) \
{ 0,0,0, (char *) msg, (MfwMnuAttr*) &sub_menu,(MenuFunc)handler, attrFunction }
#define SUB_MENU( msg, sub_menu, attrFunction ) \
{ 0,0,0, (char *) msg, (MfwMnuAttr*) &sub_menu, 0, attrFunction }
#define END_MENU( name, area ) \
}; \
\
static const MfwMnuAttr name = { \
0, (MfwRect *) &area, DEF_MENU_STYLE, -1, (MfwMnuItem *) name##Items, sizeof( name##Items ) / sizeof( MfwMnuItem ) \
};
#define DEF_MENU_VIEWLIST_STYLE (MNU_CENTER| MNU_VIEWLIST | MNU_CUR_LINE)
#define BEGIN_ICON_MENU( name ) \
static const MfwMnuItem name##Items [] = {
#define MENU_ICON_ITEM( icon, msg, handler, attrFunction ) \
{ (MfwIcnAttr *)icon,0,0, (char *) msg, 0, (MenuFunc)handler, attrFunction }
#define SUB_ICON_MENU( icon,msg, sub_menu, attrFunction ) \
{ (MfwIcnAttr *)icon,0,0, (char *) msg, (MfwMnuAttr*) &sub_menu, 0, attrFunction }
#define END_ICON_MENU( name, area ) \
}; \
\
static const MfwMnuAttr name = { \
0,(MfwRect *) &area, DEF_MENU_VIEWLIST_STYLE, -1, (MfwMnuItem *) name##Items, sizeof( name##Items ) / sizeof( MfwMnuItem ) \
};
//2004/05/25 yhf add
#define END_TITLEICON_NOTITLE_MENU( name, area, titleicon ) \
}; \
\
static const MfwMnuAttr name = { \
(T_Titleicon) titleicon, (MfwRect *) &area, DEF_MENU_TITLEICON_STYLE|MNU_NOTITLE, -1, (MfwMnuItem *) name##Items, sizeof( name##Items ) / sizeof( MfwMnuItem ) \
};
/***********************zy change define TITLE ICON_MENU**********************************/
#define DEF_MENU_TITLEICON_STYLE (MNU_LEFT | MNU_OVERLAPPED | MNU_CUR_LINE)
#define BEGIN_TITLEICON_MENU( name ) \
static const MfwMnuItem name##Items [] = {
#define MENU_LISTICON_ITEM( icon, msg, handler, attrFunction ) \
{ (MfwIcnAttr *)icon,0,0, (char *) msg, 0, (MenuFunc)handler, attrFunction }
#define LISTICON_SUB_MENU_ITEM(icon, msg, sub_menu,handler, attrFunction ) \
{ (MfwIcnAttr *)icon,0,0, (char *) msg, (MfwMnuAttr*) &sub_menu,(MenuFunc)handler, attrFunction }//zy add for both submenu and function
#define SUB_LISTICON_MENU( icon,msg, sub_menu, attrFunction ) \
{ (MfwIcnAttr *)icon,0,0, (char *) msg, (MfwMnuAttr*) &sub_menu, 0, attrFunction }
#define END_TITLEICON_MENU( name, area, titleicon ) \
}; \
\
static const MfwMnuAttr name = { \
(T_Titleicon) titleicon, (MfwRect *) &area, DEF_MENU_TITLEICON_STYLE, -1, (MfwMnuItem *) name##Items, sizeof( name##Items ) / sizeof( MfwMnuItem ) \
};
/***********************zy change define LISTICON_MENU**********************************/
#define DEF_MENU_LISTICON_STYLE (MNU_LEFT | MNU_OVERLAPPED | MNU_CUR_LINE)
#define BEGIN_LISTICON_MENU( name ) \
static const MfwMnuItem name##Items [] = {
#define MENU_LISTICON_ITEM( icon, msg, handler, attrFunction ) \
{ (MfwIcnAttr *)icon,0,0, (char *) msg, 0, (MenuFunc)handler, attrFunction }
#define LISTICON_SUB_MENU_ITEM(icon, msg, sub_menu,handler, attrFunction ) \
{ (MfwIcnAttr *)icon,0,0, (char *) msg, (MfwMnuAttr*) &sub_menu,(MenuFunc)handler, attrFunction }//zy add for both submenu and function
#define SUB_LISTICON_MENU( icon,msg, sub_menu, attrFunction ) \
{ (MfwIcnAttr *)icon,0,0, (char *) msg, (MfwMnuAttr*) &sub_menu, 0, attrFunction }
#define LISTICON_MENU_ITEM_SUB_MENU(icon, msg, sub_menu,handler, attrFunction ) \
{ (MfwIcnAttr *)icon,0,0, (char *) msg, (MfwMnuAttr*) &sub_menu,(MenuFunc)handler, attrFunction }
//zy add
#define END_LISTICON_MENU( name, area ) \
}; \
\
static const MfwMnuAttr name = { \
0, (MfwRect *) &area, DEF_MENU_LISTICON_STYLE, -1, (MfwMnuItem *) name##Items, sizeof( name##Items ) / sizeof( MfwMnuItem ) \
};
/********************end of zy changed*************************************************/
#define CFFaxDataFlag 1 //hubinhao 2003-2-11
/*..........................................zy change for pagemenu 04/08/02....................................*/
#define DEF_MENU_PAGED_STYLE (MNU_LEFT | MNU_PAGED | MNU_CUR_LINE)
#define BEGIN_ICONONE_MENU( name ) \
static const MfwMnuItem name##Items [] = {
#define MENU_ICON_ITEM( icon, msg, handler, attrFunction ) \
{ (MfwIcnAttr *)icon,0,0, (char *) msg, 0, (MenuFunc)handler, attrFunction }
#define SUB_ICON_MENU( icon,msg, sub_menu, attrFunction ) \
{ (MfwIcnAttr *)icon,0,0, (char *) msg, (MfwMnuAttr*) &sub_menu, 0, attrFunction }
#define END_ICONONE_MENU( name, area ) \
}; \
\
static const MfwMnuAttr name = { \
0, (MfwRect *) &area, DEF_MENU_PAGED_STYLE, -1, (MfwMnuItem *) name##Items, sizeof( name##Items ) / sizeof( MfwMnuItem ) \
};
/* 2004/06 sunsj modify for icon manage */
extern MfwIcnAttr colist[];
extern MfwIcnAttr situationIcon[];
extern MfwIcnAttr situation3Icon[];
extern MfwIcnAttr situation4Icon[];
/*.......................................... end of zy change for pagemenu 04/08/02....................................*/
#ifdef MMI_WAP_ENABLED
/*
* WAP menus
*/
// Scale Images sub-menu
BEGIN_MENU( menuScaleImages )
MENU_LISTICON_ITEM( &situationIcon,TxtOff, (MenuFunc)AUI_scaleimages_set, options_check ),
MENU_LISTICON_ITEM( &situationIcon,TxtOn, (MenuFunc)AUI_scaleimages_set, options_check )
/* END_MENU( menuScaleImages, menuListArea, menuup ) */
END_MENU( menuScaleImages, menuListArea )
// Save History sub-menu
BEGIN_MENU( menuSaveHistory )
MENU_LISTICON_ITEM( &situationIcon,TxtOff, (MenuFunc)AUI_savehist_set, options_check ),
MENU_LISTICON_ITEM( &situationIcon,TxtOn, (MenuFunc)AUI_savehist_set, options_check )
END_MENU( menuSaveHistory, menuListArea )
//END_MENU( menuSaveHistory, menuListArea )
// Access Type sub-menu
BEGIN_MENU( menuAccessType )
MENU_LISTICON_ITEM(&situationIcon, TxtGPRSData, (MenuFunc)AUI_access_set, options_check ),
MENU_LISTICON_ITEM(&situationIcon, TxtCSData, (MenuFunc)AUI_access_set, options_check ),
MENU_LISTICON_ITEM(&situationIcon, TxtSMS, (MenuFunc)AUI_access_set, options_check )
END_MENU( menuAccessType, menuListArea )
//END_MENU( menuAccessType, menuListArea )
// Security sub-menu
BEGIN_MENU( menuSecurityOption )
MENU_LISTICON_ITEM(&situationIcon, TxtOff, (MenuFunc)AUI_security_set, options_check ),
MENU_LISTICON_ITEM(&situationIcon, TxtOn, (MenuFunc)AUI_security_set, options_check )
END_MENU( menuSecurityOption, menuListArea )
//END_MENU( menuSecurityOption, menuListArea )
// Connection Type sub-menu
BEGIN_MENU( menuWAPConnectionType )
MENU_LISTICON_ITEM( &situationIcon,TxtTemporary, (MenuFunc)AUI_connectionType_set,options_check ),
MENU_LISTICON_ITEM( &situationIcon,TxtContinuous, (MenuFunc)AUI_connectionType_set,options_check ),
END_MENU( menuWAPConnectionType, menuListArea )
//END_MENU( menuWAPConnectionType, menuListArea )
// Setup profiles options
BEGIN_MENU( menuSetupProfilesOptions )
MENU_LISTICON_ITEM( &colist,TxtEditName, (MenuFunc)AUI_profile_name_edit, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtHomepage, (MenuFunc)AUI_homepage_edit, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtConnectionType, AUI_connectionType, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtSecurity, AUI_security, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtAccessType, AUI_access, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtResponseTimer, (MenuFunc)AUI_response_timer, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtIPAddress1, (MenuFunc)AUI_IPAddress1, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtIPAddress2, (MenuFunc)AUI_IPAddress2, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtPort1, (MenuFunc)AUI_Port1, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtPort2, (MenuFunc)AUI_Port2, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtAPN, (MenuFunc)AUI_APN, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtDialupNumber, (MenuFunc)AUI_dialupNumber, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtISPUsername, (MenuFunc)AUI_username, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtISPPassword, (MenuFunc)AUI_password, item_flag_none)
END_MENU( menuSetupProfilesOptions, menuListArea )
//END_MENU( menuSetupProfilesOptions, menuListArea )
// Setup sub-menu
BEGIN_MENU( menuWAPSettings )
MENU_LISTICON_ITEM( &colist,TxtSelectProfile, (MenuFunc)AUI_profiles_list, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtSetupProfiles, (MenuFunc)AUI_profiles_setup, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtSaveHistory, AUI_savehist, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtScaleImages, AUI_scaleimages, item_flag_none )
END_MENU( menuWAPSettings, menuListArea )
//END_MENU( menuWAPSettings, menuListArea )
// History Options sub-menu
BEGIN_MENU( menuHistoryOptions )
MENU_LISTICON_ITEM( &colist,TxtGoTo, AUI_history_goto, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtEditName, AUI_history_edit, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtEditURL, AUI_history_edit_url, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtDelete, AUI_history_delete, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtSend, AUI_history_sendSMS, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtBookmark, AUI_history_addbook, item_flag_none )
END_MENU( menuHistoryOptions, menuListArea )
//END_MENU( menuHistoryOptions, menuListArea )
// History sub-menu
BEGIN_MENU( menuHistory )
MENU_LISTICON_ITEM( &colist,TxtLIST, AUI_history_list, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtClear, AUI_history_clear, item_flag_none )
END_MENU( menuHistory, menuListArea )
//END_MENU( menuHistory, menuListArea )
// GoTo sub-menu
BEGIN_MENU( menuGoTo )
MENU_LISTICON_ITEM( &colist,TxtWWWdot, AUI_goto_www, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtWAPdot, AUI_goto_wap, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtOther, AUI_goto_other, item_flag_none )
END_MENU( menuGoTo, menuListArea )
//END_MENU( menuGoTo, menuListArea )
// Bookmark Options sub-menu
BEGIN_MENU( menuBookmarkOptions )
MENU_LISTICON_ITEM( &colist,TxtGoTo, AUI_bookmarks_goto, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtEditName, AUI_bookmarks_edit, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtEditURL, AUI_bookmarks_edit_url, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtDelete, AUI_bookmarks_delete, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtSend, AUI_bookmarks_sendSMS, item_flag_none )
END_MENU( menuBookmarkOptions, menuListArea )
//END_MENU( menuBookmarkOptions, menuListArea )
// New Bookmark sub-menu
BEGIN_MENU( menuNewBookmark )
MENU_LISTICON_ITEM( &colist,TxtWWWdot, AUI_bookmarks_add_www, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtWAPdot, AUI_bookmarks_add_wap, item_flag_none ),
MENU_LISTICON_ITEM( &colist,TxtOther, AUI_bookmarks_add_other, item_flag_none )
END_MENU( menuNewBookmark, menuListArea )
//END_MENU( menuNewBookmark, menuListArea )
// Bookmarks sub-menu
BEGIN_MENU( menuBookmarks )
MENU_LISTICON_ITEM( &colist,TxtLIST, AUI_bookmarks_list, item_flag_none ),
SUB_LISTICON_MENU( &colist,TxtNewBookmark, menuNewBookmark, item_flag_none )
END_MENU( menuBookmarks, menuListArea )
//END_MENU( menuBookmarks, menuListArea )
// WAP Menu
BEGIN_TITLEICON_MENU( menuWAP )
MENU_LISTICON_ITEM( &colist,TxtHomepage, AUI_homepage, item_flag_none ),
SUB_LISTICON_MENU( &colist,TxtBookmarks, menuBookmarks, item_flag_none ),
SUB_LISTICON_MENU(&colist,TxtGoTo, menuGoTo, item_flag_none ),
SUB_LISTICON_MENU( &colist,TxtHistory, menuHistory, item_flag_none ),
SUB_LISTICON_MENU( &colist,TxtSettings, menuWAPSettings, item_flag_none )
END_TITLEICON_MENU( menuWAP, menuListArea,wapTitleicon )
//END_TITLEICON_MENU( menuWAP, menuListArea,wapTitleicon )
#endif
BEGIN_LISTICON_MENU( menuCBLanguage )
MENU_LISTICON_ITEM(&situation3Icon,T_CBLanguageAll , SetLangAll, CBLanguage_check ), //HostkeySwitchOn
MENU_LISTICON_ITEM(&situation3Icon,T_CBLanguageNone , SetLangNone, CBLanguage_check ), // HostkeySimLock
MENU_LISTICON_ITEM(&situation3Icon,T_CBGerman , SetLangGer, CBLanguage_check ), // HostkeyDelPbkall
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?