static PRESULT win_an_set_unkown_act_proc(VACTION act) //guop edit 20101014 { switch(act) { case VACT_SINGLE_SEARCH: single_multi_srch_flag = 0; //if(check_node_modified(TYPE_SAT_NODE) ) { UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_SMSG); win_compopup_set_msg(NULL, NULL, RS_MSG_SAVING_DATA); win_compopup_open_ext(&back_saved); update_data(TYPE_SAT_NODE); osal_task_sleep(200); win_compopup_smsg_restoreback(); } if(OSD_ObjOpen((POBJECT_HEAD)&g_win_sat_srchset, 0xFFFFFFFF) != PROC_LEAVE) menu_stack_push((POBJECT_HEAD)&g_win_sat_srchset); wincom_close_help(); break; case VACT_MULTI_SEARCH: single_multi_srch_flag = 1; // if(check_node_modified(TYPE_SAT_NODE) ) { UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_SMSG); win_compopup_set_msg(NULL, NULL, RS_MSG_SAVING_DATA); win_compopup_open_ext(&back_saved); update_data(TYPE_SAT_NODE); osal_task_sleep(200); win_compopup_smsg_restoreback(); } if(OSD_ObjOpen((POBJECT_HEAD)&g_win_sat_srchset, 0xFFFFFFFF) != PROC_LEAVE) menu_stack_push((POBJECT_HEAD)&g_win_sat_srchset); wincom_close_help(); break; case VACT_TP_SEARCH: // if(check_node_modified(TYPE_SAT_NODE) ) { UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_SMSG); win_compopup_set_msg(NULL, NULL, RS_MSG_SAVING_DATA); win_compopup_open_ext(&back_saved); update_data(TYPE_SAT_NODE); osal_task_sleep(200); win_compopup_smsg_restoreback(); } if(OSD_ObjOpen((POBJECT_HEAD)&g_win_tplist, 0xFFFFFFFF) != PROC_LEAVE) menu_stack_push((POBJECT_HEAD)&g_win_tplist); break; } }
static PRESULT weathercitylst_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; switch(event) { case EVN_PRE_OPEN: weathercitylst_load_list(); wincom_open_subtitle(pObj,RS_WEATHER_CITY_LIST,0); break; case EVN_POST_OPEN: wincom_open_help(pObj,weathercitylist_helpinfo , HELP_CNT); break; case EVN_PRE_CLOSE: sys_data_save(1); break; case EVN_POST_CLOSE: if(weath!=-1||weath!=0) libnet_download_abort((unsigned long)weath); weath=0; wincom_close_subtitle(); wincom_close_help(); break; case EVN_MSG_GOT: ret = weather_msg_proc(param1,param2); break; } return ret; }
static PRESULT nagra2_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; switch(event) { case EVN_PRE_OPEN: //patch_softcam_key_init(); win_init_pstring(30); win_nagra2_check_focusID(1); win_nagra2_load_select(); wincom_open_subtitle1(pObj,RS_CODE_EDIT,0); break; case EVN_POST_OPEN: wincom_open_help(pObj,nagra2_helpinfo , HELP_CNT); break; case EVN_PRE_CLOSE: softcam_save_keydata_to_flash_1(); /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: wincom_close_subtitle(); wincom_close_help(); OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL); break; case EVN_MSG_GOT: default: break; } return ret; }
static PRESULT newcamd_win_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; VACTION unact; VACTION msg_got; UINT8 bFocusID=OSD_GetContainerFocus((PCONTAINER)&g_win_newcamd); switch(event) { case EVN_PRE_OPEN: newcamd_init(); break; case EVN_POST_OPEN: #ifdef NEWCAMD_SUPPORT_EXT16_SERVER newcamd_draw_ext_server_info(0); #endif wincom_open_help(pObj,newcamd_helpinfo, ARRAY_SIZE(newcamd_helpinfo)); break; case EVN_PRE_CLOSE: *((UINT32 *)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: //OSD_ClearObject( (POBJECT_HEAD)&g_win_newcamd, C_UPDATE_ALL); wincom_close_help(); OSD_TrackObject((POBJECT_HEAD)&g_win_mainmenu,C_UPDATE_ALL); break; case EVN_UNKNOWN_ACTION: unact = (VACTION)(param1>>16); ret=newcamd_unknowact_proc(pObj,unact); break; case EVN_ITEM_POST_CHANGE: { g_newcamd_curidx=bFocusID; newcamd_display_info1(TRUE); newcamd_display_info2(TRUE,newcamd_serinfo[g_newcamd_curidx-1].cas_sys_type); //newcamd_draw_ext_server_info(bFocusID-1); } break; case EVN_MSG_GOT: if(param1==CTRL_MSG_SUBTYPE_STATUS_NEWCAMD) { UINT16 serIdx = (UINT16)(param2>>16); UINT16 casType= (UINT16)(param2&0xFFFF); NEWCAMD_SERVER_T Newcamd_Serinfo; get_newcamd_serinfo( (PNEWCAMD_SERVER_T)&newcamd_serinfo[serIdx],serIdx); newcamd_display_info2(TRUE,newcamd_serinfo[g_newcamd_curidx-1].cas_sys_type); } //soc_printf("param1:0x%x vaction is 0x%x, 0x%x\n",param1,msg_got,VACT_CURSOR_LEFT); //newcamd_redraw_dt(TRUE); //newcamd_signal_refresh(TRUE); break; }
static PRESULT atnsetm_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; BOOL b; UINT8 back_saved; VACTION unact; POBJECT_HEAD submenu; switch(event) { case EVN_PRE_OPEN: win_atnsetm_load_tuner_configuration(); win_atnsetm_load_motor_antenna_setting(FALSE); wincom_open_subtitle(pObj,RS_INSTALLATION_ANTENNA_SETUP,0); wincom_open_commen_help(pObj); wincom_open_help(pObj,ant_setup_helpinfo , HELP_CNT); break; case EVN_PRE_CLOSE: b = win_atnsetm_check_save_motor_antenna_setting(); if(!b) { win_compopup_init(WIN_POPUP_TYPE_OK); win_compopup_set_msg(NULL, NULL, RS_MSG_OUT_RANGE); win_compopup_open_ext(&back_saved); ret = PROC_LOOP; break; } /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: wincom_close_help(); wincom_close_subtitle(); OSD_ClearScreen(); win_open_submenu_title(submenu,sub_menu_desc->title_id, 0); //guop break; case EVN_UNKNOWN_ACTION: unact = (VACTION)(param1>>16); ret = win_an_set_unkown_act_proc(unact); break; } return ret; }
static PRESULT sys_backup_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; CONTAINER* cont = (CONTAINER*)pObj; UINT8 id = OSD_GetObjID(pObj); switch(event) { case EVN_PRE_OPEN: //epg_release(); wincom_open_title(pObj, RS_SYSTEM_BACKUP, 0); wincom_open_help(NULL, NULL, HELP_TYPE_RS232); OSD_SetProgressBarPos(&sys_backup_bar_progress,(INT16)0); OSD_SetTextFieldContent(&sys_backup_txt_progress, STRING_NUM_PERCENT, (UINT32)0); ret = win_sys_backup_init(); break; case EVN_POST_OPEN: system_state = SYS_STATE_USB_UPG; win_sys_backup_msg_clear(); break; case EVN_PRE_CLOSE: /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: system_state = SYS_STATE_NORMAL; wincom_close_title(); wincom_close_help(); //epg_init(ap_send_epg_PF_update, ap_send_epg_sch_update, ap_send_epg_detail_update); break; case EVN_MSG_GOT: if(param1 == CTRL_MSG_SUBTYPE_CMD_EXIT) { ret = PROC_LEAVE; } break; default: break; } return ret; }
static PRESULT map_city_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT8 back_saved; INT32 news_list_num = 0; UINT8 focusID = OSD_GetFocusID( pObj); switch(event) { case EVN_PRE_OPEN: bMapDownloading = FALSE; map_city_list_load(); break; case EVN_POST_OPEN: wincom_open_subtitle(pObj,RS_MAP,0); wincom_open_help(pObj, map_city_helpinfo, HELP_CNT); memset(search_string, 0x0, sizeof(search_string)); break; case EVN_PRE_CLOSE: map_download_abort(s_mapdl_handle); s_mapdl_handle = 0; sys_data_save(1); break; case EVN_POST_CLOSE: SetReplayHintState(0); ShowReplayHintOSDOnOff(0); wincom_close_subtitle(); wincom_close_help(); #ifdef LOGO_IN_RAM api_show_Test_logo_2(internet_osd4,get_logo_h_file_size(6)); #else api_show_Test_logo( LOGO_ID_TYPE|0X0200|focusID); #endif break; case EVN_MSG_GOT: if (param1 == CTRL_MSG_SUBTYPE_STATUS_DOWNLOAD_FINISH) { bMapDownloading = FALSE; s_mapdl_handle = 0; if ((int)param2 >= 0) { win_compopup_smsg_restoreback(); wincom_close_subtitle(); wincom_close_help(); if(OSD_ObjOpen(&g_win_map_display, param2) != PROC_LEAVE) menu_stack_push(&g_win_map_display); } else { win_compopup_smsg_restoreback(); win_compopup_init(WIN_POPUP_TYPE_OK); win_compopup_set_msg(NULL,NULL,RS_ERROR); win_compopup_open_ext(&back_saved); ret = PROC_LOOP; } } break; default: break; } return ret; }
static PRESULT sys_backup_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; CONTAINER* cont = (CONTAINER*)pObj; UINT8 id = OSD_GetObjID(pObj); OSD_RECT rect; UINT32 posi; switch(event) { case EVN_PRE_OPEN: #ifdef PREVIEW_SUBMENU //-a by wangyang if(param2==MENU_OPEN_TYPE_OTHER) { if(focus_flag==1) { POBJECT_HEAD focusObj=OSD_GetFocusObject(pObj); focusObj_id =focusObj->bID; OSD_SetContainerFocus((CONTAINER*)pObj,0); focus_flag =0; } } else { OSD_SetContainerFocus((CONTAINER*)pObj,focusObj_id); focus_flag =1; } #endif #ifdef EXIT_KEY_EXIT_ALL_MENU exit_key_flag = FALSE; #endif // win_usb_backup_tmr_loop =0; wincom_open_subtitle(pObj, RS_SYSTEM_BACKUP, 0); wincom_open_help(NULL, NULL, HELP_TYPE_RS232); OSD_SetProgressBarPos(&sys_backup_bar_progress,(INT16)0); OSD_SetTextFieldContent(&sys_backup_txt_progress, STRING_NUM_PERCENT, (UINT32)0); ret = win_sys_backup_init(); break; case EVN_POST_OPEN: system_state = SYS_STATE_USB_UPG; wincom_open_commen_help(pObj);//-a by wangyang win_sys_backup_msg_clear(); break; case EVN_PRE_CLOSE: /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: system_state = SYS_STATE_NORMAL; //wincom_close_title(); wincom_close_subtitle(); wincom_close_help(); win_progress_bar_draw_bmp_close(); OSD_ClearScreen(); #ifdef EXIT_KEY_EXIT_ALL_MENU if( exit_key_flag == TRUE) { exit_key_flag =FALSE; mm_leave_all_menu(); } #endif //epg_init(ap_send_epg_PF_update, ap_send_epg_sch_update, ap_send_epg_detail_update); //OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL); break; case EVN_MSG_GOT: if(param1 == CTRL_MSG_SUBTYPE_CMD_EXIT) { ret = PROC_LEAVE; } #ifdef PREVIEW_SUBMENU //-a by wangyang if (param1 == CTRL_MSG_SUBTYPE_CMD_STO && param2 == USB_STATUS_OVER) { system_state = SYS_STATE_NORMAL; wincom_close_subtitle(); OSD_ClearScreen(); wincom_close_help(); OSD_ClearObject( pObj, C_UPDATE_ALL); OSD_DrawFill(SUBMENU_W_L, SUBMENU_W_T, (SUBMENU_W_W), (SUBMENU_W_H), OSD_TRANSPARENT_COLOR, NULL); OSD_ObjOpen((POBJECT_HEAD)&win_rs232upg_con, MENU_OPEN_TYPE_OTHER ); ret = PROC_LEAVE; } #endif if (param1 == CTRL_MSG_SUBTYPE_CMD_TIMEDISPLAYUPDATE ) { /*if(start_backup==1) { win_usb_backup_tmr_loop++; posi = win_usb_backup_tmr_loop % PROGRESS_BAR_ICON_CNT; OSD_SetRect(&rect, BAR_TXT_L, BAR_TXT_T+BAR_TXT_H+4, 80, 80); win_progress_bar_draw_bmp(&rect,progress_bar_ids[posi]); } else win_progress_bar_draw_bmp_close();*/ } break; default: break; } return ret; }
static PRESULT map_city_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT8 back_saved; INT32 news_list_num = 0; UINT8 focusID = OSD_GetFocusID( pObj); switch(event) { case EVN_PRE_OPEN: bMapDownloading = FALSE; map_city_list_load(); break; case EVN_POST_OPEN: wincom_open_subtitle(pObj,RS_MAP,0); wincom_open_help(pObj, map_city_helpinfo, HELP_CNT); memset(search_string, 0x0, sizeof(search_string)); break; case EVN_PRE_CLOSE: sys_data_save(1); /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: wincom_close_subtitle(); wincom_close_help(); OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL); #ifdef LOGO_IN_RAM #ifdef MAINMENU_TYPE_ONE api_show_Test_logo_2(MM_game3,get_logo_h_file_size(4)); #else api_show_Test_logo_2(MM_games,get_logo_h_file_size(4)); #endif #else api_show_Test_logo( LOGO_ID_TYPE|0X0200|7); #endif break; case EVN_MSG_GOT: if (param1 == CTRL_MSG_SUBTYPE_STATUS_DOWNLOAD_FINISH) { bMapDownloading = FALSE; if ((int)param2 >= 0) { win_compopup_smsg_restoreback(); wincom_close_subtitle(); wincom_close_help(); if(OSD_ObjOpen(&g_win_map_display, 0) != PROC_LEAVE) menu_stack_push(&g_win_map_display); } else { win_compopup_smsg_restoreback(); win_compopup_init(WIN_POPUP_TYPE_OK); win_compopup_set_msg(NULL,NULL,RS_ERROR); win_compopup_open_ext(&back_saved); ret = PROC_LOOP; } } break; default: break; } return ret; }
static PRESULT atnsetf_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT8 level,quality,lock; UINT16 default_satidx; UINT32 sat_cnt; static UINT8 tone_voice_init; SYSTEM_DATA* sys_data; static UINT32 interval; MULTISEL* msel; VACTION unact; sys_data = sys_data_get(); switch(event) { case EVN_PRE_OPEN: if(sys_data_get_cur_satidx() == (UINT16)(~0)) {//sat_idx have been modified in other page default_satidx = win_load_default_satidx(); } else {//do not modified yet,load default playing programme satellite default_satidx = sys_data_get_cur_satidx(); } recreate_sat_view(VIEW_ALL, 0); win_atnsetf_load_tuner_configuration(); sat_cnt = win_atnsetf_load_sat_cnt(FALSE); if(sat_cnt == 0) { ret = PROC_LEAVE; } else { /*Sat Name*/ if(default_satidx >= sat_cnt) default_satidx = 0; msel = anesetf_msels[SAT_ID - 1]; OSD_SetMultiselCount(msel, sat_cnt); OSD_SetMultiselSel(msel,default_satidx); win_atnsetf_load_sat_setting(default_satidx,FALSE); } if(ret != PROC_LEAVE) wincom_open_subtitle(pObj,RS_INSTALLATION_ANTENNA_SETUP,0); break; case EVN_POST_OPEN: tone_voice_init = 0; //win_signal_open(pObj); #if 1//def SUPPORT_TWO_TUNER win_signal_open_ex(pObj,pObj->frame.uLeft+20,pObj->frame.uTop + 7 * (CON_H + CON_GAP) + 50); #else win_signal_open_ex(pObj,pObj->frame.uLeft+20,pObj->frame.uTop + 6 * (CON_H + CON_GAP) + 50); #endif wincom_open_help(pObj,antenna_setup_helpinfo , HELP_CNT); win_atnsetf_tuner_frontend(); win_signal_refresh(); //win_signal_update(); break; case EVN_PRE_CLOSE: if(check_node_modified(TYPE_SAT_NODE) ) { UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_SMSG); win_compopup_set_msg(NULL, NULL, RS_MSG_SAVING_DATA); win_compopup_open_ext(&back_saved); update_data(TYPE_SAT_NODE); osal_task_sleep(500); win_compopup_smsg_restoreback(); } /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: win_signal_close(); sys_data_save(1); wincom_close_help(); wincom_close_subtitle(); OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL); #ifdef ANTENNA_INSTALL_BEEP if(sys_data->install_beep) { #if(defined(DVBT_BEE_TONE) && ANTENNA_INSTALL_BEEP == 1) api_audio_stop_tonevoice(); #elif (defined(AUDIO_SPECIAL_EFFECT) && ANTENNA_INSTALL_BEEP == 2) api_audio_beep_stop(); #endif } #endif break; case EVN_MSG_GOT: if(param1 == CTRL_MSG_SUBTYPE_STATUS_SIGNAL) { win_signal_refresh(); //win_signal_update(); #ifdef ANTENNA_INSTALL_BEEP if(sys_data->install_beep) { level = (UINT8)(param2>>16); quality = (UINT8)(param2>>8); lock = (UINT8)(param2>>0); #if(defined(DVBT_BEE_TONE) && ANTENNA_INSTALL_BEEP == 1) if(quality<20) level = 0; else if(quality<40) level = 1; else if(quality<55) level = 3; else if(quality <70) level = 5; else level = 7; api_audio_gen_tonevoice(level, tone_voice_init); #elif (defined(AUDIO_SPECIAL_EFFECT) && ANTENNA_INSTALL_BEEP == 2) if(lock) level = 100;//100/quality; else level = 1;//100/quality; if(!tone_voice_init || level!=interval) { if(!tone_voice_init) api_audio_beep_start(beep_bin_array,beep_bin_array_size); interval = level; api_audio_beep_set_interval(interval); } #endif tone_voice_init = 1; } #endif }
static PRESULT map_city_list_unact_proc(VACTION act) { PRESULT ret = PROC_PASS; OBJLIST* ol; UINT16 curitem; UINT8 back_saved; SYSTEM_DATA* p_sys_data = sys_data_get(); UINT16 uni_name[30]; UINT8* new_name; char strTmp[30]; char strTmp1[30]; char strTmp2[30]; ol = &ol_map_city; curitem = OSD_GetObjListNewPoint(ol); switch (act) { case VACT_MAP_CITY_EDIT: //ComAscStr2Uni(p_sys_data->map_city_name[curitem], uni_name); MEMCPY(uni_name,(UINT16*)p_sys_data->map_city_name[curitem],(MAP_CITY_NAME_LEN + 1)); wincom_close_help(); #ifndef KEYBOARD_SUPPORT if(win_rename_open(uni_name,&new_name,map_city_check_input_name)) #else #if (defined(GZ1105002)||defined(GZ1105003)||defined(GZ1105004)||defined(GZ1105005)||defined(GZ1105006)) if(win_rename_open(uni_name,&new_name,map_city_check_input_name)) #else if(win_keyboard_rename_open(uni_name,&new_name,map_city_check_input_name)) #endif #endif { //ComUniStrToAsc(new_name,p_sys_data->map_city_name[curitem]); ComUniStrCopyChar(p_sys_data->map_city_name[curitem], new_name); } wincom_open_help_OK_list_small((POBJECT_HEAD)&g_win_map_city, map_city_helpinfo, HELP_CNT); OSD_TrackObject(ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); break; case VACT_MAP_CITY_ADD: if (OSD_GetObjListCount(ol) == MAP_CITY_MAX_NUM) { win_compopup_init(WIN_POPUP_TYPE_OK); ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_THE_LIST_IS_FULL),strTmp); win_compopup_set_msg((UINT8*)strTmp,NULL,0); win_compopup_open_ext(&back_saved); break; } memset(uni_name, 0x0, sizeof(uni_name)); wincom_close_help(); #ifndef KEYBOARD_SUPPORT if(win_rename_open(uni_name,&new_name, map_city_check_input_name)) #else #if (defined(GZ1105002)||defined(GZ1105003)||defined(GZ1105004)||defined(GZ1105005)||defined(GZ1105006)) if(win_rename_open(uni_name,&new_name, map_city_check_input_name)) #else if(win_keyboard_rename_open(uni_name,&new_name,map_city_check_input_name)) #endif #endif { //ComUniStrToAsc(new_name, p_sys_data->map_city_name[OSD_GetObjListCount(ol)]); ComUniStrCopyChar(p_sys_data->map_city_name[OSD_GetObjListCount(ol)],new_name); } map_city_list_load(); wincom_open_help_OK_list_small((POBJECT_HEAD)&g_win_map_city, map_city_helpinfo, HELP_CNT); OSD_TrackObject(ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); break; case VACT_MAP_CITY_DEL: map_city_delete(curitem); map_city_list_load(); OSD_TrackObject(ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); break; case VACT_MAP_CITY_DOWNLOAD: city_index = curitem; s_mapdl_handle = map_download(p_sys_data->map_city_name[curitem], 14); bMapDownloading = TRUE; win_compopup_init(WIN_POPUP_TYPE_SMSG); //ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_CONNECTINF_WAITE),strTmp1); win_compopup_set_msg(/*(UINT8*)strTmp1*/NULL,NULL,RS_CONNECTINF_WAITE); win_compopup_open_ext(&back_saved); break; case VACT_MAP_SEARCH: memset(search_string, 0x0, sizeof(search_string)); wincom_close_help(); if (win_map_search_input_menu_open(search_string)) { s_mapdl_handle = map_download(search_string, 14); bMapDownloading = FALSE; win_compopup_init(WIN_POPUP_TYPE_SMSG); //ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_CONNECTINF_WAITE),strTmp2); win_compopup_set_msg(/*(UINT8*)strTmp2*/NULL,NULL,RS_CONNECTINF_WAITE); win_compopup_open_ext(&back_saved); } wincom_open_help_OK_list_small((POBJECT_HEAD)&g_win_map_city, map_city_helpinfo, HELP_CNT); break; default: break; } return ret; }
static PRESULT weather_msg_proc(UINT32 msg_type, UINT32 msg_code) { PRESULT ret = PROC_LOOP; char msg[128]; UINT8 back_saved; INT32 parse_ret = 0; char strTmp[30]; char strTmp1[30]; char strTmp2[30]; char strTmp3[30]; char strTmp4[30]; switch(msg_type) { case CTRL_MSG_SUBTYPE_STATUS_DOWNLOAD_FINISH: weath=0; if((int)msg_code >= 0) { win_compopup_smsg_restoreback(); MEMSET(&weather_city,0,sizeof(weather_city)); parse_ret = weather_parse(&weather_city); if (parse_ret == 0) { if(OSD_ObjOpen((POBJECT_HEAD)&g_win_internet_weather, 0xFFFFFFFF) != PROC_LEAVE) { wincom_close_help(); menu_stack_push((POBJECT_HEAD)&g_win_internet_weather); } } else { weather_terminate(); win_compopup_smsg_restoreback(); win_compopup_init(WIN_POPUP_TYPE_OK); ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_ERROR),strTmp); win_compopup_set_msg((UINT8*)strTmp,NULL,0); win_compopup_open_ext(&back_saved); } } else { weather_terminate(); win_compopup_smsg_restoreback(); win_compopup_init(WIN_POPUP_TYPE_OK); switch (-msg_code) { case NET_ERR_CONNECT_FAILED: //ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_CONNECT_TO_SERVER_FAILED),strTmp1); //STRCPY(msg, strTmp1); win_compopup_set_msg(NULL/*(UINT8*)msg*/,NULL,RS_CONNECT_TO_SERVER_FAILED); break; case NET_ERR_USER_ABORT: //ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_USER_ABORT),strTmp2); //STRCPY(msg, strTmp2); win_compopup_set_msg(NULL/*(UINT8*)msg*/,NULL,RS_USER_ABORT); break; case NET_ERR_LOGIN_FAILED: //ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_INVALID_USER_PASSWORD),strTmp3); //STRCPY(msg, strTmp3); win_compopup_set_msg(NULL/*(UINT8*)msg*/,NULL,RS_INVALID_USER_PASSWORD); break; default: //ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_ERROR),strTmp4); //STRCPY(msg, strTmp4); win_compopup_set_msg(NULL/*(UINT8*)msg*/,NULL,RS_ERROR); break; } win_compopup_open_ext(&back_saved); } break; } return ret; }
static PRESULT satlst_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; switch(event) { case EVN_PRE_OPEN: win_init_pstring(30); win_satlist_check_focusID(1); win_satlist_load_sat_select(); wincom_open_subtitle(pObj,RS_SATELLITE_LIST,0); break; case EVN_POST_OPEN: wincom_open_help_1(pObj,satlist_helpinfo , HELP_CNT); break; case EVN_PRE_CLOSE: win_satlist_save_sat_select(); /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: wincom_close_subtitle(); wincom_close_help(); OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL); sys_data_check_channel_groups(); break; case EVN_MSG_GOT: { //added by Eric.Ren, 接收control task 的消息,处理kingofsat 更新,2010.7.30 #ifdef KINGOFSAT_SUPPORT OBJLIST* ol; UINT16 sel; S_NODE s_node; INT32 kingofsat_tp_num = 0; //可更新的TP个数 UINT8 back_saved; if(param1 == CTRL_MSG_SUBTYPE_STATUS_DOWNLOAD_FINISH) { if((INT32)param2 < 0) { win_compopup_smsg_restoreback(); win_compopup_init(WIN_POPUP_TYPE_SMSG); win_compopup_set_frame(MSG_POPUP_LAYER_L, MSG_POPUP_LAYER_T, MSG_POPUP_LAYER_W, MSG_POPUP_LAYER_H); win_compopup_set_msg("Downloading error,Try again!", NULL, 0); win_compopup_open_ext(&back_saved); osal_task_sleep(2000); win_compopup_smsg_restoreback(); break ; } ol = &satlist_olist; sel = OSD_GetObjListCurPoint(ol); get_sat_at(sel,VIEW_ALL,&s_node); //判断是有可更新的TP 数据 kingofsat_get_tp_num(&kingofsat_tp_num); if(kingofsat_tp_num == 0) { win_compopup_smsg_restoreback(); win_compopup_init(WIN_POPUP_TYPE_SMSG); win_compopup_set_frame(MSG_POPUP_LAYER_L, MSG_POPUP_LAYER_T, MSG_POPUP_LAYER_W, MSG_POPUP_LAYER_H); win_compopup_set_msg("NO TP in downloading data!", NULL, 0); win_compopup_open_ext(&back_saved); osal_task_sleep(1000); win_compopup_smsg_restoreback(); break; } kingofsat_parse(); //解析下载数据 recreate_tp_view(VIEW_SINGLE_SAT, s_node.sat_id);//创建TP view kingofsat_update(s_node.sat_id); //更新数据 kingofsat_destroy(); //释放资源 OSD_TrackObject( (POBJECT_HEAD)&g_win_satlist, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); recreate_sat_view(VIEW_ALL, 0); //创建SAT view } #endif break; } default: break; } return ret; }
static PRESULT motorset_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; S_NODE s_node; UINT8 back_saved; UINT16 title_strid; POBJECT_HEAD sat_item = (POBJECT_HEAD)&motorset_item1; POBJECT_HEAD tp_item = (POBJECT_HEAD)&motorset_item2; SYSTEM_DATA* sys_data; sys_data = sys_data_get(); switch(event) { case EVN_PRE_OPEN: tone_voice_init = 0; diskmotor_move_state = 0; diskmove_timer_id = OSAL_INVALID_ID; SAT_CNT = get_tuner_sat_cnt(antset_cur_tuner); SAT_IDX =win_load_default_satidx(); get_tuner_sat(antset_cur_tuner,SAT_IDX,&s_node); win_motorset_load_sat(SAT_IDX,FALSE); if(sys_data->tuner_lnb_type[antset_cur_tuner] != LNB_MOTOR) return PROC_LEAVE; if(sys_data->tuner_lnb_antenna[antset_cur_tuner].motor_type == LNB_MOTOR_DISEQC12) { title_strid = RS_MOTOR_SETTING; sat_item->bUpID = RECACULATE_ID; tp_item->bDownID = POS_ID; tp_item->pNext = (POBJECT_HEAD)&motorset_item3; } else { title_strid = RS_MOTOR_SETTING; sat_item->bUpID = POS_ID; tp_item->bDownID = SAT_ID; tp_item->pNext = NULL; } OSD_SetContainerFocus(&g_win_motorset, SAT_ID); wincom_open_subtitle(pObj,title_strid,0); wincom_close_help(); break; case EVN_POST_OPEN: // win_motorset_set_frontend(); //win_signal_open(pObj); win_signal_open_ex(pObj,pObj->frame.uLeft + 4,pObj->frame.uTop+pObj->frame.uHeight - 140); win_signal_refresh(); //win_signal_update(); get_tuner_sat(antset_cur_tuner,SAT_IDX,&s_node); // wincom_dish_move_popup_open(0xFFFF,s_node.sat_id,antset_cur_tuner,&back_saved); break; case EVN_PRE_CLOSE: /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: win_signal_close(); #ifdef ANTENNA_INSTALL_BEEP if(sys_data->install_beep) { #if(defined(DVBT_BEE_TONE) && ANTENNA_INSTALL_BEEP == 1) api_audio_stop_tonevoice(); #elif (defined(AUDIO_SPECIAL_EFFECT) && ANTENNA_INSTALL_BEEP == 2) api_audio_beep_stop(); #endif } #endif break; case EVN_POST_DRAW: if(tp_item->pNext != NULL) win_motorset_draw_info(diskmotor_move_state); break; case EVN_MSG_GOT: ret = win_motorset_message_proc(param1,param2); break; } return ret; }
static PRESULT mail_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; BOOL changed; UINT8 TV_Out; UINT16 x, y, w, h; VACTION unact; UINT8 av_mode, id; UINT16 chan_idx; UINT8 rating; UINT16 rating_ret; OBJLIST* ol = &mail_ol; /*struct help_item_resource mail_help[] = { {1,IM_EPG_COLORBUTTON_RED,RS_HELP_DELETE}, {1,IM_EPG_COLORBUTTON_GREEN,RS_DELETE_ALL}, {1,IM_HELP_ICON_TB,RS_HELP_SELECT}, {0,RS_HELP_ENTER,RS_HELP_ENTER_INTO}, }; */ switch (event) { case EVN_PRE_OPEN: OSD_ClearObject((POBJECT_HEAD)&g_win_mainmenu, C_UPDATE_ALL); rating_ret = GYCA_GetParentControl(&rating); /*if ((CDCA_RC_CARD_INVALID == rating_ret)|| (CDCA_RC_POINTER_INVALID ==rating_ret)) { win_popup_msg(NULL, NULL, RS_CAERR_NOSMC); return PROC_LEAVE; } else if (CDCA_RC_OK != rating_ret) { win_popup_msg(NULL, NULL, RS_CAERR_UNKNOWN); return PROC_LEAVE; } */ MEMSET(display_strs[0], 0, sizeof(display_strs[0])*MAX_DISP_STR_ITEMS); //wincom_open_title_ext(RS_EMAIL, IM_TITLE_ICON_EMAIL); //wincom_open_help(mail_help, 4); mail_got_info(); //mail_init_str(20); //mail_clear_del_flag(); if(email_count<=100) OSD_SetObjListCount(ol, email_count); else OSD_SetObjListCount(ol, 100); if (email_count <= OSD_GetObjListCurPoint(ol)) { OSD_SetObjListCurPoint(ol, 0); OSD_SetObjListNewPoint(ol, 0); OSD_SetObjListTop(ol, 0); } //CDCASTB_RequestMaskBuffer(); break; case EVN_POST_OPEN: MailDrawNum0(); wincom_scroll_textfield_resume(); break; case EVN_PRE_CLOSE: mail_exec_delete(); if(menu_stack_get(0)==((POBJECT_HEAD)&g_win_mainmenu)) *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; else { wincom_close_title(); wincom_close_help(); *((UINT32*)param2) &= C_CLOSE_CLRBACK_FLG; } //CDCASTB_RequestUpdateBuffer(); wincom_scroll_textfield_pause(); break; case EVN_POST_CLOSE: break; case EVN_MSG_GOT: if( param1 == CTRL_MSG_SUBTYPE_STATUS_SCROLL_STRING) win_mail_scroll_string(); if(param1 == CTRL_MSG_SUBTYPE_STATUS_SIGNAL) ret = PROC_LOOP; default: break; } return ret; }
static PRESULT wifilist_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT8 back_saved; switch(event) { case EVN_PRE_OPEN: #ifdef EXIT_KEY_EXIT_ALL_MENU exit_key_flag = FALSE; #endif #ifdef PREVIEW_SUBMENU { if(param2==MENU_OPEN_TYPE_OTHER) { wifilist_idx0.head.style.bHLIdx=TXTI_SH_IDX; wifilist_ssid0.head.style.bHLIdx=TXTC_SH_IDX; wifilist_encrypt_mode0.head.style.bHLIdx=TXTC_SH_IDX; wifilist_ap_status0.head.style.bHLIdx=TXTC_SH_IDX; } else { wifilist_idx0.head.style.bHLIdx=TXTI_HL_IDX; wifilist_ssid0.head.style.bHLIdx=TXTC_HL_IDX; wifilist_encrypt_mode0.head.style.bHLIdx=TXTC_HL_IDX; wifilist_ap_status0.head.style.bHLIdx=TXTC_HL_IDX; } } #endif display_wifi_help_bar_flag=1; win_signal_set_wifi_level_quality(0,0,1); win_wifilist_lib_wifi_sync_device_state(); win_wifilist_lib_wifi_retrieve_ap_scan_list(); win_wifilist_update_all_wifi_manager_menu(FALSE); wincom_open_subtitle(pObj,RS_WIFI_MANAGER,0); ap_clear_all_message(); break; case EVN_POST_OPEN: win_minisignal_open_ex(pObj,pObj->frame.uLeft,pObj->frame.uTop + LIST_ITEMCNT*(ITEM_H + ITEM_GAP) + LST_WIFI_DEV_H +50); //win_minisignal_open_ex3(pObj,pObj->frame.uLeft+20,pObj->frame.uTop + 9 * (CON_H + CON_GAP) + 45); win_wifilist_refresh_signal_bar(TRUE); break; case EVN_PRE_CLOSE: sys_data_save(1); /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: win_signal_close(); wincom_close_help(); ap_clear_all_message(); #ifdef EXIT_KEY_EXIT_ALL_MENU if( exit_key_flag == TRUE) { exit_key_flag =FALSE; mm_leave_all_menu(); } #endif OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL); break; case EVN_MSG_GOT: if((param1 == CTRL_MSG_SUBTYPE_CMD_EXIT)||(param1 == CTRL_MSG_SUBTYPE_CMD_EXIT_ALL)) { ret = PROC_LEAVE; } else { win_wifilist_message_proc(param1,param2); } break; default: break; } return ret; }
static PRESULT sp_win_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; VACTION unact; VACTION msg_got; UINT8 bFocusID=OSD_GetContainerFocus((PCONTAINER)&g_win_spielercam); switch(event) { case EVN_PRE_OPEN: //wincom_close_help(); nc_setting_init(); //OSD_SetID(&sp_item_con2,2,2,2,7,3); OSD_SetID(&sp_item_con7,7,7,7,6,6); OSD_SetContainerFocus(&g_win_spielercam,7); if(CccamNewcamdData.spidercam_code_active!=0&&CccamNewcamdData.spidercam_code_active!=1) CccamNewcamdData.spidercam_code_active=0; sp_item_sel_active(CccamNewcamdData.spidercam_code_active, 0,TRUE); break; case EVN_POST_OPEN: #if defined(ORDER_GZ1204004)||defined(ORDER_GZ1204005) wincom_open_help_OK_list_small2(pObj, spider_helpinfo, ARRAY_SIZE(spider_helpinfo)); #else spidercam_title_display(); #endif break; case EVN_PRE_CLOSE: #if defined(ORDER_GZ1204004)||defined(ORDER_GZ1204005) wincom_close_help(); #endif nc_save_serinfo(0); sys_data_save(1); *((UINT32 *)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: OSD_ClearObject( (POBJECT_HEAD)&g_win_spielercam, C_UPDATE_ALL); //wincom_close_help(); //OSD_TrackObject((POBJECT_HEAD)&g_win_mainmenu,C_UPDATE_ALL); break; case EVN_UNKNOWN_ACTION: unact = (VACTION)(param1>>16); #if defined(ORDER_GZ1204004)||defined(ORDER_GZ1204005) UINT32 back_saved; if(unact==VACT_ENTER) { win_compopup_init(WIN_POPUP_TYPE_SMSG); win_compopup_set_msg("Apply the setting.", NULL, 0); win_compopup_open_ext(&back_saved); osal_task_sleep(1000); win_compopup_smsg_restoreback(); nc_save_serinfo(0); sys_data_save(1); #ifdef SPIELERCAM_SUPPORT //手动获得spidercamd 帐号 getInfoFromSpiderCamd(); #endif } #endif break; case EVN_ITEM_POST_CHANGE: break; case EVN_MSG_GOT: msg_got = (VACTION)(param1>>16); //soc_printf("param1:0x%x vaction is 0x%x, 0x%x\n",param1,msg_got,VACT_CURSOR_LEFT); break; } return ret; }
static PRESULT tplst_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT8 back_saved; S_NODE s_node; POBJECT_HEAD submenu; switch(event) { case EVN_PRE_OPEN: if(sys_data_get_cur_satidx() == (UINT16)(~0)) cur_tp_sat_idx = win_load_default_satidx(); else cur_tp_sat_idx = sys_data_get_cur_satidx(); tp_list_pos = 0xffff; tp_list_top = 0; win_tplist_load_sat(FALSE); pre_tp_sat_idx= cur_tp_sat_idx; wincom_close_help(); wincom_open_subtitle(pObj,RS_TP_LIST,0); break; case EVN_POST_OPEN: //win_signal_open(pObj); //win_signal_open_tplist(pObj); win_signal_open_ex(pObj,pObj->frame.uLeft+30,pObj->frame.uTop + LIST_ITEMCNT*(ITEM_H + ITEM_GAP) + LST_SAT_H +25); wincom_open_commen_help(pObj); wincom_open_help(pObj,tplist_helpinfo , HELP_CNT); win_tplist_tuner_frontend(); win_signal_refresh(); //win_signal_update(); get_tuner_sat(TUNER_EITHER, cur_tp_sat_idx, &s_node); if(!tpscan_return) wincom_dish_move_popup_open(0xFFFF,s_node.sat_id,cur_tuner_idx,&back_saved); break; case EVN_PRE_CLOSE: /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: if(win_tplist_check_change()) update_data(); api_stop_timer(&tpturn_timer_id); win_signal_close(); wincom_close_help(); sys_data_check_channel_groups(); sys_data_set_cur_satidx((UINT16)cur_tp_sat_idx); #ifdef MULTIFEED_SUPPORT multifeed_del_invalid_info(); #endif wincom_close_subtitle(); OSD_ClearScreen(); win_open_submenu_title(submenu,sub_menu_desc->title_id, 0); //guop break; case EVN_MSG_GOT: win_tplist_message_proc(param1,param2); break; default: break; } return ret; }
static PRESULT win_tplist_list_unkown_act_proc(VACTION act) { PRESULT ret = PROC_LOOP; UINT8 pre_sat_idx; UINT16 sel,sat_cnt; OSD_RECT rect; COM_POP_LIST_PARAM_T param; OBJLIST* ol; S_NODE s_node; T_NODE t_node; UINT32 freq,symb,pol; UINT8 back_saved; UINT32 ftaonly_VPid,srch_chan_APid,nit_PPid; UINT32 choice; POBJECT_HEAD sub_menu; INT32 iret; UINT16 pre_sat_id,cur_sat_id; sat_cnt = get_tuner_sat_cnt(TUNER_EITHER); get_tuner_sat(TUNER_EITHER, cur_tp_sat_idx, &s_node); ol = &tplst_olist; sel = OSD_GetObjListCurPoint(ol); pre_sat_idx = cur_tp_sat_idx; switch(act) { case VACT_SAT_PRE: if(cur_tp_sat_idx > 0) cur_tp_sat_idx --; else cur_tp_sat_idx = sat_cnt - 1; goto SAT_CHANGE; case VACT_SAT_NEXT: if(cur_tp_sat_idx < (sat_cnt - 1)) cur_tp_sat_idx ++; else cur_tp_sat_idx = 0; goto SAT_CHANGE; case VACT_SAT_SELECT: param.id = TUNER_EITHER; param.cur = cur_tp_sat_idx; param.selecttype = POP_LIST_SINGLESELECT; OSD_SetRect(&rect, LST_SAT_L - 20 , LST_SAT_T, LST_SAT_W + 40, 360); rect.uTop += LST_SAT_H; sel = win_com_open_sub_list(POP_LIST_TYPE_SAT,&rect,¶m); if(sel < sat_cnt) cur_tp_sat_idx = sel; goto SAT_CHANGE; SAT_CHANGE: tp_list_pos = 0; tp_list_top = 0; if(cur_tp_sat_idx != pre_sat_idx) { pre_tp_sat_idx = pre_sat_idx; get_tuner_sat(TUNER_EITHER, pre_sat_idx, &s_node); pre_sat_id = s_node.sat_id; get_tuner_sat(TUNER_EITHER, cur_tp_sat_idx, &s_node); cur_sat_id = s_node.sat_id; #ifdef SUPPORT_TWO_TUNER #ifdef SUPPORT_SELECT_SAME_SAT cur_tuner_idx = s_node.reserve_1; //s_node.tuner1_valid? 0 : 1; #else cur_tuner_idx = s_node.tuner1_valid? 0 : 1; #endif #endif if(win_tplist_check_change()) update_data(); win_tplist_load_sat(TRUE); //OSD_TrackObject( (POBJECT_HEAD)&tplst_olist, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); OSD_TrackObject( (POBJECT_HEAD)&g_win_tplist, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); api_stop_timer(&tpturn_timer_id); tpturn_timer_id = api_start_timer(TPTURN_TIMER_NAME, TPTURN_TIMER_TIME, win_tplist_tpturn_handler); } break; case VACT_TP_EDIT: /* If not TP, can't EDIT */ if(OSD_GetObjListCount(ol) == 0) break; get_tp_at(s_node.sat_id,sel, &t_node); choice = win_tpe_open(0, s_node.sat_id, t_node.tp_id); if( choice) { win_tpe_get_setting(&freq, &symb, &pol); if(freq != t_node.frq || symb != t_node.sym || pol != t_node.pol) { t_node.frq = freq; t_node.sym = symb; t_node.pol = pol; modify_tp(t_node.tp_id,&t_node); api_stop_timer(&tpturn_timer_id); tpturn_timer_id = api_start_timer(TPTURN_TIMER_NAME, TPTURN_TIMER_TIME, win_tplist_tpturn_handler); } } //OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); OSD_TrackObject( (POBJECT_HEAD)&g_win_tplist, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); break; case VACT_TP_ADD: if(OSD_GetObjListCount(ol) == MAX_TP_NUM) break; extern UINT32 edit_tp_exist; edit_tp_exist = 0; choice = win_tpe_open(1, s_node.sat_id, 0); if(choice) { win_tpe_get_setting(&freq, &symb, &pol); MEMSET(&t_node,0,sizeof(t_node) ); t_node.frq = freq; t_node.sym = symb; t_node.pol = pol; t_node.sat_id = s_node.sat_id; iret = add_node(TYPE_TP_NODE,s_node.sat_id,(void*)&t_node); if((iret == DBERR_MAX_LIMIT) || (iret == DBERR_FLASH_FULL)) { OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); win_compopup_init(WIN_POPUP_TYPE_OK); win_compopup_set_msg(NULL,NULL, RS_DISPLAY_TOO_MANY_TP); win_compopup_open_ext(&back_saved); break; } OSD_SetObjListCount(ol, OSD_GetObjListCount(ol) + 1); //OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); OSD_TrackObject( (POBJECT_HEAD)&g_win_tplist, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); OSD_ChangeFocus((POBJECT_HEAD)ol,OSD_GetObjListCount(ol) - 1, C_DRAW_SIGN_EVN_FLG | C_UPDATE_FOCUS); api_stop_timer(&tpturn_timer_id); tpturn_timer_id = api_start_timer(TPTURN_TIMER_NAME, TPTURN_TIMER_TIME, win_tplist_tpturn_handler); } else { OSD_TrackObject( (POBJECT_HEAD)&g_win_tplist, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); //OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); if( edit_tp_exist > 0) { OSD_ChangeFocus((POBJECT_HEAD)ol,edit_tp_exist - 1, C_DRAW_SIGN_EVN_FLG | C_UPDATE_FOCUS); edit_tp_exist = 0; } //OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); } break; case VACT_TP_DEL: /* If not TP, can't DEL */ if(OSD_GetObjListCount(ol) == 0) break; win_compopup_init(WIN_POPUP_TYPE_OKNO); win_compopup_set_msg(NULL, NULL,RS_DISPLAY_SURE_TO_DELETE); if(win_compopup_open_ext(&back_saved) != WIN_POP_CHOICE_YES) break; get_tp_at(s_node.sat_id,sel, &t_node); del_tp_by_id(t_node.tp_id); OSD_SetObjListCount(ol, OSD_GetObjListCount(ol) -1); OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); if( OSD_GetObjListCount(ol) > 0) { if(sel == OSD_GetObjListCount(ol)) /* Delete last TP */ OSD_ChangeFocus((POBJECT_HEAD)ol,OSD_GetObjListCount(ol) - 1, C_DRAW_SIGN_EVN_FLG | C_UPDATE_FOCUS); else tpturn_timer_id = api_start_timer(TPTURN_TIMER_NAME, TPTURN_TIMER_TIME, win_tplist_tpturn_handler); } break; case VACT_TP_SRCH: /* If not TP, can't SEARCH */ if(OSD_GetObjListCount(ol) == 0) break; sys_data_set_cur_satidx(cur_tp_sat_idx); tp_list_pos = OSD_GetObjListCurPoint(ol); tp_list_top = OSD_GetObjListTop(ol); choice = win_tpsrch_open(&ftaonly_VPid,&srch_chan_APid,&nit_PPid); if(choice==1) { win_tpsrch_set_search_param(ftaonly_VPid,srch_chan_APid,nit_PPid); sub_menu = (POBJECT_HEAD)&g_win_search; wincom_close_help(); if(OSD_ObjOpen(sub_menu, 0xFFFFFFFF) != PROC_LEAVE) { menu_stack_push(sub_menu); set_movedish_flag(TRUE);/*only tp search,need not moving dish when return*/ } } else if(choice==2) //pid search { tp_VPid = ftaonly_VPid; tp_APid = srch_chan_APid; tp_PPid = nit_PPid; prog_callback_register((prog_node_return)win_tplist_set_search_pid_callback); get_tp_at(s_node.sat_id,sel,&t_node); win_search_set_pid_param(t_node.tp_id, tp_VPid, tp_APid, tp_PPid); win_tpsrch_set_search_param(P_SEARCH_FTA|P_SEARCH_SCRAMBLED,P_SEARCH_TV|P_SEARCH_RADIO,0); sub_menu = (POBJECT_HEAD)&g_win_search; wincom_close_help(); if(OSD_ObjOpen(sub_menu, 0xFFFFFFFF) != PROC_LEAVE) menu_stack_push(sub_menu); } else { //OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); OSD_TrackObject( (POBJECT_HEAD)&g_win_tplist, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); } break; } return ret; }
static PRESULT map_city_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT8 back_saved; INT32 news_list_num = 0; UINT8 focusID = OSD_GetFocusID( pObj); char strTmp[30]; switch(event) { case EVN_PRE_OPEN: #ifdef EXIT_KEY_EXIT_ALL_MENU exit_key_flag = FALSE; #endif bMapDownloading = FALSE; map_city_list_load(); break; case EVN_POST_OPEN: wincom_open_subtitle(pObj,RS_MAP,0); //wincom_open_commen_help(pObj); wincom_open_help_OK_list_small(pObj, map_city_helpinfo, HELP_CNT); memset(search_string, 0x0, sizeof(search_string)); break; case EVN_PRE_CLOSE: map_download_abort(s_mapdl_handle); s_mapdl_handle = 0; sys_data_save(1); break; case EVN_POST_CLOSE: SetReplayHintState(0); ShowReplayHintOSDOnOff(0); wincom_close_subtitle(); wincom_close_help(); #ifdef EXIT_KEY_EXIT_ALL_MENU if( exit_key_flag == TRUE) { exit_key_flag =FALSE; mm_leave_all_menu(); } #endif break; case EVN_MSG_GOT: if (param1 == CTRL_MSG_SUBTYPE_STATUS_DOWNLOAD_FINISH) { bMapDownloading = FALSE; s_mapdl_handle = 0; if ((int)param2 >= 0) { win_compopup_smsg_restoreback(); wincom_close_subtitle(); wincom_close_help(); OSD_ClearObject((POBJECT_HEAD)&g_win_map_display,0); if(OSD_ObjOpen(&g_win_map_display, param2) != PROC_LEAVE) { menu_stack_push(&g_win_map_display); } } else { win_compopup_smsg_restoreback(); win_compopup_init(WIN_POPUP_TYPE_OK); //ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_ERROR),strTmp); win_compopup_set_msg(NULL,NULL,RS_ERROR); win_compopup_open_ext(&back_saved); ret = PROC_LOOP; } } break; default: break; } return ret; }
static PRESULT win_an_set_unkown_act_proc(VACTION act) { // PRESULT ret = PROC_PASS; /* sky.bi 20110114 */ switch(act) { case VACT_SINGLE_SEARCH: single_multi_srch_flag = 0; if(check_node_modified(TYPE_SAT_NODE) ) { UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_SMSG); win_compopup_set_msg(NULL, NULL, RS_MSG_SAVING_DATA); win_compopup_open_ext(&back_saved); update_data(TYPE_SAT_NODE); osal_task_sleep(500); win_compopup_smsg_restoreback(); } if(OSD_ObjOpen((POBJECT_HEAD)&g_win_sat_srchset, 0xFFFFFFFF) != PROC_LEAVE) menu_stack_push((POBJECT_HEAD)&g_win_sat_srchset); wincom_close_help(); break; case VACT_MULTI_SEARCH: single_multi_srch_flag = 1; if(check_node_modified(TYPE_SAT_NODE) ) { UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_SMSG); win_compopup_set_msg(NULL, NULL, RS_MSG_SAVING_DATA); win_compopup_open_ext(&back_saved); update_data(TYPE_SAT_NODE); osal_task_sleep(500); win_compopup_smsg_restoreback(); } if(OSD_ObjOpen((POBJECT_HEAD)&g_win_sat_srchset, 0xFFFFFFFF) != PROC_LEAVE) menu_stack_push((POBJECT_HEAD)&g_win_sat_srchset); wincom_close_help(); break; case VACT_TP_SEARCH: if(check_node_modified(TYPE_SAT_NODE) ) { UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_SMSG); win_compopup_set_msg(NULL, NULL, RS_MSG_SAVING_DATA); win_compopup_open_ext(&back_saved); update_data(TYPE_SAT_NODE); osal_task_sleep(500); win_compopup_smsg_restoreback(); } if(OSD_ObjOpen((POBJECT_HEAD)&g_win_tplist, 0xFFFFFFFF) != PROC_LEAVE) { menu_stack_push((POBJECT_HEAD)&g_win_tplist); // FIXED_PRINTF("menu_count :%d\n",menu_stack_get_menu_count()); } break; /*sky.bi 20110112*/ #if 0 //defined(ORDER_GZ1011006) case VACT_ANTENNA_MENU: { g_enter_antenna_menu_flag = 1; // FIXED_PRINTF("VACT_ANTENNA_MENU OSD_ObjOpen menu_count 0:%d\n",menu_stack_get_menu_count()); if(OSD_ObjOpen((POBJECT_HEAD)&g_win_antenna_connect, MENU_OPEN_TYPE_MENU) != PROC_LEAVE) { win_signal_close(); // FIXED_PRINTF("VACT_ANTENNA_MENU OSD_ObjOpen menu_count 1:%d\n",menu_stack_get_menu_count()); menu_stack_pop(); menu_stack_push((POBJECT_HEAD)&g_win_antenna_connect); // FIXED_PRINTF("VACT_ANTENNA_MENU OSD_ObjOpen menu_count 2:%d\n",menu_stack_get_menu_count()); } // ret = VACT_CLOSE; //sky.bi 20110114 break; } #endif } // return ret; //sky.bi 20110114 }