MTK623510A 资源添加的

1.文件格式
  plutommi/mmi/firstapp
  plutommi/mmi/firstapp/firstappinc
                        firstappdefs.h
                        firstappprot.h
                        firstappgprot.h
                        firstappresdef.h
  plutommi/mmi/firstapp/firstappsrc
                        firstappsrc.c
  plutommi/mmi/firstapp/firstappres
                        firstapp.res
                        ref_list_firstapp.txt
2.文件加入项目
  修改make/plutommi/mmi_app文件
    A.mmi_app.lis 加入 "plutommi/mmi/firstapp/firstappsrc/firstappsrc.c"
    B.mmi_app.inc 加入 "plutommi/mmi/firstapp/firstappinc"
    C.mmi_app.pth 加入 "plutommi/mmi/firstapp/firstappsrc"
    D.plutommi/customer/resgenerator/makefile
      -I "../../MMI/firstappinc"/
3.添加应用程序ID
   A.在plutommi/mmi/inc/mmi_res_rangde_def.h(MMIDATATYPE.H)
   
    RESOURCE_BASE_ENUM_BEGIN()
   
    RESOURCE_BASE_ENUM_END()

   B.
   #ifdef __mmi_firstapp__
   RESCOUR_BASE_RANGE(APP_FIRSTAPP,50),
   #endif
  
   C.
   #ifdef __mmi_firstapp__
   #define FIRSTAPP_BASE((U16)GET_RESTOURE_BASE(APP_FIRSTAPP))
   #define FIRSTAPP_BASE_MAX((U16)GET_RESOURCE_MAX(APP_FIRSTAP))
   RESCOURCE_BASE_TABLE_ITEM_PATH(APP_FIRESTAPP,".//MMI/FIRSTAPP//FRISTAPPRES//")
   #endif

4.添加资源
  .res .txt
#include "mmi_features.h"
#include "custresdef.h"

<?xml version="1.0" encoding = "UTF-8"?>
<APP ID ="APP_FIRSTAPP">
  <STRING ID = "STR_ID_APP_FIRSTAPP_HELLO"/>
  <IMAGE ID ="IMG_ID_APP_FIRSTAPP">CUST_IMG_PATH"MainLCDFIRSTAPP//HELLO.BMP"</IMAGE>
  <SCREEN ID ="SCR_ID_APP_FIRSTAPP_HELLO"/>
</APP>

<!--Menu Item Area-->
<MENUITEM id="" str="" img="">
<!--Menu Tree Area-->
<MENU id="" type="" img="">

A.
type = APP_MAIN(右键)                  //Easy to make app main screen fancy.   
                                       //Must have notify attribute for main menu
       APP_SUB
need:ID STR IMG
<MENU ID="APP_MAIN" STR="" IMG="">
<MENUITEM_ID>XXXX</MENUITEM_ID>
</MENU>
B.OPTION                               //Could appoint default menuitem for CSK
<MENITEM ID="MENU_ID_TEST_OPEN" STR ="STR_ID_TEST_OPEN"/>
<MENITEM ID="MENU_ID_TEST_CLOSE" STR ="STR_ID_TEST_CLOSE" GROUP ="MENU_GROUP_BT,MENU_GROUP_EMALIT"/>
<MENITEM ID="MENU_ID_TEST_COPY" STR ="STR_ID_TEST_COPY" GROUP ="MENU_GROUP_EDITOR"/>
<MENITEM ID="MENU_ID_TEST_PASTE" STR ="STR_ID_TEST_PASTE" GROUP ="MENU_GROUP_EDITOR"/>
<MENITEM ID="MENU_ID_TEST_CUT" STR ="STR_ID_TEST_CUT" GROUP ="MENU_GROUP_EDITOR"/>
 
<MENU ID="MENU_ID_TEST_EDIT_SUBMENU" TYPE="OPTION" STR ="STRID_TEST_EDIT" GROUP ="MENU_GROUP_EDITOR">
  <MENUITEM_ID>MENU_ID_TEST_COPY<MENUITEM_ID>
  <MENUITEM_ID>MENU_ID_TEST_PASTE<MENUITEM_ID>
  <MENUITEM_ID>MENU_ID_TEST_CUT<MENUITEM_ID>
