MTK中EntryNewScreen进入新屏幕和GoBackHistory返回原屏幕机制
来源:互联网 发布:网络管理协议 编辑:程序博客网 时间:2024/06/06 17:44
以下假设从A屏幕进入B屏幕再返回A屏幕,有兴趣的朋友可以跟踪MTK代码验证一下:
EntryNewScreen(U16 new_scrn_id, exit_func_ptr new_exit_handler, entry_func_ptr new_entry_handler, void *flag)
A->B
1)set global variable currTopScrnID to new_scrn_id(B)
2)call ExecuteCurrExitHandler() -> call ExecuteCurrExitHandler_Ext()
①call mmi_frm_generic_exit_scrn(currExitScrnID(A), curr_entry_handler(EntryA)) -> call mmi_frm_add_history to add A to history
②call curr_exit_handler(curr_exit_scrn_arg_p) to execute ExitA
③reset new_exit_handler and new_entry_handler NULL
④call UI_common_screen_exit() -> call ExitCategoryFunction() -> reset category function
⑤call ClearInputEventHandler(MMI_DEVICE_KEY)
3)set global variable currExitScrnID to new_scrn_id(B)
4)call mmi_frm_set_generic_exit_handler(new_scrn_id, new_exit_handler, new_entry_handler), this function will do:
①set global variable currExitScrnID to new_scrn_id(B)
②set global variable curr_exit_handler to new_exit_handler(ExitB)
③set global variable curr_entry_handler to new_entry_handler(EntryB)
at a word: set currTopScrnID to B -> add A to history -> execute ExitA -> reset category function -> set currExitScrnID to B -> set curr_exit_handler to ExitB -> set curr_entry_handler to EntryB
Call GoBackHistory() B back to A
1)call mmi_frm_go_back_to_history_int(historyData[currHistoryIndex].scrnID)
historyData[currHistoryIndex].scrnID is now A
2)call ExecTopScrnCallbackHandler() -> call ClearDelScrnIDCallbackHandler(currExitScrnID(B), NULL) to delete history in array historyCBHandler[MAX_HISTORY]
3)call mmi_frm_remove_history_node to delete history node
4)call (*(historyData[currHistoryIndex].entryFuncPtr)) (historyData[currHistoryIndex].app_arg) to reentry A
5)set global variable currTopScrnID to new_scrn_id(A)
6)set global variable currExitScrnID to new_scrn_id(A)
7)call mmi_frm_set_generic_exit_handler(new_scrn_id, new_exit_handler, new_entry_handler), this function will do:
①set global variable currExitScrnID to new_scrn_id(A)
②set global variable curr_exit_handler to new_exit_handler(ExitA)
③set global variable curr_entry_handler to new_entry_handler(EntryA)
at a word: delete history in array historyCBHandler[MAX_HISTORY] -> delete history node -> call Entry to reentry A -> set currTopScrnID to A -> set currExitScrnID to A -> set curr_exit_handler to ExitA -> set curr_entry_handler to EntryA
EntryNewScreen(U16 new_scrn_id, exit_func_ptr new_exit_handler, entry_func_ptr new_entry_handler, void *flag)
A->B
1)set global variable currTopScrnID to new_scrn_id(B)
2)call ExecuteCurrExitHandler() -> call ExecuteCurrExitHandler_Ext()
①call mmi_frm_generic_exit_scrn(currExitScrnID(A), curr_entry_handler(EntryA)) -> call mmi_frm_add_history to add A to history
②call curr_exit_handler(curr_exit_scrn_arg_p) to execute ExitA
③reset new_exit_handler and new_entry_handler NULL
④call UI_common_screen_exit() -> call ExitCategoryFunction() -> reset category function
⑤call ClearInputEventHandler(MMI_DEVICE_KEY)
3)set global variable currExitScrnID to new_scrn_id(B)
4)call mmi_frm_set_generic_exit_handler(new_scrn_id, new_exit_handler, new_entry_handler), this function will do:
①set global variable currExitScrnID to new_scrn_id(B)
②set global variable curr_exit_handler to new_exit_handler(ExitB)
③set global variable curr_entry_handler to new_entry_handler(EntryB)
at a word: set currTopScrnID to B -> add A to history -> execute ExitA -> reset category function -> set currExitScrnID to B -> set curr_exit_handler to ExitB -> set curr_entry_handler to EntryB
Call GoBackHistory() B back to A
1)call mmi_frm_go_back_to_history_int(historyData[currHistoryIndex].scrnID)
historyData[currHistoryIndex].scrnID is now A
2)call ExecTopScrnCallbackHandler() -> call ClearDelScrnIDCallbackHandler(currExitScrnID(B), NULL) to delete history in array historyCBHandler[MAX_HISTORY]
3)call mmi_frm_remove_history_node to delete history node
4)call (*(historyData[currHistoryIndex].entryFuncPtr)) (historyData[currHistoryIndex].app_arg) to reentry A
5)set global variable currTopScrnID to new_scrn_id(A)
6)set global variable currExitScrnID to new_scrn_id(A)
7)call mmi_frm_set_generic_exit_handler(new_scrn_id, new_exit_handler, new_entry_handler), this function will do:
①set global variable currExitScrnID to new_scrn_id(A)
②set global variable curr_exit_handler to new_exit_handler(ExitA)
③set global variable curr_entry_handler to new_entry_handler(EntryA)
at a word: delete history in array historyCBHandler[MAX_HISTORY] -> delete history node -> call Entry to reentry A -> set currTopScrnID to A -> set currExitScrnID to A -> set curr_exit_handler to ExitA -> set curr_entry_handler to EntryA
- MTK中EntryNewScreen进入新屏幕和GoBackHistory返回原屏幕机制
- [MTK] 从Launcher3的主菜单进入其他应用,然后按返回键返回到待机界面,屏幕顶部和底部颜色发白
- MTK中ShowCategory模板屏幕图预览
- MTK中ShowCategory模板屏幕图预览
- 说说MTK的EntryNewScreen函数和一个Bug
- 进入和退出屏幕模板程序
- 进入和退出屏幕模板程序
- MTK屏幕对应模板图例
- MTK平台屏幕切换机制探索--group机制(11A版本)
- 在Activity和XML中设置屏幕的横竖屏幕
- 在代码中获取屏幕像素和屏幕密度
- 点亮屏幕和屏幕解锁
- 点亮屏幕和屏幕解锁
- 屏幕
- 屏幕
- 屏幕
- 屏幕
- 屏幕
- 关于大型项目代码风格
- MTK之DrawManager机制
- 2
- 在用户刷新或者关闭浏览器时弹框提示用户(兼容IE和Firefox)
- 多线程12天--10
- MTK中EntryNewScreen进入新屏幕和GoBackHistory返回原屏幕机制
- SQL XTYPE
- [BetterExplained]书写是为了更好的思考
- java笔记 策略模式
- android intent
- Introducing Starling by Thibault Imbert
- 程序员面试题精选100题(39)-颠倒栈
- VS2003 添加盾牌图标
- VC常用功能--代码实现