static void win_atnsetm_load_tuner_configuration(void) { CONTAINER* tuner_item= &atnsetm_item1; CONTAINER* win =&g_win_antenna_set_motor; CONTAINER* lnb_item = &atnsetm_item2; MULTISEL* msel; POBJECT_HEAD pObj; UINT32 i,tuner_cnt; UINT8 action; static BOOL bFirstTime = 1; #ifdef SUPPORT_TWO_TUNER msel = anesetm_msels[TUNER_ID - 1]; tuner_cnt = get_tuner_cnt(); msel->nCount = tuner_cnt; if(antset_cur_tuner >= tuner_cnt) antset_cur_tuner = tuner_cnt - 1; msel->nSel = antset_cur_tuner; action = (tuner_cnt == 1)? C_ATTR_INACTIVE : C_ATTR_ACTIVE; OSD_SetAttr(tuner_item, action); pObj = OSD_GetContainerNextObj(tuner_item); while(pObj) { OSD_SetAttr(pObj , action); pObj = OSD_GetObjpNext(pObj); } if((C_ATTR_INACTIVE == action)&&(TUNER_ID == OSD_GetContainerFocus(win))) OSD_SetContainerFocus(win, LNB_ID); tuner_type_ids[0] = get_tuner_strid(0); tuner_type_ids[1] = get_tuner_strid(1); #else if(bFirstTime) { OSD_SetContainerNextObj(win,lnb_item); lnb_item->head.bUpID = tuner_item->head.bUpID; pObj = (POBJECT_HEAD)lnb_item; OSD_MoveObject(pObj,0, -(CON_H + CON_GAP), TRUE); while(pObj->pNext) { pObj = pObj->pNext; OSD_MoveObject(pObj,0, -(CON_H + CON_GAP), TRUE); } pObj->bDownID = lnb_item->head.bID; OSD_SetContainerFocus(win, LNB_ID); } bFirstTime = 0; #endif }
UINT32 win_youtube_open() { CONTAINER* win; PRESULT ret = PROC_LOOP; UINT32 hkey; TEXT_FIELD* txt; UINT16 strID; BOOL old_value = ap_enable_key_task_get_key(TRUE); txt = &youtube_opts_title; strID = RS_YOUTUBE_OPTION; OSD_SetTextFieldContent(txt, STRING_ID,(UINT32)strID); win = &win_youtube_opts_con; OSD_SetContainerFocus(win, MENU_YT_OPTS); OSD_ObjOpen((POBJECT_HEAD)win, 0); while(ret != PROC_LEAVE) { hkey = ap_get_popup_msg(C_POPUP_MSG_PASS_CI); if(hkey == INVALID_HK || hkey == INVALID_MSG) continue; ret = OSD_ObjProc((POBJECT_HEAD)win, (MSG_TYPE_KEY<<16),hkey, 0); } ap_enable_key_task_get_key(old_value); return youtube_search_ok; }
static PRESULT camail_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT32 i; switch(event) { case EVN_PRE_OPEN: for(i = 0; i < 20; i ++) { display_strs[i][0] = 0; } wincom_open_subtitle((POBJECT_HEAD)&g_win_mail,RS_CONAX_MAILBOX,0); break; case EVN_POST_OPEN: OSD_SetContainerFocus(&g_win_mail,1); break; case EVN_PRE_CLOSE: break; case EVN_POST_CLOSE: wincom_close_subtitle(); OSD_DrawObject((POBJECT_HEAD)&g_win_mainmenu, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); break; } return ret; }
static PRESULT sto_set_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_sto_setting,RS_STORAGE_SETTING, 0); m_sd_ide_statue = sys_data_get_sd_ide_statue(); win_sto_set_sd_ide_set_string(m_sd_ide_statue,&sto_set_item_txtset1); OSD_SetContainerFocus(&g_win_sto_setting, 1); break; case EVN_POST_OPEN: break; case EVN_PRE_CLOSE: *((UINT32 *)param2) &= ~C_CLOSE_CLRBACK_FLG; win_pvr_sd_ide_save(); sys_data_save(1); break; case EVN_POST_CLOSE: break; case EVN_UNKNOWN_ACTION: break; } return ret; }
static PRESULT game_con_callback(POBJECT_HEAD obj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; static UINT8 m_focus_id; switch (event) { case EVN_PRE_OPEN: m_focus_id = OSD_GetFocusID((POBJECT_HEAD)&game_con); OSD_SetContainerFocus(&game_con, 32); OSD_SetAttr((POBJECT_HEAD)&txt_start, C_ATTR_ACTIVE); game_pre_open(); break; case EVN_POST_OPEN: OSD_ChangeFocus((POBJECT_HEAD)&game_con, m_focus_id, C_UPDATE_FOCUS | C_DRAW_SIGN_EVN_FLG); break; case EVN_POST_CLOSE: OSD_DrawObject((POBJECT_HEAD)&g_win_mainmenu, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); break; case EVN_POST_DRAW: game_1st_draw(); break; case EVN_MSG_GOT: game_event(param1, param2); break; } return ret; }
static void newcamd_init(void) { char stringTemp[50],channame[32]; TEXT_CONTENT* tcont; UINT16 chan=0; memset(stringTemp,0,sizeof(stringTemp)); sprintf(stringTemp,"Newcamd"); OSD_SetTextFieldContent(&newcamd_txt_title, STRING_ANSI, (UINT32)stringTemp); //memset(stringTemp,0,sizeof(stringTemp)); //guop edit //sprintf(stringTemp,"Newcamd Server"); OSD_SetTextFieldContent(&newcamd_txt_name, STRING_ID, RS_NEWCAMD_SERVER); //memset(stringTemp,0,sizeof(stringTemp)); //sprintf(stringTemp,"Time 18:00"); //OSD_SetTextFieldContent(&newcamd_txt_time, STRING_ANSI, (UINT32)stringTemp); //newcamd_redraw_dt(FALSE); if(g_newcamd_curidx<1 || g_newcamd_curidx>MAX_VISIBLE_SERVER_NUM ) { g_newcamd_curidx=1; } newcamd_servidx_init(); newcamd_display_info1(FALSE); newcamd_display_info2(FALSE,newcamd_serinfo[g_newcamd_curidx-1].cas_sys_type); #if 0 //memset(channame,0,sizeof(channame)); memset(stringTemp,0,sizeof(stringTemp)); chan =168;//get current channel sprintf(channame,"CCTV-1"); //get channel name sprintf(stringTemp,"chan: %d.%s",chan,channame); OSD_SetTextFieldContent(&newcamd_txt_chn, STRING_ANSI, (UINT32)stringTemp); #else //newcamd_draw_progname(FALSE); #endif #if 0 //memset(stringTemp,0,sizeof(stringTemp)); //sprintf(stringTemp,"Signal"); OSD_SetTextFieldContent(&newcamd_progress_S_name, STRING_ID, RS_SIGNAL); //memset(stringTemp,0,sizeof(stringTemp)); //sprintf(stringTemp,"Quality"); OSD_SetTextFieldContent(&newcamd_progress_Q_name, STRING_ID, RS_QUALITY); memset(stringTemp,0,sizeof(stringTemp)); sprintf(stringTemp,"0%%"); OSD_SetTextFieldContent(&newcamd_progress_S_value, STRING_ANSI, (UINT32)stringTemp); OSD_SetTextFieldContent(&newcamd_progress_Q_value, STRING_ANSI, (UINT32)stringTemp); #endif /* memset(stringTemp,0,sizeof(stringTemp)); sprintf(stringTemp,"ABCDEFG"); OSD_SetTextFieldContent(&newcamd_txt_help, STRING_ANSI, (UINT32)stringTemp); */ OSD_SetContainerFocus(&g_win_newcamd,g_newcamd_curidx); }
void win_playlist_open(WIN_PLAYLIST_TYPE playlist_type) { UINT32 hkey; VSCR vscr; CONTAINER *pop_win; TEXT_FIELD *pTxt; PRESULT ret = PROC_LOOP; BOOL old_value = ap_enable_key_task_get_key(TRUE); cur_playlist_type = playlist_type; cur_display_playlist = win_play_list[playlist_type]; pop_win = &g_win_usb_playlist; OSD_SetContainerFocus(pop_win, 1); wincom_backup_region(&pop_win->head.frame); OSD_ObjOpen((POBJECT_HEAD)pop_win, 0); while(ret != PROC_LEAVE) { hkey = ap_get_key_msg(); if(hkey == INVALID_HK || hkey == INVALID_MSG) continue; ret = OSD_ObjProc((POBJECT_HEAD)pop_win, (MSG_TYPE_KEY<<16),hkey, 0); } wincom_restore_region(); ap_enable_key_task_get_key(old_value); }
UINT32 win_tpe_open(UINT32 mode,UINT32 sat_id,UINT32 tp_id) { CONTAINER* win; PRESULT ret = PROC_LOOP; UINT32 hkey; TEXT_FIELD* txt; UINT16 strID; BOOL old_value = ap_enable_key_task_get_key(TRUE); txt = &tpe_title; if(mode == 0) strID = RS_INFO_EDIT_TP; else strID = RS_INFO_ADD_TP; OSD_SetTextFieldContent(txt, STRING_ID,(UINT32)strID); win = &g_win_tp_edit; OSD_SetContainerFocus(win, TP_FREQ_ID); win_tpe_set_mode(mode,sat_id,tp_id); OSD_ObjOpen((POBJECT_HEAD)win, 0); while(ret != PROC_LEAVE) { hkey = ap_get_popup_msg(C_POPUP_MSG_PASS_CI); if(hkey == INVALID_HK || hkey == INVALID_MSG) continue; ret = OSD_ObjProc((POBJECT_HEAD)win, (MSG_TYPE_KEY<<16),hkey, 0); } ap_enable_key_task_get_key(old_value); return edit_tp_ok; }
static PRESULT factoryset_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: OSD_SetContainerFocus(cont, BTN_NO_ID); //OSD_SetContainerFocus(cont, 2); wincom_open_subtitle((POBJECT_HEAD)&win_factoryset_con,RS_TOOLS_FACTORY_SETTING, 0); 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_close_subtitle(); OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL); break; } return ret; }
static PRESULT mlimit_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; SYSTEM_DATA * sys_data = sys_data_get(); switch(event) { case EVN_PRE_OPEN: wincom_open_subtitle(pObj,RS_DISEQC12_LIMIT_SETUP,0); motor_move_state = 0; /* The multi-select option should remember previous setting(VACT_SET_LIMIT valid)*/ LIMIT_OPT = sys_data->motor_lmt; OSD_SetContainerFocus(&g_win_motor_limitsetup, LIMITOPT_ID); /* remove "Go to reference inactive when disable limit selected" OSD_SetAttr(&mlimit_txtbtn_gotoref, (LIMIT_OPT==0)? C_ATTR_INACTIVE: C_ATTR_ACTIVE); */ break; case EVN_PRE_CLOSE: /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; sys_data_save(1); break; case EVN_POST_DRAW: win_mlimit_draw_info(motor_move_state); break; } return ret; }
UINT32 win_movefile_open(FileListHandle move_dirlist, char *move_device) { UINT32 hkey; CONTAINER *pop_win; TEXT_FIELD *pTxt; PRESULT ret = PROC_LOOP; BOOL old_value = ap_enable_key_task_get_key(TRUE); win_move_dirlist = move_dirlist; STRCPY(movefile_cur_device, move_device); move_file_flag = 0; pop_win = &g_win_mp_move; OSD_SetContainerFocus(pop_win, 1); wincom_backup_region(&pop_win->head.frame); OSD_ObjOpen((POBJECT_HEAD)pop_win, 0); while(ret != PROC_LEAVE) { hkey = ap_get_key_msg(); if(hkey == INVALID_HK || hkey == INVALID_MSG) continue; ret = OSD_ObjProc((POBJECT_HEAD)pop_win, (MSG_TYPE_KEY<<16),hkey, 0); } wincom_restore_region(); ap_enable_key_task_get_key(old_value); return move_file_flag; }
static void win_antcnt_load_setting(void) { CONTAINER* win = &g_win_antenna_connect; SYSTEM_DATA* sys_data; MULTISEL* msel; static BOOL bFirstTime = 1; sys_data = sys_data_get(); /* Antenna connect */ msel = antcnt_msels[0]; if(sys_data->antenna_connect_type >= msel->nCount) sys_data->antenna_connect_type = ANTENNA_CONNECT_SINGLE; msel->nSel = sys_data->antenna_connect_type; /* LNB1 */ msel = antcnt_msels[1]; if(sys_data->tuner_lnb_type[0] >= msel->nCount) sys_data->tuner_lnb_type[0] = LNB_FIXED; msel->nSel = sys_data->tuner_lnb_type[0]; /* LNB2 */ msel = antcnt_msels[2]; if(sys_data->tuner_lnb_type[1] >= msel->nCount) sys_data->tuner_lnb_type[1] = LNB_FIXED; msel->nSel = sys_data->tuner_lnb_type[1]; #ifdef SUPPORT_TWO_TUNER win_antcnt_update_lnb12_action(0); OSD_SetContainerFocus(win, ANTENNA_CONNECT_ID); #else if(bFirstTime) { POBJECT_HEAD pObj = (POBJECT_HEAD)&antcnt_item2; OSD_MoveObject(pObj,0, -(CON_H + CON_GAP), TRUE); pObj->bUpID = pObj->bDownID = pObj->bID; pObj->pNext = NULL; OSD_SetContainerNextObj(win, pObj); } OSD_SetContainerFocus(win, LNB1_TYPE_ID); bFirstTime = 0; #endif }
UINT8 win_map_search_input_menu_open(char *string) { CONTAINER *win; PRESULT ret = PROC_LOOP; UINT32 hkey; TEXT_FIELD *txt; EDIT_FIELD *eft; UINT16 strID; UINT32 value = 0; UINT8 input_string[MAP_SEARCH_INPUT_LEN]; BOOL old_value = ap_enable_key_task_get_key(TRUE); bMapSearchInputOK = FALSE; txt = &txt_map_search_input_title; strID = RS_HELP_SEARCH; OSD_SetTextFieldContent(txt, STRING_ID,(UINT32)strID); eft = &edt_map_search_input_item; OSD_SetEditFieldContent(eft, STRING_ANSI, ""); win = &g_win_map_search_input; OSD_SetContainerFocus(win, 1); OSD_SetTextFieldContent(&txt_map_search_input_caps,STRING_ANSI,(UINT32)btn_txt_strs[0]); OSD_SetTextFieldContent(&txt_map_search_input_del,STRING_ANSI,(UINT32)btn_txt_strs[1]); OSD_SetTextFieldContent(&txt_map_search_input_ok,STRING_ANSI,(UINT32)btn_txt_strs[2]); OSD_SetTextFieldContent(&txt_map_search_input_cancel,STRING_ANSI,(UINT32)btn_txt_strs[3]); wincom_backup_region(&(win->head.frame)); OSD_ObjOpen((POBJECT_HEAD)win, 0); while(ret != PROC_LEAVE) { hkey = ap_get_key_msg(); if(hkey == INVALID_HK || hkey == INVALID_MSG) continue; ret = OSD_ObjProc((POBJECT_HEAD)win, (MSG_TYPE_KEY<<16),hkey, 0); } if (bMapSearchInputOK) { eft = &edt_map_search_input_item; value = OSD_GetEditFieldContent(eft); ComUniStrToAsc((UINT8 *)value, input_string); map_search_input_get_string(string, input_string); } wincom_restore_region(); ap_enable_key_task_get_key(old_value); return bMapSearchInputOK; }
static void load_settings(void) { MULTISEL * msel; SYSTEM_DATA* sys_data; UINT32 sel; sys_data = sys_data_get(); //country msel = &item_country_sel; OSD_SetMultiselCount(msel, COUNTRY_NCNT); sel = sys_data->country; OSD_SetMultiselSel(msel, sel); old_country_sel = sel; //network msel = &item_network_sel; if(sys_data->country == GERMANY) { OSD_SetMultiselCount(msel, GERM_SER_CNT); msel->bSelType = STRING_ID; msel->pSelTable = network_str; sel = sys_data->germ_servs_type; //germ_network_setting_to_osd(&(sys_data->current_ft), sys_data->current_ft_count); old_germ_serv_sel = sel; old_network_sel = 0; } else { OSD_SetMultiselCount(msel, NETWORK_NCNT); msel->bSelType = STRING_ID; //STRING_ANSI; msel->pSelTable = network_str+4; sel = network_setting_to_osd(&(sys_data->current_ft[0])); old_germ_serv_sel = 0; old_network_sel = sel; } OSD_SetMultiselSel(msel, sel); if (from_auto_scan) OSD_SetContainerFocus( (CONTAINER*)&win_country_net_con,NETWORK_ID); else OSD_SetContainerFocus( (CONTAINER*)&win_country_net_con,COUNTRY_ID); }
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: spidercam_title_display(); break; case EVN_PRE_CLOSE: 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); 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 void nc_setting_init(void) { //char stringTemp[50]; TEXT_CONTENT* tcont; OSD_RECT rect; //current_index=g_newcamd_curidx; //nc_serinfo_display(current_index, FALSE); nc_serinfo_display(0, FALSE); OSD_SetContainerFocus(&g_win_spielercam,ID_CON_BACTIVE); }
static PRESULT time_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT32 i; UINT8 unact; CONTAINER* cont = (CONTAINER*)pObj; UINT8 id = OSD_GetObjID(pObj); SYSTEM_DATA* p_sys_data; p_sys_data=sys_data_get(); switch(event) { case EVN_PRE_OPEN: wincom_open_subtitle((POBJECT_HEAD)&win_time_con,RS_SYS_LOCAL_TIMER_SET/*RS_SYSTEM_TIME*/, 0); win_time_set_GMT_enable_string(p_sys_data->local_time.buseGMT); win_time_set_Summer_string(p_sys_data->local_time.SummerTime); win_time_set_Display_string(p_sys_data->local_time.TimeDisplay); win_time_set_GMT_Offset_string(p_sys_data->local_time.GMToffset_count); get_local_time(&win_time_local_time); set_time_data(); set_time_clock(); win_time_switch_GMT_Type(p_sys_data->local_time.buseGMT); win_time_set_time_zone_citys(FALSE); OSD_SetContainerFocus((CONTAINER*)pObj,1); break; case EVN_POST_OPEN: break; case EVN_PRE_CLOSE: sys_data_save(1); enable_summer_time(p_sys_data->local_time.buseGMT && p_sys_data->local_time.SummerTime); /* 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 game_con_callback(POBJECT_HEAD obj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; switch (event) { case EVN_PRE_OPEN: #ifdef USE_LIB_GE OSD_SetVscrDst(GUI_MEMVSCR_SURF,0); PGUI_VSCR pVscr=OSD_GetTaskVscr(osal_task_get_current_id()); OSD_SetRect(&(pVscr->frm),0,0,0,0); #endif record_scene(); OSD_SetAttr((POBJECT_HEAD) &txt_start, C_ATTR_ACTIVE); OSD_SetContainerFocus(&game_con, 1); game_pre_open(); break; case EVN_POST_OPEN: #ifdef USE_LIB_GE OSD_SetVscrDst(GUI_GMA2_SURF,0); #endif break; case EVN_PRE_CLOSE: *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: restore_scene(); break; case EVN_POST_DRAW: game_1st_draw(); break; case EVN_MSG_GOT: ret = games_com_message_proc(param1, param2); game_event(param1, param2); break; } return ret; }
void win_playlist_setup_open(void) { UINT32 hkey; CONTAINER *pop_win; PRESULT ret = PROC_LOOP; BOOL old_value = ap_enable_key_task_get_key(TRUE); pop_win = &g_win_slidesetup; OSD_SetContainerFocus(pop_win, 1); wincom_backup_region(&pop_win->head.frame); OSD_ObjOpen((POBJECT_HEAD)pop_win, 0); while(ret != PROC_LEAVE) { hkey = ap_get_key_msg(); if(hkey == INVALID_HK || hkey == INVALID_MSG) continue; ret = OSD_ObjProc((POBJECT_HEAD)pop_win, (MSG_TYPE_KEY<<16),hkey, 0); } wincom_restore_region(); ap_enable_key_task_get_key(old_value); }
static PRESULT popup_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { switch(event) { case EVN_PRE_DRAW: if(set_change_focus != -1) { OSD_SetContainerFocus((PCONTAINER)pObj, set_change_focus); } break; case EVN_PRE_OPEN: break; case EVN_PRE_CLOSE: /* Make OSD not flickering */ if(menu_stack_get_top()) { *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; } break; } return PROC_PASS; }
BOOL win_timerset_open(TIMER_SET_CONTENT* settimer,TIMER_SET_CONTENT* rettimer,BOOL check_starttime) { POBJECT_HEAD pObj = (POBJECT_HEAD)&g_win_timerset; PRESULT bResult = PROC_LOOP; UINT32 hkey; UINT8 cur_mode,mode; UINT8 group_idx; date_time dt,dt1; BOOL old_value = ap_enable_key_task_get_key(TRUE); sys_data_check_channel_groups(); cur_mode = sys_data_get_cur_chan_mode(); group_idx = sys_data_get_cur_group_index(); timer_set_ok_cancel_flag = 0; MEMSET(&timer_set,0,sizeof(TIMER_SET_CONTENT)); if(settimer != NULL) MEMCPY(&timer_set,settimer,sizeof(TIMER_SET_CONTENT)); if(timer_set.timer_mode != TIMER_MODE_OFF && timer_set.timer_service !=TIMER_SERVICE_MESSAGE) { if(timer_set.wakeup_chan_mode>1) timer_set.wakeup_chan_mode = 1; mode = timer_set.wakeup_chan_mode; } else { mode = cur_mode; timer_set.wakeup_chan_mode = cur_mode; } if(timer_set.timer_mode == TIMER_MODE_OFF) { timer_set_modify_add_flag = TIMER_ADD; timer_set_check_starttime_flag = 1; } else { timer_set_modify_add_flag = TIMER_MODIFY; timer_set_check_starttime_flag = 1; } get_local_time(&dt1); dt1.min = dt1.min/10*10; dt1.sec = 0; convert_time_by_offset(&dt,&dt1,0,10); if(timer_set_modify_add_flag == TIMER_ADD) { timer_set.wakeup_year = dt.year; timer_set.wakeup_month = dt.month; timer_set.wakeup_day = dt.day; timer_set.wakeup_time = dt.hour * 60 + dt.min; timer_set.wakeup_state = TIMER_STATE_READY; } if(timer_set.timer_service == TIMER_SERVICE_MESSAGE) timer_set.wakeup_duration_time = 0; sys_data_set_cur_chan_mode(mode); sys_data_change_group(0); OSD_SetContainerFocus(&g_win_timerset, TIMER_MODE_ID); OSD_ObjOpen(pObj, MENU_OPEN_TYPE_OTHER); while(bResult != PROC_LEAVE) { hkey = ap_get_key_msg(); if(hkey == INVALID_HK || hkey == INVALID_MSG) { win_timerset_set_currenttime(TRUE); continue; } bResult = OSD_ObjProc(pObj, (MSG_TYPE_KEY<<16),hkey, 0); } if(timer_set_ok_cancel_flag) MEMCPY(rettimer,&timer_set,sizeof(TIMER_SET_CONTENT)); sys_data_set_cur_chan_mode(cur_mode); sys_data_change_group(group_idx); sys_data_save(1); ap_enable_key_task_get_key(old_value); return timer_set_ok_cancel_flag; }
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; }
UINT32 win_tpsrch_open(UINT32* ftaonly_VPid, UINT32* srch_chan_APid,UINT32* nit_PPid) { CONTAINER *win; MULTISEL *msel; PRESULT ret = PROC_LOOP; UINT32 hkey,val; UINT16 mode; BOOL old_value = ap_enable_key_task_get_key(TRUE); tpsrch_ok = 0; win = &g_win_tpsrch_set; OSD_SetContainerFocus(win, BTN_OK_ID); OSD_ObjOpen((POBJECT_HEAD)win, 0); while(ret != PROC_LEAVE) { hkey = ap_get_key_msg(); if(hkey == INVALID_HK || hkey == INVALID_MSG) continue; ret = OSD_ObjProc((POBJECT_HEAD)win, (MSG_TYPE_KEY<<16),hkey, 0); } ap_enable_key_task_get_key(old_value); mode = OSD_GetMultiselSel(&tpsrch_sel0); if(mode==NORMAL_SRCH) { msel = &tpsrch_sel1; val = OSD_GetMultiselSel(msel); if(val == 0) *ftaonly_VPid = P_SEARCH_FTA | P_SEARCH_SCRAMBLED; else *ftaonly_VPid = P_SEARCH_FTA; msel = &tpsrch_sel2; val = OSD_GetMultiselSel(msel); if(val==1) *srch_chan_APid = P_SEARCH_TV; else if(val==2) *srch_chan_APid = P_SEARCH_RADIO; else *srch_chan_APid = P_SEARCH_TV | P_SEARCH_RADIO; msel = &tpsrch_sel3; val = OSD_GetMultiselSel(msel); *nit_PPid = val; } else //PID_SEARCH { *ftaonly_VPid = OSD_GetEditFieldContent(&tpsrch_edt1); *srch_chan_APid = OSD_GetEditFieldContent(&tpsrch_edt2); *nit_PPid = OSD_GetEditFieldContent(&tpsrch_edt3); } if(tpsrch_ok==1) { if(mode == NORMAL_SRCH) return 1; else //PID_SEARCH return 2; } return tpsrch_ok; }
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 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 rs232upg_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: #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 wincom_open_subtitle((POBJECT_HEAD)&win_rs232upg_con,RS_UPGRADE_MODE_RS232, 0); win_rs232upg_load_chunk_info(); OSD_SetProgressBarPos(&rs232upg_bar_progress,(INT16)0); OSD_SetTextFieldContent(&rs232upg_txt_progress, STRING_NUM_PERCENT, (UINT32)0); break; case EVN_POST_OPEN: win_rs232upg_msg_clear(); wincom_open_commen_help(pObj);//-a by wangyang break; case EVN_PRE_CLOSE: win_rs232upg_clear(); /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; 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) { OSD_ObjOpen((POBJECT_HEAD)&g_win_submenu, MENU_OPEN_TYPE_OTHER ); } break; #endif } return ret; }
static void nc_setting_init(void) { char stringTemp[50]; TEXT_CONTENT* tcont; OSD_RECT rect; memset(stringTemp,0,sizeof(stringTemp)); sprintf(stringTemp,"Newcamd Server Settings"); OSD_SetTextFieldContent(&nc_win_title, STRING_ANSI, (UINT32)stringTemp); memset(stringTemp,0,sizeof(stringTemp)); sprintf(stringTemp,"Server Name"); OSD_SetTextFieldContent(&nc_item_txt1, STRING_ANSI, (UINT32)stringTemp); memset(stringTemp,0,sizeof(stringTemp)); sprintf(stringTemp,"Server IP"); OSD_SetTextFieldContent(&nc_item_txt2, STRING_ANSI, (UINT32)stringTemp); memset(stringTemp,0,sizeof(stringTemp)); sprintf(stringTemp,"Server Port"); OSD_SetTextFieldContent(&nc_item_txt3, STRING_ANSI, (UINT32)stringTemp); memset(stringTemp,0,sizeof(stringTemp)); sprintf(stringTemp,"user Name"); OSD_SetTextFieldContent(&nc_item_txt4, STRING_ANSI, (UINT32)stringTemp); memset(stringTemp,0,sizeof(stringTemp)); sprintf(stringTemp,"User Password"); OSD_SetTextFieldContent(&nc_item_txt5, STRING_ANSI, (UINT32)stringTemp); memset(stringTemp,0,sizeof(stringTemp)); sprintf(stringTemp,"DesKey"); OSD_SetTextFieldContent(&nc_item_txt6, STRING_ANSI, (UINT32)stringTemp); #if 0 rect.uLeft = (CON_L+TXT_L_OF+TXT_W+2);//&nc_item_edit6.head.frame.uLeft-170; rect.uTop = CON_T+(CON_H+CON_GAP)*5;//&nc_item_edit6.head.frame.uTop; rect.uWidth = (CON_W-245);//&nc_item_edit6.head.frame.uWidth; rect.uHeight= EDIT_H;//&nc_item_edit6.head.frame.uHeight; OSD_SetRect(&nc_item_edit6.head.frame, rect.uLeft,rect.uTop,rect.uWidth,rect.uHeight); #endif memset(stringTemp,0,sizeof(stringTemp)); sprintf(stringTemp,"Active Enable"); OSD_SetTextFieldContent(&nc_item_txt7, STRING_ANSI, (UINT32)stringTemp); memset(stringTemp,0,sizeof(stringTemp)); sprintf(stringTemp,"DNS Enable"); OSD_SetTextFieldContent(&nc_item_txt8, STRING_ANSI, (UINT32)stringTemp); memset(stringTemp,0,sizeof(stringTemp)); sprintf(stringTemp,"Auto User"); OSD_SetTextFieldContent(&nc_item_txt9, STRING_ANSI, (UINT32)stringTemp); current_index=g_newcamd_curidx; nc_serinfo_init(); nc_serinfo_display(current_index, FALSE); //if(newcamd_serinfo[current_index-1].bActive) { // OSD_SetContainerFocus(&g_win_newcamd_setting,ID_CON_SERNAME); } //else { OSD_SetContainerFocus(&g_win_newcamd_setting,ID_CON_BACTIVE); } }
/* static void win_operator_IPPV_draw(GUI_RECT* pRect,UINT16 strid) { TEXT_FIELD* txt; UINT16 *string; //index: 0 for title, 1~9 for list item txt = &IPPVinfo_title; OSD_SetRect2(&txt->head.frame,pRect); if (txt->pString != NULL) { txt->pString = NULL; } OSD_SetTextFieldContent(txt, STRING_ID, (UINT32)strid); OSD_DrawObject((POBJECT_HEAD)txt, C_UPDATE_ALL); } void win_ippv_draw_title(void) { UINT8 i; for (i=0;i<6;i++) { win_operator_IPPV_draw(&win_ippv_title_rect[i], win_ippv_title_string[i]); } } */ static void ippv_txt_info_display(UINT16 info_idx,PCONTAINER pCon) { UINT8 i,j,date[11]; UINT16 top,index, curitem,count,strid=0; PTEXT_FIELD pTxt; OBJLIST *ol = &IPPVinfo_olist; PCONTAINER ppcon; curitem = OSD_GetObjListCurPoint(ol); count = OSD_GetObjListCount(ol); top = OSD_GetObjListTop(ol); index = top +info_idx -1; //for container index is 1,2,....9 ppcon = pCon; if (count == 0) { IPPVINFO_PRINT("@@@@ippv_txt_info_display: list count is 0!\n "); } else if (index<count) { for(i = 0;i < IPPVINFO_ITEM_TXT_CNT; i++) { pTxt= IPPVinfo_listtxt[i]; OSD_SetObjRoot(pTxt,ppcon); OSD_SetContainerFocus(ppcon,1); OSD_SetObjRect(pTxt, pTxt->head.frame.uLeft, ppcon->head.frame.uTop, pTxt->head.frame.uWidth, pTxt->head.frame.uHeight); if (i==0)//operator id { OSD_SetTextFieldContent(pTxt, STRING_NUMBER, (UINT32)current_operator_ID); OSD_SetContainerNextObj(ppcon, pTxt); } if (i==1)//slot id { OSD_SetTextFieldContent(pTxt, STRING_NUMBER, (UINT32)IPPV_program_info[index].m_bySlotID); } if (i==2)//prog id { OSD_SetTextFieldContent(pTxt, STRING_NUMBER, (UINT32)IPPV_program_info[index].m_dwProductID); } if (i==3)//booking status { switch(IPPV_program_info[index].m_byBookEdFlag) { case CDCA_IPPVSTATUS_BOOKING: // 1 for booking strid = 0; break; case 2: // 2 for expired????? (how to confirm??) strid = 0; break; case CDCA_IPPVSTATUS_VIEWED: // 3 for viewed strid = RS_IPPV_STATUS_VIEWED; break; } OSD_SetTextFieldContent(pTxt, STRING_ID, (UINT32)strid); } if (i==4)//tape { OSD_SetTextFieldContent(pTxt, STRING_ANSI, (UINT32)((IPPV_program_info[index].m_bCanTape)?"Yes":"No")); } if (i==5)//price { OSD_SetTextFieldContent(pTxt, STRING_NUMBER, (UINT32)IPPV_program_info[index].m_wPrice); } if (i==6)//expired time { YMD_calculate(IPPV_program_info[index].m_wExpiredDate, date); OSD_SetTextFieldContent(pTxt, STRING_ANSI, (UINT32)date); } } if ((curitem%9) == (info_idx-1)) OSD_TrackObject((POBJECT_HEAD)ppcon, C_UPDATE_ALL); else OSD_DrawObject((POBJECT_HEAD)ppcon, C_UPDATE_ALL); } else { for(i = 0;i < IPPVINFO_ITEM_TXT_CNT; i++) { pTxt= IPPVinfo_listtxt[i]; OSD_SetObjRoot(pTxt,ppcon); OSD_SetObjRect(pTxt, pTxt->head.frame.uLeft, ppcon->head.frame.uTop, pTxt->head.frame.uWidth, pTxt->head.frame.uHeight); if (3==i) OSD_SetTextFieldContent(pTxt, STRING_ID, (UINT32)0); else OSD_SetTextFieldContent(pTxt, STRING_ANSI, (UINT32)""); } } }
static void cti_mat_display(BOOL update) { char str[100]; cas_sc_t cardinfo; UINT8 *uniStr=NULL; memset(&cardinfo,0,sizeof(cas_sc_t)); cas_get_sc_info_req(&cardinfo); if(cardinfo.sc_status==0) { memset(str,0,sizeof(str)); //sprintf(str,"%s","Maturity Level"); uniStr = OSD_GetUnicodeString(RS_CTI_MATURITY_RATING); ComUniStrToAsc(uniStr,str); OSD_SetTextFieldContent(&cti_mat_item_txt1, STRING_ANSI, (UINT32)(str)); memset(str,0,sizeof(str)); //sprintf(str,"%s","Input PIN to modify"); uniStr = OSD_GetUnicodeString(RS_CTI_INPUT_PIN); ComUniStrToAsc(uniStr,str); OSD_SetTextFieldContent(&cti_mat_item_txt2, STRING_ANSI, (UINT32)(str)); OSD_SetMultiselSel(&cti_mat_item_select, cardinfo.parental_rating); memset(str,0,sizeof(str)); sprintf(str,"%s","--------"); input_pin_char_cnt=0; memset(input_pin_chars,0,sizeof(input_pin_chars)); OSD_SetTextFieldContent(&cti_mat_item_pin, STRING_ANSI, (UINT32)(str)); OSD_SetContainerFocus(&g_win_cti_set_maturity,1); } else { memset(str,0,sizeof(str)); if(cardinfo.sc_insert==1)//card in ,reading card sprintf(str,"%s","Reading smart card."); else sprintf(str,"%s","Smart card error!"); OSD_SetTextFieldContent(&cti_mat_item_txt1, STRING_ANSI, (UINT32)(str)); memset(str,0,sizeof(str)); sprintf(str,"%s",""); OSD_SetTextFieldContent(&cti_mat_item_txt2, STRING_ANSI, (UINT32)(str)); OSD_SetMultiselSel(&cti_mat_item_select, MATURITY_LEVEL_COUNT); memset(str,0,sizeof(str)); sprintf(str,"%s",""); input_pin_char_cnt=0; memset(input_pin_chars,0,sizeof(input_pin_chars)); OSD_SetTextFieldContent(&cti_mat_item_pin, STRING_ANSI, (UINT32)(str)); OSD_SetContainerFocus(&g_win_cti_set_maturity,0); } if(update) { OSD_DrawObject((POBJECT_HEAD )&cti_mat_item_con1,C_UPDATE_ALL); OSD_DrawObject((POBJECT_HEAD )&cti_mat_item_con2,C_UPDATE_ALL); if(cardinfo.sc_status==0) { OSD_TrackObject((POBJECT_HEAD )&cti_mat_item_con1,C_DRAW_SIGN_EVN_FLG| C_UPDATE_ALL); } } }
UINT32 win_disk_operate_open(UINT8 type, UINT8 *operate_result) { CONTAINER* win; PRESULT ret = PROC_LOOP; UINT32 hkey; TEXT_FIELD* txt; UINT16 strID; MULTISEL *msel; char str[30]; char rec_disk[16], tms_disk[16]; operate_type = type; disk_operate_ok = 0; txt = &disk_operate_title; switch(type) { case 0: sprintf(str, "%s", "Format"); mode_select = 0; disk_format_mode_num = get_fsystem_installed(disk_mode, 8); if(!disk_format_mode_num) return 0xFF; break; case 1: sprintf(str, "%s", "DVR Set"); dvr_select_type = 0; #ifdef PVR3_SUPPORT dvr_type_num = 3; #else dvr_type_num = 1;//3; #endif break; case 2: //partition_select = 0; partition_num = init_valid_partition(disk_partition, 64); if(!partition_num) return 0xFF; if(partition_num > 2) { qsort(disk_partition, partition_num, 16, _partition_compare); } if(partition_select >= partition_num) partition_select = 0; pvr_get_cur_mode(rec_disk, tms_disk); //sprintf(str, "%s", (rec_disk[5] == 'h') ? "Copy: HDD to USB" : "Copy: USB to HDD"); sprintf(str, "%s", "Copy to Other Device"); break; default: break; } ComAscStr2Uni(str, display_strs[2]); /* set title */ win = &g_win_disk_operate; OSD_SetContainerFocus(win, MENU_DISK_FORMAT); OSD_ObjOpen((POBJECT_HEAD)win, 0); disk_operate_opened = 1; BOOL old_value = ap_enable_key_task_get_key(TRUE); while(ret != PROC_LEAVE) { hkey = ap_get_key_msg(); if(hkey == INVALID_HK || hkey == INVALID_MSG) continue; ret = OSD_ObjProc((POBJECT_HEAD)win, (MSG_TYPE_KEY<<16),hkey, 0); } ap_enable_key_task_get_key(old_value); switch(type) { case 0: *operate_result = mode_select; break; case 1: *operate_result = dvr_select_type; break; case 2: *operate_result = partition_select; break; default: break; } disk_operate_opened = 0; return disk_operate_ok; }