void win_av_init_items(void) { static BOOL init = FALSE; UINT32 vcr_loop_item_flag; UINT32 rf_item_flag; POBJECT_HEAD first_item; CONTAINER* root = &win_av_con; if(!init) { vcr_loop_item_flag = 0; rf_item_flag = 1; if(!vcr_loop_item_flag) remove_menu_item(root,(POBJECT_HEAD)av_items[VCR_ID - 1],CON_H + CON_GAP); if(!rf_item_flag) { remove_menu_item(root,(POBJECT_HEAD)av_items[RFSYSTEM_ID - 1],CON_H + CON_GAP); remove_menu_item(root,(POBJECT_HEAD)av_items[RFCHAN_ID - 1],CON_H + CON_GAP); } init = TRUE; } }
static PRESULT av_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; VACTION unact; POBJECT_HEAD submenu; switch(event) { case EVN_PRE_OPEN: wincom_open_subtitle((POBJECT_HEAD)&win_av_con,RS_SYSTEM_TV_SYSTEM, 0); win_av_load_setting(); win_av_set_vcrloop_action(FALSE); win_av_init_items(); #ifdef NEW_DEMO_FRAME remove_menu_item((POBJECT_HEAD)&win_av_con, (OBJECT_HEAD *)&av_item_con5, CON_H + CON_GAP); remove_menu_item((POBJECT_HEAD)&win_av_con, (OBJECT_HEAD *)&av_item_con6, CON_H + CON_GAP); remove_menu_item((POBJECT_HEAD)&win_av_con, (OBJECT_HEAD *)&av_item_con7, CON_H + CON_GAP); #endif break; case EVN_POST_OPEN: wincom_open_commen_help(pObj); wincom_open_help(pObj,0,0); 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(); OSD_ClearScreen(); if((sys_data_get_sate_group_num(sys_data_get_cur_chan_mode())==0)) OSD_DrawObject((POBJECT_HEAD)&g_win_mainmenu,C_UPDATE_ALL); win_open_submenu_title(submenu,sub_menu_desc->title_id, 0); //guop break; case EVN_MSG_GOT: if(param1 == CTRL_MSG_SUBTYPE_CMD_TVSAT_SWITCH) { win_av_load_tv_mode_setting(TRUE); ret = PROC_LOOP; } break; default: break; } return ret; }
static PRESULT timerset_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT8 msg_flag; switch(event) { case EVN_PRE_OPEN: win_timer_load(&timer_set); #ifdef SUPPORT_MSG msg_flag = 1; #else msg_flag = 0; #endif if(!msg_flag) remove_menu_item((CONTAINER *)pObj, (POBJECT_HEAD)&timer_con_servicetype, (CON_H + CON_GAP)); break; case EVN_POST_OPEN: break; case EVN_PRE_CLOSE: /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: wincom_open_subtitle(pObj,RS_SYSTEM_TIMER_SETTING,0); break; } return ret; }
static PRESULT lan_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT32 i; UINT8 unact; BOOL subt_popup; CONTAINER* cont = (CONTAINER*)pObj; UINT8 id = OSD_GetObjID(pObj); SYSTEM_DATA* p_sys_data; UINT8 lang_code[8]; switch(event) { case EVN_PRE_OPEN: wincom_open_subtitle((POBJECT_HEAD)&win_lan_con,RS_SYSTEM_LANGUAGE, 0); p_sys_data=sys_data_get(); win_lan_set_menu_lan_string(p_sys_data->lang.OSD_lang); win_lan_set_1st_audio_lan_string(p_sys_data->lang.Audio_lang_1); win_lan_set_2nd_audio_lan_string(p_sys_data->lang.Audio_lang_2); win_lan_set_subtitle_lan_string(p_sys_data->lang.sub_lang); win_lan_set_teletext_lan_string(p_sys_data->lang.ttx_lang); #ifdef SUPPORT_POP_SUBT subt_popup = TRUE; #else subt_popup = FALSE; #endif if(subt_popup) { remove_menu_item(&win_lan_con, (POBJECT_HEAD)lan_items[3], (CON_H + CON_GAP)); } break; case EVN_POST_OPEN: break; case EVN_PRE_CLOSE: #ifdef EPG_MULTI_LANG /*set epg language*/ p_sys_data = sys_data_get(); STRCPY(lang_code,stream_iso_639lang_abbr[p_sys_data->lang.OSD_lang]); epg_set_lang_code(lang_code); #endif #ifndef NEW_DEMO_FRAME UIChChgApplyAudLanguage(); #endif sys_data_save(1); /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: TTXEng_set_g0_set(); wincom_close_subtitle(); OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL); break; } return ret; }
static PRESULT av_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; VACTION unact; switch(event) { case EVN_PRE_OPEN: wincom_open_subtitle((POBJECT_HEAD)&win_av_con,RS_SYSTEM_TV_SYSTEM, 0); win_av_load_setting(); win_av_set_vcrloop_action(FALSE); win_av_init_items(); #ifdef NEW_DEMO_FRAME remove_menu_item((POBJECT_HEAD)&win_av_con, (OBJECT_HEAD *)&av_item_con5, CON_H + CON_GAP); remove_menu_item((POBJECT_HEAD)&win_av_con, (OBJECT_HEAD *)&av_item_con6, CON_H + CON_GAP); remove_menu_item((POBJECT_HEAD)&win_av_con, (OBJECT_HEAD *)&av_item_con7, CON_H + CON_GAP); #endif break; case EVN_PRE_CLOSE: sys_data_save(1); /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: #ifndef _BUILD_OTA_E_ wincom_close_subtitle(); OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL); #endif break; case EVN_MSG_GOT: if(param1 == CTRL_MSG_SUBTYPE_CMD_TVSAT_SWITCH) { win_av_load_tv_mode_setting(TRUE); ret = PROC_LOOP; } break; default: break; } return ret; }
static PRESULT av_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; VACTION unact; switch(event) { case EVN_PRE_OPEN: wincom_open_title((POBJECT_HEAD)&win_av_con,RS_SYSTEM_TV_SYSTEM, 0); win_av_load_setting(); win_av_set_vcrloop_action(FALSE); win_av_init_items(); #ifdef SCART_RGB_UNSUPPORT remove_menu_item(&win_av_con, (OBJECT_HEAD *)&av_item_con3, CON_H + CON_GAP); #endif #ifdef HDMI_CERTIFICATION_UI remove_menu_item(&win_av_con, (OBJECT_HEAD *)&av_item_con3, CON_H + CON_GAP); remove_menu_item(&win_av_con, (OBJECT_HEAD *)&av_item_con5, CON_H + CON_GAP); remove_menu_item(&win_av_con, (OBJECT_HEAD *)&av_item_con6, CON_H + CON_GAP); #else #ifdef NEW_DEMO_FRAME remove_menu_item(&win_av_con, (OBJECT_HEAD *)&av_item_con5, CON_H + CON_GAP); remove_menu_item(&win_av_con, (OBJECT_HEAD *)&av_item_con6, CON_H + CON_GAP); remove_menu_item(&win_av_con, (OBJECT_HEAD *)&av_item_con7, CON_H + CON_GAP); #endif #endif break; case EVN_PRE_CLOSE: sys_data_save(1); /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_MSG_GOT: if(param1 == CTRL_MSG_SUBTYPE_CMD_TVSAT_SWITCH) { win_av_load_tv_mode_setting(TRUE); ret = PROC_LOOP; } break; default: break; } return ret; }
int windelmenu(const char * menu, char *errmsg) { int i, j, count = 0, len = strlen(menu); j = 0; for (i = 0; i < nmenus; i++) { if (strcmp(menu, usermenunames[i]) == 0 || (strncmp(menu, usermenunames[i], len) == 0 && usermenunames[i][len] == '/')) { remove_menu_item(usermenus[i]); count++; } else { if (j < i) { strcpy(usermenunames[j], usermenunames[i]); usermenus[j] = usermenus[i]; } j++; } } nmenus -= count; if (!count) { strcpy(errmsg, G_("menu does not exist")); return 3; } /* Delete any menu items in this menu */ for (j = nitems - 1; j >= 0; j--) { if (strncmp(menu, umitems[j]->name, len) == 0 && umitems[j]->name[len] == '/') windelmenuitem(umitems[j]->name + len + 1, menu, errmsg); } show(RConsole); return 0; }
static PRESULT satsrch_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; MULTISEL* msel; UINT16 title_id,sat_idx,sat_cnt; OSD_RECT rect; POBJECT_HEAD lastitem; SYSTEM_DATA* sys_data = sys_data_get(); UINT16 i; UINT8 flag; S_NODE s_node; switch(event) { case EVN_PRE_OPEN: sat_idx = 0; if(!single_multi_srch_flag) { if(sys_data_get_cur_satidx() == (UINT16)(~0)) sat_idx = win_load_default_satidx(); else sat_idx = sys_data_get_cur_satidx(); } recreate_sat_view(VIEW_ALL, 0); #if (defined(SUPPORT_TWO_TUNER) || !defined(SELECT_SAT_ONLY)) for(i=0;i<get_sat_num(VIEW_ALL);i++) { get_sat_at((UINT16)i,VIEW_ALL,&s_node); flag = s_node.tuner1_valid | s_node.tuner2_valid; if(s_node.selected_flag != flag) { s_node.selected_flag = flag; modify_sat(s_node.sat_id, &s_node); } } #endif msel = satsrch_sels[SAT_ID - 1]; sat_cnt = get_tuner_sat_cnt(TUNER_EITHER_SELECT); OSD_SetMultiselCount(msel, sat_cnt); if(sat_idx >= sat_cnt) { sat_idx = 0; } OSD_SetMultiselSel(msel,sat_idx); if(single_multi_srch_flag) title_id = RS_INSTALLATION_MULTI_SEARCH; else title_id = RS_INSTALLATION_SINGLE_SEARCH; wincom_open_subtitle(pObj,title_id,0); /*lastitem = (POBJECT_HEAD)&satsrch_item7; if(single_multi_srch_flag) OSD_SetObjpNext(lastitem, &satsrch_multisats_back); //OSD_SetObjpNext(lastitem, NULL); else OSD_SetObjpNext(lastitem, NULL);*/ win_satsrch_set_nitactive(FALSE); set_container_active(&satsrch_item6, C_ATTR_INACTIVE); get_sat_at(sat_idx,SET_SELECTED,&s_node); if(sys_data->antenna_connect_type == ANTENNA_CONNECT_DUAL_DIFF) { #ifdef SUPPORT_SELECT_SAME_SAT OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, ((s_node.reserve_1 == 0)? RS_LNB1 : RS_LNB2)); #else OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, (s_node.tuner1_valid ? RS_LNB1 : RS_LNB2)); #endif } else { OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, RS_LNB1); } OSD_DrawObject((POBJECT_HEAD)&satsrch_txt6_note, C_UPDATE_ALL); #ifndef SUPPORT_TWO_TUNER remove_menu_item(&g_win_sat_srchset,(POBJECT_HEAD)&satsrch_item6,(CON_H + CON_GAP)); //guop add #endif break; case EVN_POST_OPEN: if(single_multi_srch_flag == 1) { OSD_DrawObject((POBJECT_HEAD)&satsrch_split,C_UPDATE_ALL); } win_satsrch_set_drawselectsats(); break; case EVN_PRE_CLOSE: /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: wincom_close_subtitle(); OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL); break; } return ret; }
static PRESULT tms_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT8 unact; UINT32 i; BOOL subt_flag; CONTAINER* cont = (CONTAINER*)pObj; UINT8 id = OSD_GetObjID(pObj); char new_volume[16]; switch(event) { case EVN_PRE_OPEN: wincom_open_subtitle((POBJECT_HEAD)&g_win_timeshift,RS_DVR_CONFIGURATION, 0); win_tms_set_string(sys_data_get_tms(),&tms_item_txtset1); win_tms_set_string(sys_data_get_tms2rec(),&tms_item_txtset2); win_set_rec_type_string(sys_data_get_rec_type(),&tms_item_txtset3); #if (defined(MULTI_PARTITION_SUPPORT) && !defined(DISK_MANAGER_SUPPORT)) win_pvr_vol_init(); win_set_vol_string(&tms_item_txtset4); #endif tms_set_tms2rec_item_active(FALSE); #ifdef NEW_DEMO_FRAME OSD_SetContainerFocus(&g_win_timeshift, 4); remove_menu_item((POBJECT_HEAD)&g_win_timeshift, (OBJECT_HEAD *)&tms_item_con1, CON_H + CON_GAP); remove_menu_item((POBJECT_HEAD)&g_win_timeshift, (OBJECT_HEAD *)&tms_item_con2, CON_H + CON_GAP); remove_menu_item((POBJECT_HEAD)&g_win_timeshift, (OBJECT_HEAD *)&tms_item_con3, CON_H + CON_GAP); #else OSD_SetContainerFocus(&g_win_timeshift, 1); #endif break; case EVN_POST_OPEN: #if(defined(MULTI_PARTITION_SUPPORT) && !defined(DISK_MANAGER_SUPPORT)) win_pvr_vol_invalid_msg(); #endif break; case EVN_PRE_CLOSE: *((UINT32 *)param2) &= ~C_CLOSE_CLRBACK_FLG; #if (defined(MULTI_PARTITION_SUPPORT) && !defined(DISK_MANAGER_SUPPORT)) win_pvr_vol_save(); #endif sys_data_save(1); break; case EVN_POST_CLOSE: break; case EVN_UNKNOWN_ACTION: if (api_pvr_is_record_active()) break; if (sys_data_get_tms() == 0) { win_popup_choice_t choice; UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_OKNO); win_compopup_set_msg(NULL, NULL, RS_ARE_YOU_SURE_TO_ENTER_RECORD_TP_MODE); if (pvr_r_get_record_all()) win_compopup_set_default_choice(WIN_POP_CHOICE_YES); else win_compopup_set_default_choice(WIN_POP_CHOICE_NO); choice = win_compopup_open_ext(&back_saved); if(choice == WIN_POP_CHOICE_YES) { pvr_r_set_record_all(TRUE); } else if (choice == WIN_POP_CHOICE_NO) { pvr_r_set_record_all(FALSE); } } else { #ifdef PVR3_SUPPORT win_popup_choice_t choice; UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_OKNO); win_compopup_set_msg(NULL, NULL, RS_CONTINUE_TMS_SUPPORT); if (pvr_r_get_record_all()) win_compopup_set_default_choice(WIN_POP_CHOICE_YES); else win_compopup_set_default_choice(WIN_POP_CHOICE_NO); choice = win_compopup_open_ext(&back_saved); if(choice == WIN_POP_CHOICE_YES) { pvr_info.continue_tms = 1; } else { pvr_info.continue_tms = 0; } #endif } { win_popup_choice_t choice; UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_OKNO); win_compopup_set_msg(NULL, NULL, RS_RECORD_CA_PROGRAM_IN_DESCRAMBLED_FORMAT); if (sys_data_get_scramble_record_mode()) win_compopup_set_default_choice(WIN_POP_CHOICE_NO); else win_compopup_set_default_choice(WIN_POP_CHOICE_YES); choice = win_compopup_open_ext(&back_saved); if (choice == WIN_POP_CHOICE_YES) { sys_data_set_scramble_record_mode(0); } else if (choice == WIN_POP_CHOICE_NO) { sys_data_set_scramble_record_mode(1); pvr_r_set_scramble(); } } break; } return ret; }
static void win_miscset_load_setting(void) { CONTAINER *win,*scditem,*lastitem; MULTISEL *msel; TEXT_FIELD *pTxt; SYSTEM_DATA* sys_data; POBJECT_HEAD pObj; BOOL beeper_flag,lnb_power_flag,chchg_video_flag; sys_data = sys_data_get(); /* LNB Power */ msel =&miscset_sel0; OSD_SetMultiselSel(msel, sys_data->bLNB_power); /* Change change channel type */ if(sys_data->chan_sw>=3) sys_data->chan_sw = 0; msel =&miscset_sel1; OSD_SetMultiselSel(msel, sys_data->chan_sw); /* Change change video type */ msel =&miscset_sel2; OSD_SetMultiselSel(msel, sys_data->chchgvideo_type); /* Beep */ msel =&miscset_sel3; OSD_SetMultiselSel(msel, sys_data->install_beep); win = &g_win_misc_setting; #if( SYS_LNB_POWER_OFF == SYS_FUNC_ON) lnb_power_flag = TRUE; #else lnb_power_flag = FALSE; #endif #ifdef CHANCHG_VIDEOTYPE_SUPPORT chchg_video_flag = TRUE; #else chchg_video_flag = FALSE; #endif #ifdef ANTENNA_INSTALL_BEEP beeper_flag = TRUE; #else beeper_flag = FALSE; #endif if(!lnb_power_flag) remove_menu_item(win, (OBJECT_HEAD *)misc_menu_items[LNBPOWER_ID - 1], CON_H + CON_GAP); if(!chchg_video_flag) remove_menu_item(win, (OBJECT_HEAD *)misc_menu_items[CHANCHG_VIDEO_ID - 1], CON_H + CON_GAP); if(!beeper_flag) remove_menu_item(win, (OBJECT_HEAD *)misc_menu_items[INSTALLBEEP_ID - 1], CON_H + CON_GAP); #ifndef RAM_TMS_TEST remove_menu_item(win, (OBJECT_HEAD *)&miscset_item5, CON_H + CON_GAP); #endif #if !defined(AUTOMATIC_STANDBY) remove_menu_item(win,(POBJECT_HEAD)&miscset_item3,CON_H + CON_GAP); #endif remove_menu_item(win,(POBJECT_HEAD)&miscset_item0,CON_H + CON_GAP); remove_menu_item(win,(POBJECT_HEAD)&miscset_item1,CON_H + CON_GAP); /*Disable/Endable auto standby*/ msel = &miscset_sel4; pTxt = &miscset_txt4; OSD_SetMultiselSel(msel,sys_data->auto_standby_en); OSD_SetTextFieldStrPoint(pTxt,display_strs[1]); // OSD_SetTextFieldContent(pTxt,STRING_ANSI,(UINT32)"Auto Standby"); OSD_SetTextFieldContent(pTxt, STRING_UNICODE,(UINT32)OSD_GetUnicodeString(RS_AUTO_STANDBY)); /* Disable/Endable ram timeshift */ #ifdef RAM_TMS_TEST msel = &miscset_sel5; pTxt = &miscset_txt5; OSD_SetMultiselSel(msel,sys_data->ram_tms_en); OSD_SetTextFieldStrPoint(pTxt,display_strs[2]); OSD_SetTextFieldContent(pTxt,STRING_ANSI,(UINT32)"RAM Timeshift"); #endif #ifdef ORDER_GZ1207009 msel = &miscset_sel6; pTxt = &miscset_txt6; OSD_SetMultiselSel(msel,sys_data->standbymode); OSD_SetTextFieldStrPoint(pTxt,display_strs[3]); // OSD_SetTextFieldContent(pTxt,STRING_ANSI,(UINT32)"Auto Standby"); OSD_SetTextFieldContent(pTxt, STRING_UNICODE,(UINT32)OSD_GetUnicodeString(RS_STANDBY_MODE)); #endif }
static PRESULT satsrch_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; MULTISEL* msel; UINT16 title_id,sat_idx,sat_cnt; OSD_RECT rect; POBJECT_HEAD lastitem; SYSTEM_DATA* sys_data = sys_data_get(); UINT16 i; UINT8 flag; S_NODE s_node; switch(event) { case EVN_PRE_OPEN: #ifdef EXIT_KEY_EXIT_ALL_MENU exit_key_flag = FALSE; #endif sat_idx = 0; if(!single_multi_srch_flag) { if(sys_data_get_cur_satidx() == (UINT16)(~0)) sat_idx = win_load_default_satidx(); else sat_idx = sys_data_get_cur_satidx(); } recreate_sat_view(VIEW_ALL, 0); #if (defined(SUPPORT_TWO_TUNER) || !defined(SELECT_SAT_ONLY)) for(i=0; i<get_sat_num(VIEW_ALL); i++) { get_sat_at((UINT16)i,VIEW_ALL,&s_node); flag = s_node.tuner1_valid | s_node.tuner2_valid; if(s_node.selected_flag != flag) { s_node.selected_flag = flag; modify_sat(s_node.sat_id, &s_node); } } #endif msel = satsrch_sels[SAT_ID - 1]; sat_cnt = get_tuner_sat_cnt(TUNER_EITHER_SELECT); OSD_SetMultiselCount(msel, sat_cnt); /*if(sat_idx >= sat_cnt)//albert.li del 2011.7.6 { sat_idx = 0; } OSD_SetMultiselSel(msel,sat_idx);*/ sat_idx=get_sat_idx_in_selected_sats(sat_cnt);//albert.li add 2011.7.6 OSD_SetMultiselSel(msel,sat_idx); if(single_multi_srch_flag) title_id = RS_INSTALLATION_MULTI_SEARCH; else title_id = RS_INSTALLATION_SINGLE_SEARCH; //wincom_open_subtitle(pObj,title_id,0); wincom_open_subtitle_ex(pObj,title_id,0,-15,0,-10);//albert.li add 2011.6.21 /*lastitem = (POBJECT_HEAD)&satsrch_item7; if(single_multi_srch_flag) OSD_SetObjpNext(lastitem, &satsrch_multisats_back); //OSD_SetObjpNext(lastitem, NULL); else OSD_SetObjpNext(lastitem, NULL);*/ win_satsrch_set_nitactive(FALSE); set_container_active(&satsrch_item6, C_ATTR_INACTIVE); get_sat_at(sat_idx,SET_SELECTED,&s_node); if(sys_data->antenna_connect_type == ANTENNA_CONNECT_DUAL_DIFF) { #ifdef SUPPORT_SELECT_SAME_SAT OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, ((s_node.reserve_1 == 0)? RS_LNB1 : RS_LNB2)); #else OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, (s_node.tuner1_valid ? RS_LNB1 : RS_LNB2)); #endif } else { OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, RS_LNB1); } OSD_DrawObject((POBJECT_HEAD)&satsrch_txt6_note, C_UPDATE_ALL); #ifndef SUPPORT_TWO_TUNER remove_menu_item(&g_win_sat_srchset,(POBJECT_HEAD)&satsrch_item6,(CON_H + CON_GAP)); //guop add #endif break; case EVN_POST_OPEN: //wincom_open_help(pObj,search_set_helpinfo, HELP_CNT); wincom_open_commen_help(pObj); if(single_multi_srch_flag == 1) { OSD_DrawObject((POBJECT_HEAD)&satsrch_split,C_UPDATE_ALL); } sat_cnt = get_tuner_sat_cnt(TUNER_EITHER_SELECT); if(sat_cnt <=(SELSAT_ROW_CNT*2)) win_satsrch_set_fix_drawselectsats(); else { start_scroll_sat_id=0; //api_stop_timer(&sat_display_scroll); sat_display_scroll = api_start_timer("SATDISP",500,(OSAL_T_TIMER_FUNC_PTR)sat_search_scroll_disp_handler); } break; case EVN_PRE_CLOSE: /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: api_stop_timer(&sat_display_scroll); wincom_close_subtitle(); OSD_ClearObject((POBJECT_HEAD)&g_win_sat_srchset,C_UPDATE_ALL);//albert.li add //OSD_TrackObject( (POBJECT_HEAD) &g_win_submenu/*g_win_mainmenu*/, C_UPDATE_ALL); #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_CMD_SAT_SCROLL_DISP) { start_scroll_sat_id=win_satsrch_set_scroll_drawselectsats(start_scroll_sat_id); if(sat_display_scroll!=OSAL_INVALID_ID) { api_stop_timer(&sat_display_scroll); sat_display_scroll = api_start_timer("SATDISP",500,(OSAL_T_TIMER_FUNC_PTR)sat_search_scroll_disp_handler); } } break; } return ret; }
static PRESULT pvr_setting_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT8 unact; UINT32 i; BOOL subt_flag; CONTAINER* cont = (CONTAINER*)pObj; UINT8 id = OSD_GetObjID(pObj); static UINT8 preval; SYSTEM_DATA* p_sys_data; switch(event) { case EVN_PRE_OPEN: wincom_open_title((POBJECT_HEAD)&win_osdset_con, RS_PVR_SETTING, 0); p_sys_data=sys_data_get(); win_pvr_setting_timeshift_set_string(p_sys_data->timeshift); win_pvr_setting_jumpstep_set_string(p_sys_data->jumpstep); win_pvr_setting_scramble_record_mode_set_string(p_sys_data->scramble_record_mode); remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con3, CON_H + CON_GAP); win_pvr_setting_ts_file_size_set_string(p_sys_data->record_ts_file_size); remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con4, CON_H + CON_GAP); win_pvr_setting_tms2rec_set_string(p_sys_data->tms2rec); win_pvr_setting_ttx_subt_set_string(p_sys_data->record_ttx_subt); remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con6, CON_H + CON_GAP); win_pvr_setting_rec_num_set_string(p_sys_data->rec_num); remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con7, CON_H + CON_GAP); #ifdef NEW_DEMO_FRAME win_pvr_setting_record_ps_set_string(p_sys_data->rec_ps_enable); #else remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con8, CON_H + CON_GAP); #endif break; case EVN_POST_OPEN: break; case EVN_PRE_CLOSE: *((UINT32 *)param2) &= ~C_CLOSE_CLRBACK_FLG; p_sys_data=sys_data_get(); sys_data_save(1); #ifndef PVR3_SUPPORT pvr_r_set_ts_file_size(p_sys_data->record_ts_file_size + 1); #endif //api_pvr_jumpstep_trans(); break; case EVN_POST_CLOSE: break; case EVN_UNKNOWN_ACTION: if (api_pvr_is_record_active()) break; win_popup_choice_t choice; UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_OKNO); win_compopup_set_msg("Record CA program in descrambled format?", NULL, 0); if (sys_data_get_scramble_record_mode()) win_compopup_set_default_choice(WIN_POP_CHOICE_YES); else win_compopup_set_default_choice(WIN_POP_CHOICE_NO); choice = win_compopup_open_ext(&back_saved); if (choice == WIN_POP_CHOICE_YES) { sys_data_set_scramble_record_mode(1); pvr_r_set_scramble_ext(0); } else if (choice == WIN_POP_CHOICE_NO) { sys_data_set_scramble_record_mode(0); pvr_r_set_scramble_ext(1); } break; } return ret; }
static void satshare_set_item_attr(BOOL update) { UINT32 card_share_mode=0; UINT8 mode_sel=0; char str[32]; char string[32]; UINT16 l,t,w,h; l=CON_L; w=CON_W; h=CON_H; mode_sel = OSD_GetMultiselSel(&satshare_item_multisel1); card_share_mode = get_card_share_mode(); #ifdef SPIELERCAM_SUPPORT if(mode_sel==MODE_NEWCAMD||mode_sel==MODE_CCCAM||mode_sel==MODE_SPIELERCAM) #else if(mode_sel==MODE_NEWCAMD||mode_sel==MODE_CCCAM) #endif { OSD_SetObjpNext(&satshare_item_con1,&satshare_item_con2); OSD_SetObjpNext(&satshare_item_con2,&satshare_item_con4); OSD_SetObjpNext(&satshare_item_con4,&satshare_item_con3); OSD_SetObjpNext(&satshare_item_con3,NULL); OSD_SetID(&satshare_item_con1,1,1,1,4,2); OSD_SetID(&satshare_item_con2,2,2,2,1,4); OSD_SetID(&satshare_item_con4,4,4,4,2,1); t=CON_T+(CON_H + CON_GAP)*1; OSD_SetRect(&satshare_item_con2.head.frame,l,t,w,h); OSD_SetRect(&satshare_item_txtname2.head.frame,l+TXT_L_OF,t+TXT_T_OF,w-2*TXT_L_OF,h-2*TXT_T_OF); t=CON_T+(CON_H + CON_GAP)*2; OSD_SetRect(&satshare_item_con4.head.frame,l,t,w,h); OSD_SetRect(&satshare_item_txtname4.head.frame,l+TXT_L_OF,t+TXT_T_OF,w-2*TXT_L_OF,h-2*TXT_T_OF); t=CON_T+(CON_H + CON_GAP)*3; OSD_SetRect(&satshare_item_con3.head.frame,l,t,w,h); OSD_SetRect(&satshare_item_txtname3.head.frame,l+TXT_L_OF,t+TXT_T_OF,TXT_W,h-2*TXT_T_OF); OSD_SetRect(&satshare_item_multisel3.head.frame,l+TXT_L_OF+TXT_W+10,t+TXT_T_OF,SEL_W,h-2*TXT_T_OF); remove_menu_item((POBJECT_HEAD)&g_win_sat_share, (OBJECT_HEAD *)&satshare_item_con3, CON_H + CON_GAP); } else if(mode_sel==MODE_TWIN||mode_sel==MODE_SSSP #ifndef SDS_NOSHOW ||mode_sel==MODE_SDS #endif #ifdef ORDER_GZ1011001_DISABLED ||mode_sel==MODE_OMEGA #else #ifndef IKS_NOSHOW ||mode_sel==MODE_IKS #endif #endif ) { OSD_SetObjpNext(&satshare_item_con1,&satshare_item_con3); OSD_SetObjpNext(&satshare_item_con3,&satshare_item_con4); OSD_SetObjpNext(&satshare_item_con4,&satshare_item_con2); OSD_SetObjpNext(&satshare_item_con2,NULL); OSD_SetID(&satshare_item_con1,1,1,1,4,3); OSD_SetID(&satshare_item_con3,3,3,3,1,4); OSD_SetID(&satshare_item_con4,4,4,4,3,1); t=CON_T+(CON_H + CON_GAP)*1; OSD_SetRect(&satshare_item_con3.head.frame,l,t,w,h); OSD_SetRect(&satshare_item_txtname3.head.frame,l+TXT_L_OF,t+TXT_T_OF,TXT_W,h-2*TXT_T_OF); OSD_SetRect(&satshare_item_multisel3.head.frame,l+TXT_L_OF+TXT_W+10,t+TXT_T_OF,SEL_W,h-2*TXT_T_OF); t=CON_T+(CON_H + CON_GAP)*2; OSD_SetRect(&satshare_item_con4.head.frame,l,t,w,h); OSD_SetRect(&satshare_item_txtname4.head.frame,l+TXT_L_OF,t+TXT_T_OF,w-2*TXT_L_OF,h-2*TXT_T_OF); t=CON_T+(CON_H + CON_GAP)*3; OSD_SetRect(&satshare_item_con2.head.frame,l,t,w,h); OSD_SetRect(&satshare_item_txtname2.head.frame,l+TXT_L_OF,t+TXT_T_OF,w-2*TXT_L_OF,h-2*TXT_T_OF); } memset(str,0,sizeof(str)); if(mode_sel==MODE_NEWCAMD) sprintf(str,"%s","Newcamd Config"); else if(mode_sel==MODE_CCCAM) sprintf(str,"%s","Cccam Config"); #ifdef SPIELERCAM_SUPPORT else if(mode_sel==MODE_SPIELERCAM) sprintf(str,"%s","Spidercam Config"); #endif else sprintf(str,"%s",""); OSD_SetTextFieldContent(&satshare_item_txtname2,STRING_ANSI,(UINT32)str); //memset(string,0,sizeof(string)); if(mode_sel==MODE_TWIN||mode_sel==MODE_SSSP #ifndef SDS_NOSHOW ||mode_sel==MODE_SDS #endif #ifdef ORDER_GZ1011001_DISABLED ||mode_sel==MODE_OMEGA #else #ifndef IKS_NOSHOW ||mode_sel==MODE_IKS #endif #endif ) { sprintf(string,"%s","Active"); if( (card_share_mode>>mode_sel)&0x01) { OSD_SetMultiselSel(&satshare_item_multisel3,1); } else {
static PRESULT pvr_setting_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT8 unact; UINT32 i; BOOL subt_flag; CONTAINER* cont = (CONTAINER*)pObj; UINT8 id = OSD_GetObjID(pObj); static UINT8 preval; SYSTEM_DATA* p_sys_data; switch(event) { case EVN_PRE_OPEN: #ifdef EXIT_KEY_EXIT_ALL_MENU exit_key_flag = FALSE; #endif wincom_open_subtitle((POBJECT_HEAD)&win_osdset_con, RS_PVR_SETTING, 0); p_sys_data=sys_data_get(); win_pvr_setting_timeshift_set_string(p_sys_data->timeshift); win_pvr_setting_jumpstep_set_string(p_sys_data->jumpstep); win_pvr_setting_scramble_record_mode_set_string(p_sys_data->scramble_record_mode); remove_menu_item(&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con3, CON_H + CON_GAP); win_pvr_setting_ts_file_size_set_string(p_sys_data->record_ts_file_size); remove_menu_item(&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con4, CON_H + CON_GAP); win_pvr_setting_tms2rec_set_string(p_sys_data->tms2rec); win_pvr_setting_ttx_subt_set_string(p_sys_data->record_ttx_subt); remove_menu_item(&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con6, CON_H + CON_GAP); win_pvr_setting_rec_num_set_string(p_sys_data->rec_num); remove_menu_item(&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con7, CON_H + CON_GAP); #ifdef NEW_DEMO_FRAME win_pvr_setting_record_ps_set_string(p_sys_data->rec_ps_enable); #ifdef SUPPORT_CAS9 remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con5, CON_H + CON_GAP); remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con8, CON_H + CON_GAP); #endif #else remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con8, CON_H + CON_GAP); #endif #ifdef PREVIEW_SUBMENU //-a by wangyang { POBJECT_HEAD focusObj=OSD_GetFocusObject(pObj); if(param2==MENU_OPEN_TYPE_OTHER) { pvr_setting_item_set[focusObj->bID-1]->style.bHLIdx=TXTS_SH_IDX; pvr_setting_item_name[focusObj->bID-1]->style.bHLIdx=TXTN_SH_IDX; } else { pvr_setting_item_set[focusObj->bID-1]->style.bHLIdx=TXTS_HL_IDX; pvr_setting_item_name[focusObj->bID-1]->style.bHLIdx=TXTN_HL_IDX; } } #endif break; case EVN_POST_OPEN: wincom_open_commen_help(pObj);//-a by wangyang break; case EVN_PRE_CLOSE: *((UINT32 *)param2) &= ~C_CLOSE_CLRBACK_FLG; p_sys_data=sys_data_get(); sys_data_save(1); #ifndef PVR3_SUPPORT pvr_r_set_ts_file_size(p_sys_data->record_ts_file_size + 1); #endif //api_pvr_jumpstep_trans(); break; case EVN_POST_CLOSE: wincom_close_subtitle(); OSD_ClearScreen(); #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; #ifdef PREVIEW_SUBMENU //-a by wangyang case EVN_MSG_GOT: 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_info_con, MENU_OPEN_TYPE_OTHER ); ret = PROC_LEAVE; } break; #endif case EVN_UNKNOWN_ACTION: if (api_pvr_is_record_active()) break; win_popup_choice_t choice; UINT8 back_saved; #ifndef CI_PLUS_PVR_SUPPORT if (sys_data_get_tms() == 0) { win_popup_choice_t choice; UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_OKNO); win_compopup_set_msg("Are you sure to enter record TP mode?", NULL, 0); if (pvr_r_get_record_all()) win_compopup_set_default_choice(WIN_POP_CHOICE_YES); else win_compopup_set_default_choice(WIN_POP_CHOICE_NO); choice = win_compopup_open_ext(&back_saved); if(choice == WIN_POP_CHOICE_YES) { pvr_r_set_record_all(TRUE); } else if (choice == WIN_POP_CHOICE_NO) { pvr_r_set_record_all(FALSE); } } else #endif { win_compopup_init(WIN_POPUP_TYPE_OKNO); win_compopup_set_msg("Record CA program in descrambled format?", NULL, 0); if (sys_data_get_scramble_record_mode()) win_compopup_set_default_choice(WIN_POP_CHOICE_YES); else win_compopup_set_default_choice(WIN_POP_CHOICE_NO); choice = win_compopup_open_ext(&back_saved); if (choice == WIN_POP_CHOICE_YES) { sys_data_set_scramble_record_mode(1); pvr_r_set_scramble_ext(0); } else if (choice == WIN_POP_CHOICE_NO) { sys_data_set_scramble_record_mode(0); pvr_r_set_scramble_ext(1); } } break; } return ret; }