MTK编程起步开发常用知识.DOC

上传人:天*** 文档编号:905443 上传时间:2018-11-05 格式:DOC 页数:25 大小:109KB
下载 相关 举报
MTK编程起步开发常用知识.DOC_第1页
第1页 / 共25页
MTK编程起步开发常用知识.DOC_第2页
第2页 / 共25页
MTK编程起步开发常用知识.DOC_第3页
第3页 / 共25页
MTK编程起步开发常用知识.DOC_第4页
第4页 / 共25页
MTK编程起步开发常用知识.DOC_第5页
第5页 / 共25页
点击查看更多>>
资源描述

1、MTK 编程起步开发常用知识2010-12-03 10:53:02| 分类: MTK 工作总结 | 标签: |字号大中小 订阅 加载过的字符串生成文件:string_resource_usage.txt加载过的图片生成文件:image_resource_usage.txtSMS 编辑界面,中间按键的显示:mmi_sms_entry_editor#ifdef _MMI_WGUI_CSK_ENABLE_EnableCenterSoftkey(0, IMG_GLOBAL_SEND_MSG_CSK);mmi_imc_disable_csk();#endif EnableCenterSoftkey(0,

2、 0);去掉其使用。设置默认时间:custom_hw_default.c :DEFAULT_HARDWARE_YEAR、DEFAULT_HARDWARE_MON、DEFAULT_HARDWARE_DAYRestore.c 恢复出厂时间:RstResetDateTime()上下左右快捷键设置:Resource_shortcuts.c: 数组:gShctCandList 可选的快捷方式入口gShctDefaultList 默认有的入口gShctDefaultDediList4 上下左右四个键的入口camera、video 的一些默认值设置:MMI_features_camera.h、MMI_fea

3、tures_video.h(plutommicustomercustresourcepluto_mmi)UI_device_heightUI_device_widthMMI_button_bar_height修改默认输入法:Common_mmi_cache_config.c:NVRAM_SETTING_PREFER_INPUT_METHODRESTORE_PREFER_INPUT_METHODmodis 上看需修改版本号:NVRAM_EF_CACHE_SHORT_LID_VERNO (custom_nvram_editor_data_item.h)电话本的存储设置:mmi_phb_entry_

4、quick_search_list()guiBuffer = GetCurrGuiBuffer(SCR_ID_PHB_QUICK_SEARCH_LIST);/*NEOTEL:caiqin 20100818 add for phb display begin*/#if !defined(_NEOTEL_N73_SETTING_)entryCount = mmi_phb_num_of_phb_contact_in_storage(g_phb_cntx.prefer_storage);#elseentryCount = mmi_phb_num_of_phb_contact_in_storage(MM

5、I_STORAGE_BOTH);#endifSetLeftSoftkeyFunction(MTPNP_PFAL_PHB_entry_list_choose_number_dial, KEY_EVENT_UP);/左按键进入拨打的界面。去掉 idle 界面,网络名字前面的 SIM 卡前面的图标:wgui_cat033_show_techno_network_name()和 wgui_cat033_show_techno_network_name2()的: #if defined(M8171_SW_VERSION) | defined(M8968_SW_VERSION)|defined(M8289

6、_SW_VERSION)dual_sim_img = NULL;/赋值为空#elsedual_sim_img = get_image(WGUI_IMG_IDLE_SIM1); #endif修改时间的默认格式为 12 小时制:#ifdef _NEOTEL_SETTING_BYTE_ENTRY(TIME_FORMAT, 0X00),/12 小时制 #elseBYTE_ENTRY(TIME_FORMAT, 0X01),/24 小时制 #endif #ifdef _NEOTEL_SETTING_BYTE_ENTRY(RESTORE_DEFAULT_TIME_FORMAT, 0x00),#elseBYT

7、E_ENTRY(RESTORE_DEFAULT_TIME_FORMAT, 0x01),#endif 修改 IP 号码的 15 位:#ifdef M8181_SW_S80_VERSION#define MAX_IP_NUMBER_LEN 15#else#define MAX_IP_NUMBER_LEN 10#endif 文件 nvram_common_defs.h:#ifdef M8181_SW_S80_VERSION#define NVRAM_IP_NUMBER_SIZE 32*3#else#define NVRAM_IP_NUMBER_SIZE 22*3#endif 修改 GPRS 相关的文

