关于窗体(category screen) mtk的控件和窗体绘制机制以及控件、窗体的事件响应机制 一、 entryfunction 在文档里面我们看到下面的条款: 以下引自:write applications using pixtel MMI platform.pdf Before display the new screen over previous screen the following must be executed: 1. save the contents of previous screen. 保存前面那个窗体的内容; 2. get the buffer to store the contents of screen to displayed. 获得足够的缓存空间来保存当前要显示的窗体的内容。 3. get display attribute for the following screen, i.e. item to display as lists, circular menu etc. 获得下一个要显示的窗体的属性; 4. retrieve number of submenu items to be displayed. 获取要显示的子菜单条目的个数; 5. set the parent of new screen to be displayed. 设置要被显示的新窗体的父窗体; 6. set the submenu item to be displayed highlighted, on next screen. 设置下一级子菜单要被高亮显示的条目; 7. set the function to be executed on pressing right or left soft key. 设置按下左右软件的执行函数; 8. set the function to be called on exiting the next screen. 设置退出下个窗体的的调用函数; 这些工作一般都在窗体的入口函数里面实现的内容,因此我们有必要先从窗体的入口函数开始。以一段代码来说明(这里省略了很多的东西): void EntryScrIncomingOptions(void) { 1、退出上一窗口,进入新的窗口; EntryNewScreen(ITEM_SCR_INCOMING_OPTIONS,NULL, EntryScrIncomingOptions, NULL); 2、获取当前窗口的GUI buffer guiBuffer = GetCurrGuiBuffer(ITEM_SCR_INCOMING_OPTIONS); 3、获取列表窗口的子菜单数目; number_of_items = GetNumOfChild_Ext(MITEM_OPT_PSEUDO); 4、获取要显示的字符串序列; GetSequenceStringIds_Ext(MITEM_OPT_PSEUDO, list_of_items); 5、设置当前窗口的父窗口的ID; SetParentHandler(MITEM_OPT_PSEUDO); 6、注册 highlight 函数 RegisterHighlightHandler(ExecuteCurrHiliteHandler); 7、在已经获取了以上信息后,绘制当前的窗口; ShowCategory1Screen( STR_SCR1002_CAPTION, 0, STR_GLOBAL_OK, IMG_GLOBAL_OK, ST...