首页 PRST_Menu_CUI_Introduction_10A_Latest

PRST_Menu_CUI_Introduction_10A_Latest

举报
开通vip

PRST_Menu_CUI_Introduction_10A_Latest Confidential B Menu CUI IntroductionMenu CUI Introduction Copyright © MediaTek Inc. All rights reserved. MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B AgendaAgenda ▪ Background ▪ In...

PRST_Menu_CUI_Introduction_10A_Latest
Confidential B Menu CUI IntroductionMenu CUI Introduction Copyright © MediaTek Inc. All rights reserved. MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B AgendaAgenda ▪ Background ▪ Introduction ▪ Example ▪ Implementation 2 MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B BackgroundBackground ▪ There is no general behavior for menu browsing ▪ APP has to write lots of codes to traverse menu tree, hilight / hint handler, set soft-key label / functions… ▪ It is not easy to adjust menu tree ▪ It is difficult to change UI style, like cascading menu 3 ▪ It is difficult to change UI style, like cascading menu ▪ It is not easy to apply different UE behavior MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B IntroductionIntroduction ▪ Concept Menu browsing Look & feel resource tree leaf item 4 Look & feel User interaction Menu behavior … APP create tree leaf item handling APP menu CUI MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B IntroductionIntroduction void EntryAPP(void) { EntryNewScreen(…); GetCurrGuiBuffer(…); GetNumOfChild(…); GetSequenceStringIds(…); SetParentHandler(…); RegisterHighlightHandler(…); ConstructHintsList(…); ShowCategory52Screen(…); SetKeyHandler(…); SetRightSoftkeyFunction(…); } void HighlightxxxA(void) { ChangeLeftSoftkey(…); ChangeRightSoftkey(…); SetRightSoftkeyFunction(…); return; } void HighlightxxxB(void) { ChangeLeftSoftkey(…); ChangeRightSoftkey(…); SetRightSoftkeyFunction(…); return; } … void EntryAPP(void) { EntryNewScreen(…); GetCurrGuiBuffer(…); GetNumOfChild(…); GetSequenceStringIds(…); SetParentHandler(…); RegisterHighlightHandler(…); ConstructHintsList(…); ShowCategory52Screen(…); SetKeyHandler(…); SetRightSoftkeyFunction(…); } void HighlightxxxA(void) { ChangeLeftSoftkey(…); ChangeRightSoftkey(…); SetRightSoftkeyFunction(…); return; } void HighlightxxxB(void) { ChangeLeftSoftkey(…); ChangeRightSoftkey(…); SetRightSoftkeyFunction(…); return; } … void EntryAPP(void)Before 5 Menu CUI void EntryAPP(void) { menu_gid = cui_menu_create (…); cui_menu_set_xxx (…); … cui_menu_run(menu_gid); } S32 mmi_myapp_proc(mmi_event_struct *evt) { switch (evt->evt_id) { case MENU_A: launch_screen_A(); break; } return MMI_TRUE; } Before After MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B IntroductionIntroduction ▪ Target on static menu – Menu is a collection of functions (open, save, etc.), instead of data list (phone book entry, message inbox, etc.) ▪ Reduce the effort to use menu trees in APP – How to display and traverse a menu will be encapsulated in menu CUI 6 ▪ Easy to adjust the order of menu items in one menu tree – There is no menu tree knowledge binding with APP’s logic code ▪ Uniform the UI presentation and UE behavior of menu – E.g. apply cascading menu for options MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B IntroductionIntroduction ▪ Architecture Application menu Option menu Application Static and general menu Common UI style Common menu layout 7 WGUI / GUI List category Menu common UI Dynamic and custom menu Common menu layout Common behavior Different UI layout Complex interaction with GUI 10A Screen Group Based on screen group MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B Hello world Hello world –– beforebefore void EntryPhnsetScr(void) { EntryNewScreen(SCR9003_INITIALSETUP, NULL, EntryPhnsetScr, NULL); guiBuffer = GetCurrGuiBuffer(SCR9003_INITIALSETUP); nNumofItem = GetNumOfChild_Ext(MENU9102_INITIAL_SETUP); nDispAttribute = GetDispAttributeOfItem(MENU9102_INITIAL_SETUP); GetSequenceStringIds_Ext(MENU9102_INITIAL_SETUP, nStrItemList); SetParentHandler(MENU9102_INITIAL_SETUP); RegisterHighlightHandler(ExecuteCurrHiliteHandler); ConstructHintsList(MENU9102_INITIAL_SETUP, ItemType); ShowCategory52Screen( STR_MENU9102_INITIAL_SETUP, MAIN_MENU_TITLE_SETTINGS_ICON, STR_GLOBAL_OK, void HighlightPhnsetWelcomeText(void) { ChangeLeftSoftkey( STR_GLOBAL_OK, IMG_GLOBAL_OK); ChangeRightSoftkey( STR_GLOBAL_BACK, IMG_GLOBAL_BACK); SetLeftSoftkeyFunction( EntryPhnsetWelcomeText, KEY_EVENT_UP); SetKeyHandler( EntryPhnsetWelcomeText, KEY_RIGHT_ARROW, KEY_EVENT_DOWN); SetRightSoftkeyFunction( GoBackHistory, KEY_EVENT_UP); SetKeyHandler( GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN); } void HighlightPhnsetScr(void) { 8 STR_GLOBAL_OK, IMG_GLOBAL_OK, STR_GLOBAL_BACK, IMG_GLOBAL_BACK, nNumofItem, nStrItemList, (PU16) gIndexIconsImageList, ItemType, 0, 0, guiBuffer); SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP); SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN); } { ChangeLeftSoftkey( STR_GLOBAL_OK, IMG_GLOBAL_OK); ChangeRightSoftkey( STR_GLOBAL_BACK, IMG_GLOBAL_BACK); SetKeyHandler( GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN); SetLeftSoftkeyFunction( EntryPhnsetScr, KEY_EVENT_UP); SetKeyHandler( EntryPhnsetScr, KEY_RIGHT_ARROW, KEY_EVENT_DOWN); SetRightSoftkeyFunction( GoBackHistory, KEY_EVENT_UP); } MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B Hello world Hello world –– after (1/2)after (1/2) void EntryPhnsetScr(void) { phnsetup_gid = mmi_frm_group_create( GRP_ID_ROOT, GRP_ID_AUTO_GEN, Phnsetup_proc, (void*)NULL); mmi_frm_group_enter(phnsetup_gid, 0); mmi_id menu_gid = cui_menu_create(phnsetup_gid, CUI_MENU_SRC_TYPE_RESOURCE, CUI_MENU_TYPE_APPSUB, 9 CUI_MENU_TYPE_APPSUB, MENU9102_INITIAL_SETUP, MMI_TRUE, NULL); cui_menu_run(child_menu_gid); } MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B Hello world Hello world –– after (2/2)after (2/2) mmi_ret Phnsetup_proc(mmi_event_struct *evt) { cui_menu_event_struct *menu_evt = (cui_menu_event_struct*)evt; switch (menu_evt->evt_id) { case EVT_ID_CUI_MENU_ITEM_SELECT: if(menu_evt->menu_id == MENU_SETTING_LANGUAGE) { // handle leaf node item 10 // handle leaf node item } break; case EVT_ID_CUI_MENU_CLOSE_REQUEST: cui_menu_close(menu_evt->sender_id); break; } return MMI_RET_OK; } MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B Phone setup example: Application menuPhone setup example: Application menu 11 MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B Phone setup example: Application menuPhone setup example: Application menu void EntryAPP(void) { EntryNewScreen(…); GetCurrGuiBuffer(…); GetNumOfChild(…); GetSequenceStringIds(…); SetParentHandler(…); RegisterHighlightHandler(…); ConstructHintsList(…); ShowCategory52Screen(…); SetKeyHandler(…); SetRightSoftkeyFunction(…); } void HighlightxxxA(void) { ChangeLeftSoftkey(…); ChangeRightSoftkey(…); SetRightSoftkeyFunction(…); return; } void HighlightxxxB(void) { ChangeLeftSoftkey(…); ChangeRightSoftkey(…); SetRightSoftkeyFunction(…); return; } void EntryAPP(void) { EntryNewScreen(…); GetCurrGuiBuffer(…); GetNumOfChild(…); GetSequenceStringIds(…); SetParentHandler(…); RegisterHighlightHandler(…); ConstructHintsList(…); ShowCategory52Screen(…); SetKeyHandler(…); SetRightSoftkeyFunction(…); } void HighlightxxxA(void) { ChangeLeftSoftkey(…); ChangeRightSoftkey(…); SetRightSoftkeyFunction(…); return; } void HighlightxxxB(void) { ChangeLeftSoftkey(…); ChangeRightSoftkey(…); SetRightSoftkeyFunction(…); return; } void EntryAPP(void) { EntryNewScreen(…); GetCurrGuiBuffer(…); GetNumOfChild(…); GetSequenceStringIds(…); SetParentHandler(…); RegisterHighlightHandler(…); ConstructHintsList(…); ShowCategory52Screen(…); SetKeyHandler(…); SetRightSoftkeyFunction(…); } void HighlightxxxA(void) { ChangeLeftSoftkey(…); ChangeRightSoftkey(…); SetRightSoftkeyFunction(…); return; } void HighlightxxxB(void) { ChangeLeftSoftkey(…); ChangeRightSoftkey(…); SetRightSoftkeyFunction(…); return; } void EntryAPP(void) { EntryNewScreen(…); GetCurrGuiBuffer(…); GetNumOfChild(…); GetSequenceStringIds(…); SetParentHandler(…); RegisterHighlightHandler(…); ConstructHintsList(…); ShowCategory52Screen(…); SetKeyHandler(…); SetRightSoftkeyFunction(…); } void HighlightxxxA(void) { ChangeLeftSoftkey(…); ChangeRightSoftkey(…); SetRightSoftkeyFunction(…); return; } void HighlightxxxB(void) { ChangeLeftSoftkey(…); ChangeRightSoftkey(…); SetRightSoftkeyFunction(…); return; } 12 } … } … } … } …void EntryAPP(void) { EntryNewScreen(…); GetCurrGuiBuffer(…); GetNumOfChild(…); GetSequenceStringIds(…); SetParentHandler(…); RegisterHighlightHandler(…); ConstructHintsList(…); ShowCategory52Screen(…); SetKeyHandler(…); SetRightSoftkeyFunction(…); } void HighlightxxxA(void) { ChangeLeftSoftkey(…); ChangeRightSoftkey(…); SetRightSoftkeyFunction(…); return; } void HighlightxxxB(void) { ChangeLeftSoftkey(…); ChangeRightSoftkey(…); SetRightSoftkeyFunction(…); return; } … MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B Phone setup example: Application menuPhone setup example: Application menu Menu Common UI –––– Application Menu 13 MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B Phone setup example: Application menuPhone setup example: Application menu Menu Common UI –––– Application Menu void EntryAPP(void) { menu_gid = cui_menu_create (…); cui_menu_set_xxx (…); … cui_menu_run(menu_gid); } S32 mmi_myapp_proc(mmi_event_struct *evt) { switch (evt->evt_id) { case MENU_A: 14 case MENU_A: launch_screen_A(); break; } return MMI_TRUE; } MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B IntroductionIntroduction ▪ Overview – Different menu types • Option menu – Those menus from LSK “Option”, at most 2 levels. • Application menu (APP_MAIN & APP_SUB) – APP_MAIN ▪ APP’s entry (1st) main menu screen – APP_SUB 15 – APP_SUB ▪ Those static text full screen menu which is not APP_MAIN and Option menu in APP’s screen flow. – Different menu-item UI layout • Can support one icon / two icons / check-box / radio button MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B ▪ Menu type ImplementationImplementation Application menu (APP_MAIN + APP_SUB) Option menu Layout Full screen Full screen or cascaded 16 Support Hide, grey, check-box, radio button Hide, grey, check-box, radio button Menuitem Icon + text Text (follow BD’s rule) Default softkey label OK + Back Select + Back (follow BD’s rule) Can be interrupt Yes (follow BD’s rule) No (follow BD’s rule) MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B browsing menu tree MSCMSC APP Menu CUI FW cui_menu_create mmi_frm_group_create cui_menu_set_xxx cui_menu_run 17 browsing menu tree cui_menu_close mmi_frm_group_close cui_menu_set_xxx mmi_frm_group_send_to_caller(APP proc) MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B Event proc flowEvent proc flow Menu Common UI Application Application 18 Application proc switch ( ) { case EXIT case ENTRY case HILIGHT case SELECT case CLOSE } MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B ImplementationImplementation Event Description What can we do LIST_ENTRY Entry one level of menu tree Edit title, softkey, menu-item text and hint LIST_EXIT Exit one level of menu tree Get status from CUI ITEM_HILITE Highlight one menu-item Edit softkey, hint ITEM_SELECT Select one menu-item Entry new screen, exit CUI ▪ Event types 19 ITEM_TAP Tap select one menu-item Entry new screen, exit CUI ITEM_CSK_SELECT CSK select one menu-item Entry new screen, exit CUI CLOSE_REQUEST Close menu CUI request Close CUI MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B ImplementationImplementation ▪ Event structure Structure ENTRY HILITE SELECT EXIT CLOSE evt_id what kind of event user_data Application’s user data sender_id menu CUI screen group ID parent_menu_id currlist_id currlist_id currlist_id prevlist_id 0 20 highlighted_menu_id 0 highlighted_id highlighted_id 0 0 cui_menu_event_flags special flags for the event app_data Application’s data (from cui_menu_create) MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B ImplementationImplementation ▪ File structure – mcu \ plutommi \ CUI \ Inc \ menucuigprot.h • Menu CUI header for external interface – mcu \ plutommi \ CUI \ MenuCui \ MenuCui.c • Menu CUI internal source codes – mcu \ plutommi \ CUI \ MenuCui \ MenuCui.h • Menu CUI internal header file 21 • Menu CUI internal header file MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B Hello world Hello world –– APP creat treeAPP creat tree 22 MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B Hello world Hello world –– APP creat treeAPP creat tree voidmy_app(void) { my_app_gid = mmi_frm_group_create( GRP_ID_ROOT, GRP_ID_AUTO_GEN, my_app_proc, (void*)NULL); mmi_frm_group_entry(my_app_gid, 0); menu_gid = cui_menu_create(my_app_gid, CUI_MENU_SRC_TYPE_APPCREATE, CUI_MENU_TYPE_OPTION, 23 CUI_MENU_TYPE_OPTION, MY_MENU_ID_ROOT, MMI_FALSE, NULL); cui_menu_run(menu_gid ); } MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B Hello world Hello world –– APP creat treeAPP creat tree mmi_ret my_app_proc(mmi_event_struct *evt) { cui_menu_event_struct *menu_evt = (cui_menu_event_struct*)evt; switch (menu_evt->evt_id) { case EVT_ID_CUI_MENU_LIST_ENTRY: if(menu_evt->menu_id == MY_MENU_ID_ROOT) { mmi_menu_id root_ids[2] = {MY_MENU_ID_A, MY_MENU_ID_B}; 24 mmi_menu_id root_ids[2] = {MY_MENU_ID_A, MY_MENU_ID_B}; cui_menu_set_currlist(menu_evt->sender_id, 2, root_ids); cui_menu_set_item_string(menu_evt->sender_id, MY_MENU_ID_A, GetString(STR_GLOBAL_DELETE)); cui_menu_set_item_string(menu_evt->sender_id, MY_MENU_ID_B, GetString(STR_GLOBAL_DOWNLOAD)); cui_menu_set_non_leaf_item(menu_evt->sender_id, MY_MENU_ID_A, MMI_TRUE); } MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B Hello world Hello world –– APP creat treeAPP creat tree if(menu_evt->menu_id == MY_MENU_ID_A) { mmi_menu_id a_ids[1] = {MY_MENU_ID_A1}; cui_menu_set_currlist(menu_evt->sender_id, 1, a_ids); cui_menu_set_item_string(menu_evt->sender_id, MY_MENU_ID_A1, GetString(STR_GLOBAL_DELETE_ALL)); } break; case EVT_ID_CUI_MENU_ITEM_SELECT: 25 case EVT_ID_CUI_MENU_ITEM_SELECT: if(menu_evt->menu_id == MY_MENU_ID_A1) { DisplayPopup(GetString(STR_GLOBAL_DONE), 0, 0, 0, 0); } break; case EVT_ID_CUI_MENU_EVENT_CLOSE_REQUEST: cui_menu_close(menu_evt->sender_id); break; } return MMI_RET_OK; } MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B FAQFAQ ▪ What’s the position of menu CUI, and what’s the impact without applying menu CUI – Menu CUI is like a small APP, and it is based on original list category screen and new screen group mechanism. – Original list category screens still exist, and do not have plan to phase out. It still works to use show category screen function to display a list UI screen. 26 display a list UI screen. – However, Options menu applies different UI and UE behavior. It may have UI / UE synchronization issue with other screens which do no apply menu CUI. MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B FQAFQA ▪ Whether menu CUI still uses highlight / hint handler? – No. – Menu CUI uses different events to notify user instead of original highighlight / hint handler. 27 MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B FAQFAQ ▪ What’s the meaning of the parameter, is_item_flags_from_res, in cui_menu_create? – It determines whether the menu item flags (hide / grey) are set from resource or CUI instance. – If it is from resource, we can use both CUI (after cui_menu_create) and resource (anytime) API to hide / grey menu items, and all CUI instance with the same menu items 28 menu items, and all CUI instance with the same menu items will be impacted. – If it is from CUI instance, we can only use resource API to hide / grey menu items after cui_menu_create. It is helpful to create multiple CUI instances. MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B FAQFAQ ▪ Whether APP has to take care softkey label, CSK icon, etc. – Menu CUI provides default softkey label and behavior, including LSK / RSK / CSK – APP only has to customize special label or behavior if necessary 29 MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B FAQFAQ ▪ How to set numbered icons for APP menu – In LIST_ENTRY event, set the following flag • CUI_MENU_NORMAL_LIST_WITH_NUMBERED_ICONS ▪ How to disable “>” symbol in cascading menu – For resource tree, menu CUI will determine whether to display 30 – For resource tree, menu CUI will determine whether to display “>” automatically by looking resource menu tree – In LIST_ENTRY event, set non leaf node by the following API • cui_menu_set_non_leaf_item MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX Confidential B ReferenceReference ▪ PRST_Menu_CUI_10A_Latest. ppt 关于艾滋病ppt课件精益管理ppt下载地图下载ppt可编辑假如ppt教学课件下载triz基础知识ppt 31 MEDIATE K Confid ential Re lease for Konka_W CX MEDIATE K Confid ential Re lease for Konka_W CX
本文档为【PRST_Menu_CUI_Introduction_10A_Latest】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_419825
暂无简介~
格式:pdf
大小:1MB
软件:PDF阅读器
页数:31
分类:互联网
上传时间:2012-03-21
浏览量:22