8、件:#define MAX_GPRS_PROFILE_NUM (9)-custom_data_account.h#define NVRAM_EF_ABM_GPRS_PROFILE_TOTAL 12NVRAM_EF_ABM_PS_PROFILE_DEFAULTNVRAM_EF_ABM_PS_PROFILE_DEFAULTNVRAM_EF_WAP_PROF_WAP_PROFILE_CONTENT_DEFAULTNVRAM_EF_WAP_PROF_WAP_SIM1_PROFILE_NAMES_DEFAULTNVRAM_EF_WAP_PROF_WAP_SIM2_PROFILE_NAMES_DEFAUL

9、TNVRAM_EF_WAP_PROF_MMS_SIM1_PROFILE_NAMES_DEFAULTNVRAM_EF_WAP_PROF_MMS_SIM2_PROFILE_NAMES_DEFAULTMMI_features_video.h 文件:for video player:show text when hotkey pess#ifndef _NEOTEL_SETTING_#define _VDOREC_FEATURE_HIDE_OSD_ /屏蔽这两个宏#define _VDOREC_FEATURE_MULTI_REGION_LAYER_BG_#endif /* _NEOTEL_SETTING

10、_ */显示 2 个 IMEI 号:#if defined(_MMI_DUAL_SIM_MASTER_) #elseShowIMEIScreen();#endif修改音乐播放器的歌曲标题坐标:mmi_audply_redraw_main_AP_title()gui_print_truncated_borderd_text(、, MMI_title_string);允许主屏幕屏保时钟显示:show_main_LCD_date_time 函数中:if (enable_main_LCD_date_time_display)dm_coordinates coordinates;if (show_dat

11、e = 0)coordinates.s16X = main_LCD_dt_object.date.x;coordinates.s16Y = main_LCD_dt_object.date.y;coordinates.s16Width = main_LCD_dt_object.date.width;coordinates.s16Height = main_LCD_dt_object.date.height;setup_previous_control(update_mainlcd_dt_display多个含内嵌菜单的上下菜单选择按键响应函数:register_inline_fixed_list_

12、keysregister_keyboard_key_handler(inline_fixed_list_key_handler);SetKeyHandler(inline_fixed_list_goto_previous_item, KEY_UP_ARROW, KEY_EVENT_DOWN);SetKeyHandler(inline_fixed_list_goto_next_item, KEY_DOWN_ARROW, KEY_EVENT_DOWN);SetKeyHandler(inline_fixed_list_goto_previous_item, KEY_VOL_UP, KEY_EVENT

13、_DOWN);SetKeyHandler(inline_fixed_list_goto_next_item, KEY_VOL_DOWN, KEY_EVENT_DOWN);内嵌菜单左右选择响应函数:register_inline_select_menu_keysSetKeyHandler(inline_select_menu_previous_item, KEY_LEFT_ARROW, KEY_EVENT_DOWN);SetKeyHandler(inline_select_menu_next_item, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);SetKeyHandler

14、(inline_select_menu_handle_up_arrow, KEY_UP_ARROW, KEY_EVENT_DOWN);SetKeyHandler(inline_select_menu_handle_down_arrow, KEY_DOWN_ARROW, KEY_EVENT_DOWN);SetKeyHandler(inline_select_menu_handle_up_arrow, KEY_VOL_UP, KEY_EVENT_DOWN);SetKeyHandler(inline_select_menu_handle_down_arrow, KEY_VOL_DOWN, KEY_E

15、VENT_DOWN);register_keyboard_key_handler(inline_select_menu_keyboard_key_handler);按键响应函数:execute_softkey_function隐藏按键:wgui_softkey_hide(MMI_RIGHT_SOFTKEY);重画按键:redraw_softkeyhide_softkeykey ();show_softkey(key);写短信模块按键响应:SetLeftSoftkeyFunction(mmi_sms_entry_editor_options, KEY_EVENT_UP);SetCenterSof

16、tkeyFunction(mmi_sms_ed_send, KEY_EVENT_UP);SetCategory28RightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);写短信模块添加联系人:mmi_sms_entry_add_recipientmmi_sms_recipient_enter_number_donemmi_sms_phone_number_doneMMS 字串:MEA_STR_ID_CONFIGMMS 模块的宏控制:MMS_SUPPORT = OBIGO_Q03C_MMS_V01MMS 模块的入口函数:goto_mms_screen(

17、)wap_entry_widget_screen彩信列表菜单创建:widget_ctk_create_list_menuwidget_ctk_screen_createwidget_ctk_show_list_menumeaSignalReceive 参数已经封装好switch(src_module)case MSF_MODID_SMA:smaSignalHandler(signal, p);break;case MSF_MODID_MSM:msfSignalHandler(signal, p);break;case MSF_MODID_MMS:mmsSignalHandler(signal,

18、 p);break;case MSF_MODID_SLS:slsSignalHandler(signal, p);break;/* draw the blank softkey if no softkey button */show_softkey_background();modis 上:MMI_ON_WIN32修改本机密码等:nvram_common_custpack.c:COMMON_NVRAM_EF_MS_SECURITY_DEFAULT:定义贪睡重复闹钟次数:AlarmDef.h:MAX_SNOOZE_CHANCESgui_switch.h 宏定义:定义 MMI 窗体等的高度、宽度G