</MENU>

<MENU ID="TEST_APP_OPTION" TYPE="OPTION" STR="STR_ID_TEST_OPTION">
  <MENUITEM_ID>MENU_ID_TEST_OPEN</MENUITEM_ID>
  <MENUITEM_ID DEFAULE ="TRUE">MENU_ID_TEST_CLOSE</MENUITEM_ID>
  <MENUITEM_ID TYPE="SPEARATOR"></MENUITEM_ID>
  <MENUITEM_ID>MENU_ID_TEST_EDIT_SUBMENU</MENUITEM_ID>
</MENU>
C.
Original menu (Compatible)
– compatibility to the Pluto Resource.
• When convert res_xxx.c to xxx.res directly, will use this kind
of menu.
– Used without common UI
• App need to get menu and use category to show it
Copyright © MediaTek Inc. All rights reserved. 2010/10/1 17
– Still need Events.c support
– Highlight handler
– Hint handler
MEDIATEK Confidential Supercon_WCX
MEDIATEK Confidential
<MENUITEM ID="MENU_ID_TEST_OPEN" STR ="STR_ID_TEST_OPEN" IMG="IMG_ID_TEST_OPTN"

HIGHLIGHT="MMI_TEST_OPEN_HILITE HINT ="MMI_TEST_OPEN_HINT""/>
<MENU ID="MENU_ID_TEST_OPTION" STR="STR_ID_TEST_OPTION" IMG="IMG_ID_TEST_OPTION">
   <MENUITEM_ID>MEMU_ID_TEST_OPEN</MENUITEM_ID>
</MENU>


RES FILE
[*.RES]
    -->RESGEN_XML.EXE -C will search all paths in MMIDataType.c Copy *res to temp/res and renname as *.c
       resgen_xml_copy.log
[plutommi/Customer/ResGeneratortemp/res/*.c]
    -->USE GCC -e to make *.c to get .i files,.i files will remove all compile options
       resgen_xml_files.log
[plutommi/Customer/ResGeneratortemp/res/*.i]
    -->run resgen_xml.exe -p will search and parse all .i files,and output to a temp
       resgen_xml.log
[plutommi/Customer/ResGeneratortemp/res_out]
   -->last setp of resgen_xml.exe -p,will compare all files in temp folder with destionation folder's files
      only copy &overwrite different files
      resgen_xml.log
[plutommi/Customer/CUSTOMERINC]
[plutommi/Customer/CUSTRESOURCE]
[plutommi/Customer/ResGenerator/debug/res]


XML constructs
– Tag
    • Open
    • Close
– Attributes
– Values
– Data
Form 1
<tag attrib1="value1" attrib2="value2"/>
Form 2
<tag attrib1="value1" attrib2="value2"> data </tag>
Form 3
<tag1 attrib1="value1" attrib2="value2">
<child-tag2 attrib1="value1" attrib2="value2"> data </child-tag2>
<child-tag3 attrib1="value1" attrib2="value2"/>
</tag1>


Tag maps
▪ APP
– INCLUDE
– STRING
– IMAGE
– MEDIA
– AUDIO
– ENFB
   • IMAGE
   • MEDIA
– SCREEN
– TIMER

– EVENT
– MENUITEM
– MENUSET
   • MENUITEM
   • MENUITEM_ID
– MENU
   • MENU
   • MENUITEM
   • MENUITEM_ID
   • MENUSET_ID
– MAINMENUITEM

1.STRING <STRING ID="" SCOPE="XML" FLAG="MULTIBIN" FORCE_TYPE="" GROUP="">
2.IMAGE  <IMAGE ID="" FLAG="" GROUP="">CUST_ADD_PATH</IMAGE>
3.AUDIO  <AUDIO ID="" FLAG="">CUST_ADD_PATH</AUDIO>
4.<MULIT_IMAGE ID_START="" ID_END="" MAX_COUNT="MAX">
  CUST_ADD_PATH"//MAINLCDCSBROWSER*.GIF"
  </MULIT_IMAGE>
5.<SCREEN ID=""/>
6.<TIMER ID=""/>

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值