static void init_movefile_info() { char file_path[FULL_PATH_SIZE], str_buff[10]; UINT16 offset; TEXT_FIELD *pTxt; POBJLIST pOl; get_file_list_info(win_move_dirlist, &movefile_dirnum, &movefile_filenum, file_path); if(!STRCMP(file_path, FS_ROOT_DIR)) { offset = 0; } else { offset = 1; } pOl = &ol_mpmove; OSD_SetObjListCount(pOl,(movefile_dirnum + movefile_filenum + offset)); OSD_SetObjListNewPoint(pOl,0); OSD_SetObjListCurPoint(pOl,0); OSD_SetObjListTop(pOl,0); pTxt = &mpmove_dir_txt; win_get_display_dirname(str_buff, file_path); OSD_SetTextFieldContent(pTxt,STRING_UTF8,(UINT32)str_buff);//show current dir name pTxt = &mpmove_dev_name; win_get_display_devicename(str_buff, movefile_cur_device); sprintf(str_buff,"%s",str_buff); OSD_SetTextFieldContent(pTxt,STRING_ANSI,(UINT32)str_buff);//show current device name }
void win_multifeed_load(void) { OBJLIST* ol; P_NODE p_node; UINT16 channel,cnt,sel,top_idx,cur_idx,dep; struct MULTIFEED_INFO multifeed_info; INT32 ret; ol = &multifeed_ol; channel = sys_data_get_cur_group_cur_mode_channel(); get_prog_at(channel,&p_node); MEMSET(&multifeed_info, 0, sizeof(struct MULTIFEED_INFO)); ret = multifeed_get_info(p_node.prog_id, &multifeed_info); sel = 0xFFFF; cnt = multifeed_info.num; if(multifeed_info.idx < cnt) sel= multifeed_info.idx; dep = OSD_GetObjListPage(ol); cur_idx = 0; top_idx = 0; if(sel<multifeed_info.num) cur_idx = sel; top_idx = cur_idx / dep * dep; OSD_SetObjListCount(ol, cnt); OSD_SetObjListSingleSelect(ol, sel); OSD_SetObjListTop(ol, top_idx); OSD_SetObjListCurPoint(ol, cur_idx); OSD_SetObjListNewPoint(ol, cur_idx); }
void win_satfav_load_groupcount(void) { UINT8 av_flag; OBJLIST *ol; UINT16 group_cnt,group_idx; UINT8 group_type, group_pos; UINT16 channel,select,page; UINT16 title_id; TEXT_FIELD* txt; ol = &satfav_item_list; select = INVALID_POS_NUM; av_flag = sys_data_get_cur_chan_mode(); group_idx = sys_data_get_cur_group_index(); sys_data_get_cur_mode_group_infor( group_idx, &group_type,&group_pos, &channel); if(sat_fav_list_flag == 0) /* SAT */ { group_cnt = sys_data_get_sate_group_num(av_flag); group_cnt ++; if(group_type == FAV_GROUP_TYPE) group_idx = 0; else select = group_idx; } else /* FAV */ { group_cnt = sys_data_get_fav_group_num(av_flag); if(group_type != FAV_GROUP_TYPE) group_idx = 0; else { group_idx -= sys_data_get_sate_group_num(av_flag); group_idx --; select = group_idx; } } page = OSD_GetObjListPage(ol); OSD_SetObjListCount(ol, group_cnt); OSD_SetObjListCurPoint(ol, group_idx); OSD_SetObjListNewPoint(ol, group_idx); OSD_SetObjListTop(ol,group_idx / page*page); OSD_SetObjListSingleSelect(ol, select); title_id = (sat_fav_list_flag == 0)? RS_INFO_SATELLITE : RS_FAVORITE; txt = &satfav_title; OSD_SetTextFieldContent(txt, STRING_ID,title_id); }
static void catch_up_list_load(UINT8 num) { OBJLIST* ol; ol = &ol_catch_up; OSD_SetObjListCount(ol, num); OSD_SetObjListTop(ol, 0); OSD_SetObjListNewPoint(ol, 0); OSD_SetObjListCurPoint(ol, 0); }
static void news_list_load(UINT16 num) { OBJLIST *ol = NULL; ol = &ol_news_list; OSD_SetObjListCount(ol, num); OSD_SetObjListCurPoint(ol, 0); OSD_SetObjListNewPoint(ol, 0); OSD_SetObjListTop(ol, 0); }
void weathercitylst_load_list() { OBJLIST *ol = NULL; int num = 0; ol = &weather_city_olist; num = weathercitylst_get_num(); OSD_SetObjListCount(ol, num); OSD_SetObjListCurPoint(ol, 0); OSD_SetObjListNewPoint(ol, 0); OSD_SetObjListTop(ol, 0); }
static void map_city_list_load(void) { OBJLIST *ol = NULL; int num = 0; ol = &ol_map_city; num = map_city_get_num(); OSD_SetObjListCount(ol, num); OSD_SetObjListCurPoint(ol, 0); OSD_SetObjListNewPoint(ol, 0); OSD_SetObjListTop(ol, 0); }
static void SNstate_addr_list_load(void) { OBJLIST *ol = NULL; int num = 0; ol = &ol_SNstate_addr; //num = SNstate_addr_get_num(); OSD_SetObjListCount(ol, 2); OSD_SetObjListCurPoint(ol, 0); OSD_SetObjListNewPoint(ol, 0); OSD_SetObjListTop(ol, 0); }
static PRESULT win_detitle_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; OBJLIST* ol = &detitle_olist; UINT16 tmp, num=0; struct help_item_resource detitle_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}, }; switch(event) { case EVN_PRE_OPEN: init_detitle_flag(); tmp = detitle_get_info(&num); if (0 == tmp) { ret = PROC_LEAVE; break; } OSD_SetObjListCount(ol, num); if (num <= OSD_GetObjListCurPoint(&detitle_olist)) { OSD_SetObjListCurPoint (&detitle_olist, 0); OSD_SetObjListNewPoint (&detitle_olist, 0); OSD_SetObjListTop (&detitle_olist, 0); //OSD_SetObjListNewPoint(&detitle_olist, 0); } wincom_open_title_ext(RS_DETITLE, IM_TITLE_ICON_SYSTEM); wincom_open_help(detitle_help, 3); win_init_pstring(18); break; case EVN_POST_OPEN: break; case EVN_PRE_CLOSE: /* Make OSD not flickering */ save_detitle(); *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: //TFCAS_WriteFlash();//write to flash at once, ignore the delay break; } return ret; }
static PRESULT movefile_change_storage(VACTION act) { PRESULT ret = PROC_LOOP; TEXT_FIELD *pTxt; OBJLIST *pOl; char str_buff[10]; if(act == VACT_CHG_DEVL) { if(RET_FAILURE == win_get_next_device(movefile_cur_device, movefile_cur_device,TRUE)) { return ret; } } else { if(RET_FAILURE == win_get_next_device(movefile_cur_device, movefile_cur_device,FALSE)) { return ret; } } file_list_change_device(win_move_dirlist,movefile_cur_device); pTxt = &mpmove_dev_name; win_get_display_devicename(str_buff, movefile_cur_device); sprintf(str_buff,"%s",str_buff); OSD_SetTextFieldContent(pTxt,STRING_ANSI,(UINT32)str_buff);//show current device name //OSD_DrawObject((POBJECT_HEAD)pTxt,C_UPDATE_ALL); OSD_DrawObject((POBJECT_HEAD)&mpmove_dev_con,C_UPDATE_ALL); /* pTxt = &mpmove_dir_txt; sprintf(str_buff,"%s","Root"); OSD_SetTextFieldContent(pTxt,STRING_ANSI,(UINT32)str_buff); OSD_DrawObject((POBJECT_HEAD)pTxt,C_UPDATE_ALL); */ pOl = &ol_mpmove; get_file_list_info(win_move_dirlist, &movefile_dirnum, &movefile_filenum, NULL); OSD_SetObjListCurPoint(pOl, 0); OSD_SetObjListNewPoint(pOl, 0); OSD_SetObjListTop(pOl, 0); OSD_SetObjListCount(pOl, movefile_dirnum+movefile_filenum); OSD_TrackObject((POBJECT_HEAD)pOl, C_UPDATE_ALL | C_DRAW_SIGN_EVN_FLG); return ret; }
INT32 mail_update_info() { UINT8 ret,i,j; UINT8 total, newmail; gycamail data; OBJLIST* ol = &mail_ol; MEMSET(email_head, 0, sizeof(gycamail_head)*GYCA_EMAIL_MAX_CNT); email_count = GYCA_EMAIL_MAX_CNT; ret = gyca_getmail_condition_from_ram(&total, &newmail); if (GYCA_OK != ret) { //cas_popup_msg(NULL, NULL, RS_CAERR_NOINFO); //email_count = 0; //return 0; total = 0; newmail = 0; email_count = 0; } email_count_unread = newmail; for(i=0,j=0; i<total; i++) { MEMSET(&data, 0, sizeof(gycamail)); if(!gyca_readmail_one_from_ram(i, &data)) { MEMCPY(email_head[j].title, data.info.m_szEmail_Title, STRLEN(data.info.m_szEmail_Title)); MEMCPY(email_head[j].create_Time, data.info.m_byEmail_Create_Time, 5); email_head[j].status = data.status; j++; } } email_count = j; OSD_SetObjListCount(ol, email_count); if (email_count <= OSD_GetObjListCurPoint(ol)) { OSD_SetObjListCurPoint(ol, 0); OSD_SetObjListNewPoint(ol, 0); OSD_SetObjListTop(ol, 0); } return 1; }
static PRESULT IPPVinfo_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT32 cnt = 0; INT32 iret; switch(event) { case EVN_PRE_OPEN: total_IPPV_number = 0; iret = IPPVinfo_got_info(); if(0 == iret) { ret = PROC_LEAVE; break; } OSD_SetObjListCount(&IPPVinfo_olist,total_IPPV_number); //for different card display if (total_IPPV_number <= OSD_GetObjListCurPoint(&IPPVinfo_olist)) { //OSD_SetObjListNewPoint(&IPPVinfo_olist, 0); OSD_SetObjListCurPoint (&IPPVinfo_olist, 0); OSD_SetObjListNewPoint (&IPPVinfo_olist, 0); OSD_SetObjListTop (&IPPVinfo_olist, 0); } wincom_open_title_ext(RS_IPPV_PROGRAM, IM_TITLE_ICON_SYSTEM); wincom_open_help(win_opinfo_help, 2); win_init_pstring(9); break; case EVN_POST_OPEN: // win_ippv_draw_title(); break; case EVN_PRE_CLOSE: /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: break; } return ret; }
static PRESULT playlst_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { UINT16 title_strid; PRESULT ret = PROC_PASS; POBJLIST pOl; TEXT_FIELD *pTxt; UINT32 file_num; win_popup_choice_t choice; UINT8 back_saved; UINT16 i; WIN_PLAYLIST_TYPE play_list; pOl = &ol_playlist; switch(event) { case EVN_PRE_OPEN: get_play_list_info(cur_display_playlist,&file_num, NULL); OSD_SetObjListCount(pOl, file_num); OSD_SetObjListCurPoint(pOl, 0); OSD_SetObjListNewPoint(pOl, 0); OSD_SetObjListTop(pOl, 0); moving_flag = 0; move_file_idx = INVALID_IDX; break; case EVN_POST_OPEN: win_open_playlist_help(); break; case EVN_PRE_CLOSE: /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: break; default: break; } return ret; }
static void win_biss_load_select(void) { UINT32 n; CAS_KEYINFO *Pm = NULL; OBJLIST* ol; SCROLL_BAR* sb; POBJECT_HEAD pObj; ol = &biss_olist; n = softcam_get_keyinfo_num((u8) CAS_ID_BISS); /* Set count */ OSD_SetObjListCount(ol, n); OSD_SetObjListCurPoint(ol, 0); OSD_SetObjListNewPoint(ol, 0); OSD_SetObjListTop(ol, 0); sb = &biss_scb; OSD_SetScrollBarMax(sb,n); OSD_SetScrollBarPos(sb, 0); }
static void win_wifilist_update_all_wifi_manager_menu(BOOL refresh_device_status) { UINT16 i; OBJLIST* ol; CONTAINER* item; TEXT_FIELD* txt; SCROLL_BAR* sb; ol = &wifilist_olist; txt = &wifilst_dev_status; sb = &wifilist_scb; DEBUG_PRINTF("win_wifilist_update_all_wifi_manager_menu(bFlag=%d)\n", refresh_device_status); if(ap_list_pos >= AP_Num) { ap_list_top = 0; ap_list_item_sel=0; ap_list_pos=0; } OSD_SetObjListCount(ol, AP_Num); /* Set count */ OSD_SetObjListCurPoint(ol, ap_list_item_sel); OSD_SetObjListNewPoint(ol, ap_list_item_sel); OSD_SetObjListTop(ol, ap_list_top); OSD_SetScrollBarMax(sb, AP_Num); OSD_SetScrollBarPos(sb, ap_list_top); // update WiFi Device Status (content) win_wifilist_update_wifi_device_status_display(refresh_device_status); // update and redraw AP List (content) only win_wifilist_update_wifi_ap_list_display(refresh_device_status); }
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 playlist_colorkey_proc(VACTION unact) { UINT16 curPos; PRESULT ret_proc = PROC_PASS; POBJLIST pOl; POBJECT_HEAD top_win; UINT8 back_saved; win_popup_choice_t choice; UINT32 file_num; pOl = &ol_playlist; curPos = OSD_GetObjListCurPoint(pOl); switch(unact) { case VACT_PLAY: top_win = (POBJECT_HEAD)(&g_win_usb_filelist); if(cur_playlist_type == PL_MUSIC) { win_set_musicplay_param(&cur_display_playlist,curPos+1,0); ap_send_msg(CTRL_MSG_SUBTYPE_CMD_PLAYMUSIC,(UINT32)top_win,TRUE); } else { win_set_imageplay_param(&cur_display_playlist, curPos+1,0); ap_send_msg(CTRL_MSG_SUBTYPE_CMD_PLAYIMAGE,(UINT32)top_win,TRUE); } ret_proc = PROC_LEAVE; break; case VACT_MOVE: if(moving_flag == 0) { moving_flag = 1; move_file_idx = curPos; } else { moving_flag = 0; //move file move_file_in_play_list(cur_display_playlist, move_file_idx+1, curPos+1); move_file_idx = INVALID_IDX; } OSD_TrackObject((POBJECT_HEAD)pOl, C_UPDATE_ALL | C_DRAW_SIGN_EVN_FLG); break; case VACT_DELETE: if(moving_flag == 1) { moving_flag = 0; //move file move_file_in_play_list(cur_display_playlist, move_file_idx+1, curPos+1); move_file_idx = INVALID_IDX; } delete_play_list_item(cur_display_playlist, curPos+1); if(cur_playlist_type == PL_MUSIC) { musiclist_changed = TRUE; } else { imagelist_changed = TRUE; } get_play_list_info(cur_display_playlist,&file_num, NULL); OSD_SetObjListCount(pOl, file_num); if(file_num == 0)//all items have been deleted { delete_play_list(win_play_list[cur_playlist_type]); win_play_list[cur_playlist_type] = NULL; ret_proc = PROC_LEAVE; break; } if(curPos >= file_num) { OSD_SetObjListCurPoint(pOl, 0); OSD_SetObjListNewPoint(pOl, 0); OSD_SetObjListTop(pOl, 0); } OSD_TrackObject((POBJECT_HEAD)pOl, C_UPDATE_ALL | C_DRAW_SIGN_EVN_FLG); break; case VACT_DELETE_ALL: win_compopup_init(WIN_POPUP_TYPE_OKNO); win_compopup_set_msg(NULL,NULL,RS_MP_DELETE_PLAYLIST); choice = win_compopup_open_ext(&back_saved); if(choice == WIN_POP_CHOICE_YES) { delete_play_list(win_play_list[cur_playlist_type]); win_play_list[cur_playlist_type] = NULL; if(cur_playlist_type == PL_MUSIC) { musiclist_changed = TRUE; } else { imagelist_changed = TRUE; } ret_proc = PROC_LEAVE; } break; default: break; } return ret_proc; }
static PRESULT movefile_item_enter(UINT16 uIdx) { PRESULT ret = PROC_LOOP; BOOL bRoot; char str_name[FULL_PATH_SIZE],str_txt[FULL_PATH_SIZE]; FileInfo file_node; POBJLIST pOl; TEXT_FIELD *pTxt; UINT8 back_saved; bRoot = win_check_openroot(win_move_dirlist); if((uIdx == 0) && (bRoot == FALSE)) {//TODO:Exit to up dir get_file_list_info(win_move_dirlist, &movefile_dirnum, &movefile_filenum, str_name); win_get_parent_dirname(str_txt, str_name); win_compopup_init(WIN_POPUP_TYPE_SMSG); win_compopup_set_frame(200, 200, 200, 100); win_compopup_set_msg(NULL, NULL,RS_DISPLAY_PLEASE_WAIT); win_compopup_open_ext(&back_saved); read_folder_to_file_list(win_move_dirlist, str_txt); win_compopup_smsg_restoreback(); bRoot = win_check_openroot(win_move_dirlist); if(bRoot) { file_list_change_device(win_move_dirlist, movefile_cur_device); } movefile_curidx = win_get_file_idx(win_move_dirlist, str_name); if(movefile_curidx == (UINT16)(~0)) movefile_curidx = 0; get_file_list_info(win_move_dirlist, &movefile_dirnum, &movefile_filenum, str_name); pTxt = &mpmove_dir_txt; win_get_display_dirname(str_txt, str_name);//get dirname to show OSD_SetTextFieldContent(pTxt,STRING_UTF8,(UINT32)str_txt); OSD_DrawObject((POBJECT_HEAD)pTxt,C_UPDATE_ALL); pOl = &ol_mpmove; movefile_curidx = movefile_curidx + (bRoot?0:1); OSD_SetObjListCurPoint(pOl, movefile_curidx); OSD_SetObjListNewPoint(pOl, movefile_curidx); OSD_SetObjListTop(pOl, movefile_curidx); if(bRoot == TRUE) OSD_SetObjListCount(pOl, (movefile_dirnum + movefile_filenum));//to show it's child dir else OSD_SetObjListCount(pOl, (movefile_dirnum + movefile_filenum + 1));//to show it's child dir if(OSD_GetObjListCount(pOl) <= MV_ITEM_CNT) OSD_SetObjListTop(pOl, 0); OSD_TrackObject((POBJECT_HEAD)pOl, C_UPDATE_ALL | C_DRAW_SIGN_EVN_FLG); return ret; } if(!bRoot) { uIdx--; } get_file_from_file_list(win_move_dirlist, uIdx+1, &file_node); if(file_node.filetype == F_DIR) { //TODO: Enter child directory & retrive items,set not_root flag win_get_fullname(str_name, file_node.path, file_node.name); win_compopup_init(WIN_POPUP_TYPE_SMSG); win_compopup_set_frame(200, 200, 200, 100); win_compopup_set_msg(NULL, NULL,RS_DISPLAY_PLEASE_WAIT); win_compopup_open_ext(&back_saved); read_folder_to_file_list(win_move_dirlist, str_name); win_compopup_smsg_restoreback(); get_file_list_info(win_move_dirlist, &movefile_dirnum, &movefile_filenum, str_name); pTxt = &mpmove_dir_txt; win_get_display_dirname(str_txt, str_name);//get dirname to show OSD_SetTextFieldContent(pTxt,STRING_UTF8,(UINT32)str_txt); OSD_DrawObject((POBJECT_HEAD)pTxt,C_UPDATE_ALL); movefile_curidx = 0; pOl = &ol_mpmove; OSD_SetObjListCount(pOl, (movefile_dirnum + movefile_filenum + 1));//to show it's child dir OSD_SetObjListCurPoint(pOl, movefile_curidx); OSD_SetObjListNewPoint(pOl, movefile_curidx); OSD_SetObjListTop(pOl, movefile_curidx); OSD_TrackObject((POBJECT_HEAD)pOl, C_UPDATE_ALL | C_DRAW_SIGN_EVN_FLG); } else { //TODO:soc_printf("not dir!!\n"); } return ret; }
static void ci_info_display() { OBJLIST* ol; UINT16 cnt, page; UINT8 i; CONTAINER* item = NULL; TEXT_FIELD* txt = NULL; //1. CI Title OSD_SetTextFieldContent(&txt_ci_info_title, STRING_UNICODE, (UINT32)ci_info.menu.title_str); //2. sub title ci_info_subtitle_content[0].text.pString = ci_info.menu.subtitle_str; //3. bottom OSD_SetTextFieldContent(&txt_ci_info_bottom, STRING_UNICODE, (UINT32)ci_info.menu.bottom_str); //4. fill the list ol = &olst_ci_info; page = OSD_GetObjListPage(ol); cnt = ci_info.menu.entry_cnt; OSD_SetObjListCount(ol, cnt); if(cnt <= page) OSD_SetAttr(&sb_ci_info, C_ATTR_HIDDEN); else OSD_SetAttr(&sb_ci_info, C_ATTR_ACTIVE); OSD_SetObjListTop(ol, 0); OSD_SetObjListCurPoint(ol, 0); OSD_SetObjListNewPoint(ol, 0); for( i = 0; i < page; i++) { item = (PCONTAINER)ci_info_list_items[i]; txt = (PTEXT_FIELD)OSD_GetContainerNextObj(item); if(ci_info.menu.is_selectable) { if(api_is_sd_color_mode()) { // OSD_SetColor(item, CON_SH_IDX_SD, CON_HL_IDX_SD, CON_SL_IDX_SD, CON_GRY_IDX_SD); OSD_SetColor(item, CON_SH_IDX, CON_HL_IDX, CON_SL_IDX, CON_GRY_IDX); // OSD_SetColor(txt, TXT_SH_IDX_SD,TXT_HL_IDX_SD,TXT_SL_IDX_SD,TXT_GRY_IDX_SD); OSD_SetColor(txt, TXT_SH_IDX,TXT_HL_IDX,TXT_SL_IDX,TXT_GRY_IDX); } else { #if 0 OSD_SetColor(item, CON_SH_IDX, CON_HL_IDX, CON_SL_IDX, CON_GRY_IDX); OSD_SetColor(txt, TXT_SH_IDX,TXT_HL_IDX,TXT_SL_IDX,TXT_GRY_IDX); #endif } } else { if(api_is_sd_color_mode()) { OSD_SetColor(item, CON_SH_IDX_SD, CON_SH_IDX_SD, CON_SL_IDX_SD, CON_GRY_IDX_SD); OSD_SetColor(txt, TXT_SH_IDX_SD,TXT_SH_IDX_SD,TXT_SL_IDX_SD,TXT_GRY_IDX_SD); } else { #if 0 OSD_SetColor(item, CON_SH_IDX, CON_SH_IDX, CON_SL_IDX, CON_GRY_IDX); OSD_SetColor(txt, TXT_SH_IDX,TXT_SH_IDX,TXT_SL_IDX,TXT_GRY_IDX); #endif } } } OSD_TrackObject( (POBJECT_HEAD)&g_win_ci_info, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); }
static void win_tplist_load_sat(BOOL updatesat) { UINT16 i,tp_num,focus_pos,max_top; OBJLIST* ol; CONTAINER* item; TEXT_FIELD* txt; SCROLL_BAR* sb; S_NODE s_node; T_NODE prog_tp_node; if(cur_tp_sat_idx >= get_tuner_sat_cnt(TUNER_EITHER) ) cur_tp_sat_idx= 0; get_tuner_sat(TUNER_EITHER, cur_tp_sat_idx, &s_node); ol = &tplst_olist; txt = &tplst_sat; sb = &tplst_scb; recreate_tp_view(VIEW_SINGLE_SAT, s_node.sat_id); tp_num = get_tp_num_sat(s_node.sat_id); OSD_SetObjListCount(ol, tp_num); /* Set count */ focus_pos = tp_list_pos;//OSD_GetObjListCurPoint(ol); if (tp_num > OSD_GetObjListPage(ol)) max_top = tp_num - OSD_GetObjListPage(ol); else max_top = 0; if (focus_pos == 0xffff) { if(playing_pnode.sat_id == s_node.sat_id) { for(i = 0;i < tp_num;i++) { get_tp_at(playing_pnode.sat_id, i, &prog_tp_node); if(prog_tp_node.tp_id == playing_pnode.tp_id) { focus_pos = i; if (focus_pos > max_top) tp_list_top = max_top; else tp_list_top = focus_pos; break; } } } } if(focus_pos >= tp_num) { focus_pos = 0; tp_list_top = 0; } OSD_SetObjListCurPoint(ol, focus_pos); OSD_SetObjListNewPoint(ol, focus_pos); OSD_SetObjListTop(ol, tp_list_top); OSD_SetScrollBarMax(sb,tp_num); OSD_SetScrollBarPos(sb, focus_pos); win_tplist_set_sat_display(); if(updatesat) OSD_DrawObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); }