19、UI 图片绘制:gui.cgui_show_image(S32 x, S32 y, PU8 i)gui_measure_image(PU8 i, S32 *width, S32 *height)gui_move_text_cursor(S32 x, S32 y)gui_measure_string(UI_string_type text, S32 *width, S32 *height)GDI 图片绘制:gdi_image.c:gdi_image_get_dimension_id(U16 image_id, S32 *width, S32 *height)gdi_image_draw_id(O

20、FFSET_X,OFFSET_Y,IMAGE_ID):gdi_image_drawgdi_image_draw:gdi_image_codec_draw日历的相关定义:Gui_calendar.h日历的绘制:gui_calendar.c设置 idle 界面,默认时钟:wgui_datetime.c:U8 g_clock_type = ANALOG;电池电量变化响应函数:wgui_status_icon_refresh_fixed_status_iconwgui_status_icon_arrange_status_icons()MMI_status_icons_list10 = STATUS_

21、ICON_SIGNAL_STRENGTH;MMI_status_icons_list11 = STATUS_ICON_BATTERY_STRENGTH;#if defined(_DOUBLE_BATTERY_)MMI_status_icons_list12 = STATUS_ICON_BATTERY_STRENGTH_SLAVE;MMI_status_icon_bars0.n_icons = 3;#if defined(_NEOTEL_N73_SETTING_)MMI_status_icons_list13 = STATUS_ICON_SLAVE_SIGNAL_STRENGTH;MMI_sta

22、tus_icon_bars0.n_icons+;#endif#elseMMI_status_icon_bars0.n_icons = 2;#endif信号量图标和电池图标坐标设置:wgui_status_icon_arrange_status_icons(arrange_status_icons)进入 idle 界面的函数:wgui_cat033_redrawif (PhnsetGetShowDateTimeStatus() = MMI_TRUE)#if defined (_NEOTEL_NOKIA_IDLESCREEN_STYLE_)gui_show_image(0, 0, get_imag

23、e(idlescreen_bar_id);/idle 界面去掉时钟图标#elsegui_show_image(0, MMI_status_bar_height, get_image(idlescreen_bar_id);#endifupdate_mainlcd_dt_display();in_idle_screen();wallpaper_layer = wgui_cat033_get_text_abm_layer();wgui_status_icon_set_alpha_layer(wallpaper_layer);idle_screen_show_network_details();reg

24、ister_hide_status_icon_bar(0, idle_screen_hide_status_icons_bar0);#if !defined(_MMI_MAINLCD_320X480_)register_hide_status_icon_bar(1, idle_screen_hide_status_icons_bar1);#endifshow_status_icons();#if defined (_NEOTEL_NOKIA_IDLESCREEN_STYLE_)show_nokia_idle_function();#endifN73,idle 设置左右按键:设置左右按键:Idl

25、eSetLRKey()#if defined(_NEOTEL_LSK_TO_SENDKEY2_)if (MTPNP_AD_Get_UsableSide() = MTPNP_AD_DUALSIM_USABLE) | (MTPNP_AD_Get_UsableSide() = MTPNP_AD_SIMCARD2_USABLE)/如果两个卡可用或者卡 2 可用,就进入 call_list 界面lsk_func = MTPNP_PFAL_chist_slave_req_read_mixed_num_by_key;elselsk_func = MMI_Display_Nosim_Message;/若无卡

26、2 则提示插入卡#elselsk_func = EntryMainMenuFromIdleScreen;#endifrsk_func = mmi_phb_idle_enter_phb_list;/右软键进入电话簿列表/更换左右按键的响应和字串 #if defined(_MMI_SWAP_LSK_RSK_IN_IDLE_SCREEN_)/* Swap the LSK and RSK handler. */tmp_func = lsk_func;lsk_func = rsk_func;rsk_func = tmp_func;/* Swap the LSK and RSK string. */tmp

27、_str = lsk_str;lsk_str = rsk_str;rsk_str = tmp_str;#endif /* _MMI_SWAP_LSK_RSK_IN_IDLE_SCREEN_ */待机界面设置日期和时间的坐标:set_dt_display/*NEOTEL: zhangyan 20100815 add begin */#if defined(_NEOTEL_N73_SETTING_)x=32;/设置时间坐标y=1;#endif/*NEOTEL: zhangyan 20100815 add end */x1 = main_LCD_dt_object.time.x = x - DT_D

28、ISPLAY_GAP;y1 = main_LCD_dt_object.time.y = y - DT_DISPLAY_GAP;#if defined(_NEOTEL_N73_SETTING_)x=50;/设置日期坐标y=18;#endifx1 = main_LCD_dt_object.date.x = x;y1 = main_LCD_dt_object.date.y = y;/*NEOTEL:caiqin 20100727 add for time begin*/x2 = x1 + main_LCD_dt_object.time.width - 1;/*NEOTEL:caiqin 201007

29、27 add for time end*/y2 = y1 + main_LCD_dt_object.time.height - 1; enable_main_LCD_date_time_display = 1;show_main_LCD_date_time/* get current time in string format */time_string(if (PhnsetGetShowDateTimeStatus() = MMI_TRUE)update_mainlcd_dt_display();时间显示的 clip 的地方增加格式判断:PhnsetGetTimeFormat()。动态列表:

30、wgui_dynamic_list_create_icontext_menu电池充电过程中反复调用:wgui_status_icon_status_icon_timer_callback()if (status_icon_blink_animate_ON)gui_start_timer(STATUS_ICON_TIMER_RATE, wgui_status_icon_status_icon_timer_callback);idle 界面接收短信的提示框上面的字串绘制函数:ShowCategory154Screencategory_154_message1_y = CAT154_IMAGE_Y

31、- h1 - 1 - h2 - 2 + 8;category_154_message2_y = CAT154_IMAGE_Y - h2 - 2 + 8;y = CAT154_IMAGE_Y;接收短信的提示框图片 SMSReceivingSS_IdleMSG.gif设置屏保默认开启:SettingDefs.h :#define FACTORY_RESTORE_DEFAULT_SCREENSAVER_STATUS 1RESTORE_DEFAULT_SCREENSAVER_STATUSNVRAM_SCREENSAVER_STATUS设置屏保默认图片:NVRAM_CURRENT_SCREENSVER_

32、IDRESTORE_DEFAULT_CURRENT_SCREENSVER_ID二级菜单背景图IMG_BACKGROUND_defaultThemeIMG_BACKGROUND_1ThemeIMG_BACKGROUND_2Theme主菜单图片坐标的绘制gui_show_fixed_matrix_menu 函数#if defined(_NEOTEL_MATRIX_MENU_TEXT_)#if defined(_NEOTEL_LENOVO_MAINMENU_)if(GetActiveScreenId() = MAIN_MENU_SCREENID)image_rect-rect_text.y = iy

33、 + mm-height-sh - 10;else#endifimage_rect-rect_text.y = iy + mm-height-sh - 2;#elseimage_rect-rect_text.y = iy + mm-text_y;#endif疑问:/*NEOTEL: zhangyan 20100806 modify begin*/#if defined(_NEOTEL_MATRIX_MENU_TEXT_)gui_show_fixed_matrix_menuitem_text();#endif/*NEOTEL: zhangyan 20100806 modify end*/音乐播放器主界面:mmi_audply_redraw_main_screen 设置默认背光等级和时间值:Common_mmi_cache_config.c:NVRAM_BYTE_BL_SETTING_LEVELNVRAM_BYTE_BL_SETTING_HFTIME

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 重点行业资料库 > 1

Copyright © 2018-2021 Wenke99.com All rights reserved

工信部备案号浙ICP备20026746号-2  

公安局备案号:浙公网安备33038302330469号

本站为C2C交文档易平台,即用户上传的文档直接卖给下载用户,本站只是网络服务中间平台,所有原创文档下载所得归上传人所有,若您发现上传作品侵犯了您的权利,请立刻联系网站客服并提供证据,平台将在3个工作日内予以改正。