static PRESULT pvod_item_sel_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT8 bID = OSD_GetObjID(pObj); UINT32 progNum; char string[100]; switch(event) { case EVN_REQUEST_STRING: if(bID==1) { UINT16 *uni_progName=(UINT16 *)param2; UINT8 * src; //ComAscStr2Uni("No Data", uni_progName); src = OSD_GetUnicodeString(RS_DISPLAY_NO_DATA); ComUniStrCopyChar((UINT8*)uni_progName, src); } break; case EVN_POST_CHANGE: //win_pvod_display_msg(param1); break; default: break; } return ret; }
static void newcamd_redraw_dt(BOOL update) { date_time dt; char stringTemp[50]; UINT16 *unistr=NULL; UINT16 unistr_dest[50]={0}; UINT16 uni_string[300]={0}; get_local_time(&dt); memset(unistr_dest,0,sizeof(unistr_dest)); memset(uni_string,0,sizeof(uni_string)); memset(stringTemp,0,sizeof(stringTemp)); unistr = OSD_GetUnicodeString(RS_TIME); sprintf(stringTemp," %02d:%02d",dt.hour,dt.min); ComAscStr2Uni(stringTemp,unistr_dest); ComUniStrCopyChar(&uni_string,(UINT16 *)unistr); ComUniStrCat(&uni_string,unistr_dest); OSD_SetTextFieldContent(&newcamd_txt_time, STRING_UNICODE,uni_string); if(update) { OSD_DrawObject((POBJECT_HEAD)&newcamd_txt_time,C_DRAW_SIGN_EVN_FLG |C_UPDATE_ALL); } }
static void win_rs232upg_msg_update(UINT8 * str) { UINT32 i,j; OSD_RECT rect; //ComAscStr2Uni(str, display_strs[10+rs232upg_msg_line%RS232UPG_MSG_MAX_LINE]); ComUniStrCopyChar((UINT16 *)display_strs[10+rs232upg_msg_line%RS232UPG_MSG_MAX_LINE],str); for(i=0; i<RS232UPG_MSG_MAX_LINE; i++) { if(rs232upg_msg_line<RS232UPG_MSG_MAX_LINE) j = i%RS232UPG_MSG_MAX_LINE; else j = (rs232upg_msg_line+1+i)%RS232UPG_MSG_MAX_LINE; rs232upg_msg_buf[i] = display_strs[10+j]; } //draw msg infos for(i=0; i<RS232UPG_MSG_MAX_LINE; i++) { rect.uLeft = MSG_L; rect.uTop = MSG_T+(MSG_H+MSG_GAP)*i; rect.uWidth = MSG_W; rect.uHeight= MSG_H; OSD_SetRect2(&rs232upg_txt_msg.head.frame, &rect); OSD_SetTextFieldContent(&rs232upg_txt_msg, STRING_UNICODE, (UINT32)rs232upg_msg_buf[i]); OSD_DrawObject( (POBJECT_HEAD)&rs232upg_txt_msg, C_UPDATE_ALL); } rs232upg_msg_line++;; }
static PRESULT ca_win_event_proc(POBJECT_HEAD pObj, UINT32 msg_type, UINT32 msg_code) { PRESULT ret = PROC_LOOP; UINT16 ca_slot_status_str[CA_MENU_TXT_LENGTH]; UINT8 focusID; if((msg_type & 0xffff) == CTRL_MSG_SUBTYPE_STATUS_MCAS) { UINT8 slot = (UINT8)(msg_code&1); UINT16 ca_system_id = (UINT16)(msg_code & 0xFFFE); mcas_disp_type_t disp_type = (mcas_disp_type_t)(msg_code>>16); UINT16 *unistr=NULL; UINT16 *unistr2=NULL; UINT16 unistr_dest[50]={0}; UINT16 uni_string[CA_MENU_TXT_LENGTH]={0}; UINT16 uni_string2[CA_MENU_TXT_LENGTH]={0}; char string[20]; memset(string,0,sizeof(string)); memset(unistr_dest,0,sizeof(unistr_dest)); memset(uni_string,0,sizeof(uni_string)); memset(uni_string2,0,sizeof(uni_string2)); unistr = OSD_GetUnicodeString(RS_SLOT); #ifdef SUPPORT_DUAL_SMC sprintf(string," %d :",slot+1); #else sprintf(string," : "); #endif ComAscStr2Uni(string,unistr_dest); ComUniStrCopyChar(&uni_string,(UINT16 *)unistr); ComUniStrCat(&uni_string,unistr_dest); unistr2 = OSD_GetUnicodeString(stSlotInfor[slot].ucMCASstr); ComUniStrCopyChar(&uni_string2,(UINT16 *)unistr2); ComUniStrCat(&uni_string,uni_string2); OSD_SetTextFieldContent((PTEXT_FIELD)txt_ca_slots[slot], STRING_UNICODE, (UINT32)uni_string); focusID = OSD_GetFocusID((POBJECT_HEAD)&g_win_ca_slots); if(focusID == (slot + 1)) OSD_TrackObject(con_ca_slots[slot], C_UPDATE_ALL); else OSD_DrawObject(con_ca_slots[slot], C_UPDATE_ALL); }
static void win_satsrch_set_drawselectsats(void) { struct OSDRect rect; UINT16 i,sat_cnt,num; UINT16 col,row; TEXT_FIELD* txt = &satsrch_multisats_name; S_NODE s_node; UINT16 top; UINT16 str[50]; UINT16 nStrLen; if(single_multi_srch_flag == 0) return; MEMSET(sat_ids,0,sizeof(sat_ids)/sizeof(sat_ids[0])); sat_cnt = num = get_tuner_sat_cnt(TUNER_EITHER_SELECT);//get_selected_sat_num(); if(num > SELSAT_ROW_CNT *2) num = SELSAT_ROW_CNT *2; txt->pString = display_strs[0]; for(i=0;i<sat_cnt;i++) { get_tuner_sat(TUNER_EITHER_SELECT,i,&s_node); sat_ids[i] = s_node.sat_id; } for(i=0;i<SELSAT_ROW_CNT*2;i++) { row = i/2; top = SELSAT_T + row * SELSAT_H+40; if(i%2 == 0) OSD_SetRect(&txt->head.frame, SELSAT_L0, top, SELSAT_W, SELSAT_H-6); else OSD_SetRect(&txt->head.frame, SELSAT_L1, top, SELSAT_W, SELSAT_H-6); get_tuner_sat(TUNER_EITHER_SELECT,i,&s_node); if(i<sat_cnt) { if(s_node.DiSEqC_type !=6) ComUniStrCopyChar((UINT8*)txt->pString, s_node.sat_name); } else ComAscStr2Uni("", txt->pString); OSD_DrawObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); } if(num == 0) { txt->pString = NULL; top = SELSAT_T + 2 * SELSAT_H+40; OSD_SetRect(&txt->head.frame, SELSAT_L0 + SELSAT_W/2, top, SELSAT_W, SELSAT_H-6); OSD_SetTextFieldContent(txt, STRING_ID , RS_DISPLAY_NO_SATELLITE/*RS_NO_SATELLITE_SELECT*/); OSD_DrawObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); } }
static void get_ping_mode(UINT32 val, UINT16* unistr) { char str[30]={0}; UINT16 uni_str[30]={0}; if(val ==0) { //sprintf(str,"Forever"); ComUniStrCopyChar(unistr,(UINT16 *)OSD_GetUnicodeString(RS_FOREVER)); } else if(val ==1) { //sprintf(str,"5Times"); sprintf(str,"5 "); ComAscStr2Uni(str,unistr); ComUniStrCopyChar(uni_str,(UINT16 *)OSD_GetUnicodeString(RS_TIMIES)); ComUniStrCat(unistr,uni_str); } //ComAscStr2Uni(str, unistr); }
static void MailDrawNum0() //对新邮件和邮件总数赋值 ---yuanlin { UINT8 *src; UINT8 tmp[6]={0,}; UINT8 num=GYCA_EMAIL_MAX_CNT;// ------yuanlin UINT16 strLen; OSD_RECT rc; TEXT_FIELD *txt; UINT8 total, newmail; txt = &mail_new; OSD_SetTextFieldStrPoint(txt, len_display_str); src = OSD_GetUnicodeString(RS_CTI_NEW_MAIL); ComUniStrCopyChar((UINT8*)len_display_str, src); strLen = ComUniStrLen(len_display_str); sprintf(tmp, " %d",email_count_unread ); ComAscStr2Uni(tmp, &len_display_str[strLen]); OSD_SetTextFieldContent(txt, STRING_UNICODE, (UINT32)len_display_str); OSD_DrawObject((POBJECT_HEAD)txt, C_UPDATE_ALL); OSD_SetTextFieldStrPoint(txt, NULL); txt = &mail_total; OSD_SetTextFieldStrPoint(txt, len_display_str); MEMSET(len_display_str, 0, sizeof(len_display_str)); MEMSET(tmp, 0, sizeof(tmp)); src = OSD_GetUnicodeString(RS_RESIDUAL_SPACE); ComUniStrCopyChar((UINT8*)len_display_str, src); strLen = ComUniStrLen(len_display_str); sprintf(tmp, " %d",num-email_count); ComAscStr2Uni(tmp, &len_display_str[strLen]); OSD_SetTextFieldContent(txt, STRING_UNICODE, (UINT32)len_display_str); OSD_DrawObject((POBJECT_HEAD)txt, C_UPDATE_ALL); OSD_SetTextFieldStrPoint(txt, NULL); }
void win_IPPVinfo_open_title(POBJECT_HEAD pObj, UINT16 num) { UINT8 *p, info[20]; UINT16 temp[20],title[50]; if (NULL == title) return; MEMSET(temp, 0, sizeof(temp)); MEMSET(title, 0, sizeof(title)); p = OSD_GetUnicodeString(RS_IPPV_PROGRAM); ComUniStrCopyChar((UINT8 *)title, p); sprintf(info, " (NUM: %d)",num); ComAscStr2Uni(info, temp); ComUniStrCat(title,temp); wincom_open_title_ext(pObj, NULL, title,0); }
static PRESULT favgrplst_list_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; VACTION unact; UINT16 uni_name[30]; UINT8* new_name; OBJLIST* ol; UINT16 curitem; SYSTEM_DATA* sys_data = sys_data_get(); ol = &favgrplist_olist; curitem = OSD_GetObjListNewPoint(ol); switch(event) { case EVN_PRE_DRAW: win_favgrplst_set_display(); break; case EVN_UNKNOWN_ACTION: unact = (VACTION)(param1>>16); if(unact== VACT_FAV_EDIT) { //ComAscStr2Uni(sys_data->favgrp_names[curitem], uni_name); MEMCPY(uni_name,(UINT16*)sys_data->favgrp_names[curitem],(FAV_GRP_NAME_LEN + 1)); #ifndef KEYBOARD_SUPPORT if(win_rename_open(uni_name,&new_name,favgrp_check_input_name)) #else if(win_keyboard_rename_open(uni_name,&new_name,favgrp_check_input_name)) #endif { //ComUniStrToAsc(new_name,sys_data->favgrp_names[curitem]); ComUniStrCopyChar(sys_data->favgrp_names[curitem],new_name); } OSD_TrackObject((POBJECT_HEAD)&g_win_favgrplst, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); // wincom_open_title(pObj,RS_FAVORITE,0); wincom_open_subtitle(pObj,RS_FAVORITE,0); } break; } return ret; }
static void get_ping_timeout(UINT32 val, UINT16* unistr) { char str[30]={0}; UINT16 uni_str[30]={0}; switch(val) { case 0: case 1: case 2:case 3:case 4: case 5: case 6: case 7:case 8:case 9: sprintf(str,"%d ",val+1); break; default: sprintf(str,"2 "); break; } ComAscStr2Uni(str, unistr); ComUniStrCopyChar(uni_str,(UINT16 *)OSD_GetUnicodeString(RS_SECOND)); ComUniStrCat(unistr,uni_str); }
void win_progname_draw_infor(void) { UINT16 group_name[MAX_SERVICE_NAME_LENGTH + 1 + 10]; UINT8 group_type,av_mode; UINT16 cur_channel; P_NODE p_node; S_NODE s_node; // T_NODE t_node; char string[100]; char prog_name[MAX_SERVICE_NAME_LENGTH + 1]; INT32 ret,len; UINT32 i,j; BITMAP* bmp; TEXT_FIELD* txt; UINT16 icon; date_time dt; prog_txt_t* p_prog_txt; prog_bmp_t* p_prog_bmp; eit_event_info_t *pe=NULL,*fe=NULL; UINT8 *s1=NULL,*s2=NULL; INT32 strlen; struct ACTIVE_SERVICE_INFO service; struct t_ttx_lang *ttx_lang_list; UINT8 ttx_lang_num; struct t_subt_lang* sub_lang_list; UINT8 sub_lang_num; bmp = &prog_bmp; txt = &prog_text; UINT32 fav_mask; fav_mask = 0; for(i=0;i<MAX_FAVGROUP_NUM;i++) fav_mask |= (0x01<<i); av_mode = sys_data_get_cur_chan_mode(); cur_channel = sys_data_get_cur_group_cur_mode_channel(); ret = get_prog_at(cur_channel,&p_node); get_sat_by_id(p_node.sat_id, &s_node); get_cur_group_name((char*)group_name,&group_type); get_local_time(&dt); /* #ifdef _EPG_MULTI_SERVICE #ifdef EPG_FAST_PARSE epg_fast_pasrse_set(FALSE,NULL,NULL); #endif get_tp_by_id(p_node.tp_id, &t_node); api_epg_parse(p_node.tp_id, t_node.network_id, t_node.t_s_id, p_node.prog_number, epg_type_pf); struct active_service_t service; service.tp_id = p_node.tp_id; service.orig_network_id = t_node.network_id; service.ts_id = t_node.t_s_id; service.service_id = p_node.prog_number; api_epg_set_active_service(&service, 1); api_epg_parse(p_node.tp_id, t_node.network_id, t_node.t_s_id, p_node.prog_number, epg_type_pf); #endif */ service.tp_id = p_node.tp_id; service.service_id = p_node.prog_number; epg_set_active_service(&service, 1); /*current next epg info */ pe=epg_get_cur_service_event((INT32)cur_channel, PRESENT_EVENT, NULL,NULL,NULL, /*event_update*/TRUE); fe=epg_get_cur_service_event((INT32)cur_channel, FOLLOWING_EVENT, NULL,NULL,NULL, event_update); if(event_update==FALSE) { if(pe==NULL || fe==NULL) { event_update = TRUE; } } else { if(pe!=NULL && fe!=NULL) { event_update = FALSE; } } s1=epg_get_event_name(pe, &len); // s1=(UINT8*)epg_get_event_name(pe, present_name, 32); s2=epg_get_event_name(fe, &len); // s2=(UINT8*)epg_get_event_name(fe, following_name, 32); TTXEng_GetInitLang(&ttx_lang_list, &ttx_lang_num); subt_get_language(&sub_lang_list ,&sub_lang_num); if(sub_lang_num == 0) TTXEng_GetSubtLang(&ttx_lang_list,&sub_lang_num); for(i=0;i<PROG_BMP_NUM;i++) { p_prog_bmp = &prog_bmps[i]; icon = INVALID_ID; switch(p_prog_bmp->bmp_type) { case PROG_BMP_STATIC: icon = prog_bmps[i].icon; break; #ifndef MODIFY_FOR_EGYPT_CUSTOMER case PROG_BMP_AV_TYPE: if(av_mode==TV_CHAN) icon = IM_INFO_BAR_TV; else icon = IM_INFO_BAR_RADIO; break; #endif case PROG_BMP_EPG: if( (s1||s2) ) icon = prog_bmps[i].icon; break; case PROG_BMP_TTX: if(ttx_lang_num>0) icon = prog_bmps[i].icon; break; case PROG_BMP_SUBT: if(sub_lang_num>0) icon = prog_bmps[i].icon; break; case PROG_BMP_LOCK: if(p_node.lock_flag) icon = prog_bmps[i].icon; break; case PROG_BMP_FAV: if(p_node.fav_group[0] & fav_mask) icon = prog_bmps[i].icon; break; case PROG_BMP_CA: { #if 0 BOOL b,bFlag; INT8 level,quality,lock; signal_lock_status lock_flag; signal_scramble_status scramble_flag; signal_lnbshort_status lnbshort_flag; signal_parentlock_status parrentlock_flag; bFlag = GetSignalStatus(&lock_flag, &scramble_flag,&lnbshort_flag,&parrentlock_flag); if(bFlag && lock_flag== SIGNAL_STATUS_LOCK && lnbshort_flag==SIGNAL_STATUS_LNBNORMAL && parrentlock_flag==SIGNAL_STATUS_PARENT_UNLOCK && scramble_flag == SIGNAL_STATUS_SCRAMBLED) icon = prog_bmps[i].icon; #else if(p_node.ca_mode) icon = prog_bmps[i].icon; #endif } break; default: break; } OSD_SetBitmapContent(bmp, icon); OSD_SetRect(&bmp->head.frame, p_prog_bmp->left, p_prog_bmp->top, p_prog_bmp->width,p_prog_bmp->height); OSD_DrawObject( (OBJECT_HEAD*) bmp, C_UPDATE_ALL); } for(i=0;i<PROG_TXT_NUM;i++) { p_prog_txt = &prog_txts[i]; string[0] = '\0'; switch(p_prog_txt->txt_type) { case PROG_TXT_PROG_NAME: #ifndef DB_USE_UNICODE_STRING STRCPY(prog_name,p_node.service_name); for(j=0;j<STRLEN(prog_name);j++) if(prog_name[j] >= 0x80) { prog_name[j] = '\0'; break; } if(p_node.ca_mode==0) sprintf(string,"%s(%s)",prog_name,s_node.sat_name); else sprintf(string,"$%s(%s)",prog_name,s_node.sat_name); #else if(p_node.ca_mode==0) STRCPY(string,""); else STRCPY(string,"$"); ComAscStr2Uni(string,len_display_str); strlen = ComUniStrLen( len_display_str); //strcpy_uni(&len_display_str[strlen],p_node.service_name); ComUniStrCopyChar((UINT8 * )&len_display_str[strlen],p_node.service_name); strlen = ComUniStrLen( len_display_str); ComAscStr2Uni("(",&len_display_str[strlen]); strlen = ComUniStrLen( len_display_str); ComUniStrCopyChar((UINT8 * )&len_display_str[strlen],s_node.sat_name); strlen = ComUniStrLen( len_display_str); ComAscStr2Uni(")",&len_display_str[strlen]); #endif break; case PROG_TXT_DATE: sprintf(string,"%02d/%02d",dt.month,dt.day); ComAscStr2Uni(string, (UINT16 *)len_display_str); break; case PROG_TXT_TIME: sprintf(string,"%02d:%02d",dt.hour,dt.min); ComAscStr2Uni(string, (UINT16 *)len_display_str); break; case PROG_TXT_PROG_NUM: sprintf(string,"%04d",cur_channel + 1); ComAscStr2Uni(string, (UINT16 *)len_display_str); break; case PROG_TXT_EPG_NOW: if (s1 ) { sprintf(string,"Now: "); ComAscStr2Uni(string, (UINT16 *)len_display_str); len =ComUniStrLen(len_display_str); ComUniStrCopyChar((UINT8*)&len_display_str[len],s1); } else { OSD_SetTextFieldStrPoint(txt,NULL); OSD_SetTextFieldContent(txt,STRING_ID,RS_EPG_NO_INFORMATION); } break; case PROG_TXT_EPG_NEXT: if (s2) { sprintf(string,"Next: "); ComAscStr2Uni(string, (UINT16 *)len_display_str); len =ComUniStrLen(len_display_str); ComUniStrCopyChar((UINT8*)&len_display_str[len],s2); } else { sprintf(string," "); ComAscStr2Uni(string, (UINT16 *)len_display_str); } break; case PROG_TXT_PROG_GROUP: #ifndef DB_USE_UNICODE_STRING sprintf(string,"%s",group_name); #else ComUniStrCopy(len_display_str, group_name); #endif break; default: ; } #ifndef DB_USE_UNICODE_STRING ComAscStr2Uni(string, (UINT16 *)len_display_str); #else /* if(p_prog_txt->txt_type != PROG_TXT_PROG_NAME && p_prog_txt->txt_type != PROG_TXT_PROG_GROUP &&p_prog_txt->txt_type != PROG_TXT_EPG_NOW &&p_prog_txt->txt_type != PROG_TXT_EPG_NEXT) ComAscStr2Uni(string, (UINT16 *)len_display_str); */ if(p_prog_txt->txt_type == PROG_TXT_PROG_NUM) txt->head.bFont = 2; else txt->head.bFont = 0; #endif OSD_SetRect(&txt->head.frame, p_prog_txt->left, p_prog_txt->top, p_prog_txt->width,p_prog_txt->height); //txt->pText = (UINT8*)len_display_str; txt->head.style.bShowIdx = p_prog_txt->shidx; OSD_DrawObject( (OBJECT_HEAD *)txt, C_UPDATE_ALL); OSD_SetTextFieldContent(txt,STRING_ID,0); OSD_SetTextFieldStrPoint(txt,len_display_str); } #ifdef MODIFY_FOR_EGYPT_CUSTOMER progname_signal_refresh(TRUE); #endif }
static PRESULT usbupg_item_sel_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { UINT8 bID; UINT16 sel,block_idx,*Uni_str; UINT32 block_len; char str_buf[20] = {0}; char str_extend[4] = {0}; char str_filter[4] = {0}; PRESULT ret = PROC_PASS; USBUPG_FILENODE filenode; MULTISEL *pMsel; bID = OSD_GetObjID(pObj); switch(event) { case EVN_REQUEST_STRING: sel = param1; Uni_str= (UINT16*)param2; // NOTICE: Uni_str size is 32 (#define MAX_STR_LEN 32) in obj_multisel.c if(bID == UPG_MODE_ID) { ComUniStrCopyChar(Uni_str,OSD_GetUnicodeString(usb_upgrade_type_name[sel])); //memcpy(str_buf, usb_upgrade_type_name[sel], STRLEN(usb_upgrade_type_name[sel])); //ComAscStr2Uni(str_buf, Uni_str); } else if(bID == UPG_FILE_ID) { if(usbupg_files_cnt == 0) { pMsel = &usbupg_sel_upgrade_type; usbupg_get_file_filter(OSD_GetMultiselSel(pMsel), str_extend, str_filter); string_to_lower(str_extend); #ifdef USBUPG_UPGFILE_FILTER string_to_lower(str_filter); #else str_filter[0] = 0; #endif { UINT16 *pStr=NULL; UINT16 uni_string[50]={0}; UINT16 uni_string2[50]={0}; pStr = OSD_GetUnicodeString(RS_NO_FILE); ComUniStrCopyChar(&uni_string,(UINT16 *)pStr); sprintf(str_buf, "(%s*.%s)", str_filter, str_extend); ComAscStr2Uni(str_buf, uni_string2); ComUniStrCat(&uni_string,uni_string2); ComUniStrCopyChar(Uni_str,uni_string); //sprintf(str_buf, "No File(%s*.%s)", str_filter, str_extend); //ComAscStr2Uni(str_buf, Uni_str); } } else { usbupg_get_filenode(&filenode,sel); filenode.upg_file_name[31] = 0; ComAscStr2Uni(filenode.upg_file_name, Uni_str); } } else { ComAscStr2Uni("", Uni_str); } break; case EVN_POST_CHANGE: if(bID == 1) { sel = param1; usbupg_create_filelist(sel,&usbupg_files_cnt); pMsel = &usbupg_filelist_sel; OSD_SetMultiselSel(pMsel, 0); OSD_SetMultiselCount(pMsel, (usbupg_files_cnt)); OSD_DrawObject((POBJECT_HEAD)pMsel,C_UPDATE_ALL); } break; default: break; } return ret; }
BOOL submenu_set_one_page(sub_menu_t* sub_menu) { UINT16 i; sub_menu_item_t* menu_item; CONTAINER* menu_item_obj; POBJECT_HEAD pObj,pObjName,pObjSet; CONTAINER* win_sub_menu = &g_win_submenu; UINT8 action; UINT8 pStr[]=" "; UINT16 *str,str_len,str1[100]; for(i=0;i<sub_menu->list_page;i++) { #if 0 /* IDX & setting Display */ ComInt2UniStr(display_strs[i], i + 1, 0); ComAscStr2Uni("", display_strs[10 + i]); #endif /* Set attribute to active*/ action = submenu_item_attr(sub_menu, i+sub_menu->list_top); submenu_set_item_attr(i,action); menu_item = &sub_menu->items[i+sub_menu->list_top]; menu_item_obj = submenu_items[i]; /* Link menu items next object and set IDs*/ menu_item_obj->head.pNext = (i< (sub_menu->list_page - 1) ) ? ((POBJECT_HEAD)submenu_items[i + 1]) : NULL; OSD_SetID(menu_item_obj, i + 1, i + 1, i + 1, i==0? sub_menu->list_page : i, (i==sub_menu->list_page - 1)? 1 : i+2); #if 0 /* Link menu item's setting or not*/ pObj = menu_item_obj->pNextInCntn; /* IDX */ pObjName = pObj->pNext; /* Name */ pObjSet = submenu_item_sets[i]; switch(menu_item->item_type) { case ITEM_TYPE_NOMAL: pObjName->pNext = NULL; break; default: pObjName->pNext = pObjSet; break; } #endif /* Set menu item's name display*/ //memset(pStr,0x0,sizeof(pStr)); memset(str1,0x0,sizeof(str1)); //sprintf(pStr," "); ComAscStr2Uni(pStr,str1); str_len = ComUniStrLen(str1); str = OSD_GetUnicodeString(menu_item->item_name); ComUniStrCopyChar(&str1[str_len], (UINT16 *)str); pObjName = OSD_GetContainerNextObj(menu_item_obj); //OSD_SetTextFieldContent((PTEXT_FIELD)pObjName, STRING_ID, (UINT32)menu_item->item_name); OSD_SetTextFieldContent((PTEXT_FIELD)pObjName, STRING_UNICODE, (UINT32)str1); /*Set menu item's callback */ if(menu_item->item_callback != NULL) OSD_SetCallback(menu_item_obj, menu_item->item_callback); else OSD_SetCallback(menu_item_obj, sm_item_con_callback); } OSD_SetContainerFocus(win_sub_menu, sub_menu->list_sel + 1 - sub_menu->list_top); }
static PRESULT weathercitylst_list_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; VACTION unact; UINT16 uni_name[30]; UINT8* new_name; OBJLIST* ol; UINT16 curitem; UINT8 back_saved, i; char strTmp[30]; char strTmp1[30]; SYSTEM_DATA* sys_data = sys_data_get(); ol = &weather_city_olist; curitem = OSD_GetObjListNewPoint(ol); switch(event) { case EVN_PRE_DRAW: weathercitylst_set_display(); break; case EVN_UNKNOWN_ACTION: unact = (VACTION)(param1>>16); if(unact== VACT_CITY_EDIT) { //ComAscStr2Uni(sys_data->weather_city_name[curitem], uni_name); MEMCPY(uni_name,(UINT16*)sys_data->weather_city_name[curitem],(WEATHER_CITY_NAME_LEN + 1)); #ifndef KEYBOARD_SUPPORT if(win_rename_open(uni_name,&new_name,weathercity_check_input_name)) #else if(win_keyboard_rename_open(uni_name,&new_name,weathercity_check_input_name)) #endif { //ComUniStrToAsc(new_name,sys_data->weather_city_name[curitem]); ComUniStrCopyChar(sys_data->weather_city_name[curitem], new_name); } OSD_TrackObject(ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); } else if(unact == VACT_CITY_DEL) { weathercitylst_delete(curitem); weathercitylst_load_list(); OSD_TrackObject(ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); } else if(unact== VACT_CITY_ADD) { if (OSD_GetObjListCount(ol) == WEATHER_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,NULL,RS_THE_LIST_IS_FULL); win_compopup_open_ext(&back_saved); break; } memset(uni_name, 0x0, sizeof(uni_name)); #ifndef KEYBOARD_SUPPORT if(win_rename_open(uni_name,&new_name,weathercity_check_input_name)) #else if(win_keyboard_rename_open(uni_name,&new_name,weathercity_check_input_name)) #endif { //ComUniStrToAsc(new_name,sys_data->weather_city_name[OSD_GetObjListCount(ol)]); ComUniStrCopyChar(sys_data->weather_city_name[OSD_GetObjListCount(ol)],new_name); } weathercitylst_load_list(); OSD_TrackObject(ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); } else if(unact == VACT_CITY_ENTER) { if(weath==0) { weath = weather_download(sys_data->weather_city_name[curitem]); 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); ret=weath; } } break; } return ret; }
static void win_otaup_set_btn_msg_display(BOOL update) { MULTI_TEXT* mtxt_msg; TEXT_FIELD* txt_btn; UINT16 btn_strid; TEXT_CONTENT* tcont; UINT16 cur_sw_ver = SYS_SW_VERSION&0xffff; UINT8 * src; UINT8 str_len; INT32 btn_state; lpVSCR apvscr; tcont = otamsg_mtxt_content; tcont->bTextType = STRING_ID; mtxt_msg = &otaupg_mtxt_msg; txt_btn = &otaupg_txt_btn; /* 0 - stop , 1 - exit , 2 - download 3 - burnflash 4 - reboot*/ btn_state = win_otaup_get_btn_state(); if(btn_state == 0) btn_strid = RS_DISEQC12_MOVEMENT_STOP; else if(btn_state == 1) btn_strid = RS_HELP_EXIT; else if(btn_state == 2) btn_strid = RS_DISPLAY_DOWNLOADING; else if(btn_state == 3) btn_strid = RS_OTA_BURNFLASH; else if(btn_state == 4) btn_strid = RS_MSG_UPGRADE_REBOOT; else btn_strid = 0; switch(ota_proc_step) { case OTA_STEP_GET_INFO: switch(ota_proc_ret) { case 0: tcont->text.wStringID = RS_OTA_COLLECT_INFORMATION; break; case PROC_SUCCESS: if(ota_dl_info.sw_version <= cur_sw_ver) { if(ota_dl_info.sw_version < cur_sw_ver) { //ComAscStr2Uni("SW is older than your STB's SW! Do you want to continue?",len_display_str); src = OSD_GetUnicodeString(RS_SW_IS_OLDER_CONTINUE); ComUniStrCopyChar((UINT8*)len_display_str, src); } else { //ComAscStr2Uni("SW is same to your STB's SW! Do you want to continue?",len_display_str); src = OSD_GetUnicodeString(RS_SW_IS_SAME_CONTINUE); ComUniStrCopyChar((UINT8*)len_display_str, src); } } else { src = OSD_GetUnicodeString(RS_DISPLAY_NEXT); ComUniStrCopyChar((UINT8*)len_display_str, src); str_len = ComUniStrLen(len_display_str); ComAscStr2Uni(" : ",&len_display_str[str_len]); str_len = ComUniStrLen(len_display_str); src = OSD_GetUnicodeString(RS_DISPLAY_DOWNLOADING); ComUniStrCopyChar((UINT8*)&len_display_str[str_len], src); } tcont->bTextType = STRING_UNICODE; tcont->text.pString = len_display_str; break; case PROC_STOPPED: //ComAscStr2Uni("User canceled",len_display_str); src = OSD_GetUnicodeString(RS_USER_CANCELED); ComUniStrCopyChar((UINT8*)len_display_str, src); tcont->bTextType = STRING_UNICODE; tcont->text.pString = len_display_str; break; case PROC_FAILURE: tcont->text.wStringID = RS_OTA_COLLECT_INFORMATION_FAIL; break; } break; case OTA_STEP_DOWNLOADING: switch(ota_proc_ret) { case 0: tcont->text.wStringID = RS_DISPLAY_DOWNLOADING; break; case PROC_SUCCESS: src = OSD_GetUnicodeString(RS_DISPLAY_NEXT); ComUniStrCopyChar((UINT8*)len_display_str, src); str_len = ComUniStrLen(len_display_str); ComAscStr2Uni(" : ",&len_display_str[str_len]); str_len = ComUniStrLen(len_display_str); src = OSD_GetUnicodeString(RS_OTA_BURNFLASH); ComUniStrCopyChar((UINT8*)&len_display_str[str_len], src); tcont->bTextType = STRING_UNICODE; tcont->text.pString = len_display_str; break; case PROC_STOPPED: //ComAscStr2Uni("User canceled",len_display_str); src = OSD_GetUnicodeString(RS_USER_CANCELED); ComUniStrCopyChar((UINT8*)len_display_str, src); tcont->bTextType = STRING_UNICODE; tcont->text.pString = len_display_str; break; case PROC_FAILURE: tcont->text.wStringID = RS_DISPLAY_DOWNLOAD_NOT_FINISH; break; } break; case OTA_STEP_BURNFLASH: switch(ota_proc_ret) { case 0: tcont->text.wStringID = RS_OTA_BURNFLASH_DO_NOT_POWER_OFF; break; case PROC_SUCCESS: src = OSD_GetUnicodeString(RS_DISPLAY_NEXT); ComUniStrCopyChar((UINT8*)len_display_str, src); str_len = ComUniStrLen(len_display_str); ComAscStr2Uni(" : ",&len_display_str[str_len]); str_len = ComUniStrLen(len_display_str); src = OSD_GetUnicodeString(RS_MSG_UPGRADE_REBOOT); ComUniStrCopyChar((UINT8*)&len_display_str[str_len], src); tcont->bTextType = STRING_UNICODE; tcont->text.pString = len_display_str; break; //case PROC_STOPPED: // break; case PROC_FAILURE: tcont->text.wStringID = RS_MSG_UPGRADE_BURN_FLASH_FAIL; break; } break; } OSD_SetTextFieldContent(txt_btn, STRING_ID, (UINT32)btn_strid); if(update) { OSD_DrawObject((POBJECT_HEAD)mtxt_msg, C_UPDATE_ALL); apvscr = OSD_GetTaskVscr(osal_task_get_current_id()); if(apvscr->lpbScr != NULL) { apvscr->updatePending = 1; OSD_UpdateVscr(apvscr); } if(ota_proc_step == OTA_STEP_BURNFLASH && ota_proc_ret==0) OSD_DrawObject( (POBJECT_HEAD)txt_btn, C_UPDATE_ALL); else OSD_TrackObject((POBJECT_HEAD)txt_btn, C_UPDATE_ALL); apvscr = OSD_GetTaskVscr(osal_task_get_current_id()); if(apvscr->lpbScr != NULL) { apvscr->updatePending = 1; OSD_UpdateVscr(apvscr); } } }
static PRESULT timerset_mselinfo_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT32 sel; VACTION unact; P_NODE p_node; UINT16 *Uni_str; TIMER_SET_CONTENT *settimer; COM_POP_LIST_PARAM_T param; OSD_RECT rect; settimer = &timer_set; switch (event) { case EVN_PRE_CHANGE: sel = *((UINT32*)param1); break; case EVN_POST_CHANGE: sel = param1; break; case EVN_UNKNOWN_ACTION: unact = (VACTION)(param1 >> 16); if (unact == VACT_ENTER) // select channel { OSD_SetRect2(&rect, &pObj->frame); rect.uLeft -= 40; rect.uWidth += 40; rect.uHeight = 180; param.selecttype = POP_LIST_SINGLESELECT; param.cur = TIMER_SERVICE_INFO; sel = win_com_open_sub_list(POP_LIST_TYPE_CHANLIST, &rect, ¶m); if (sel < (UINT32)TIMER_SERVICE_INFO_CNT) { get_prog_at(sel, &p_node); settimer->wakeup_channel = p_node.prog_id; //MEMCPY(settimer->event_name, (UINT8 *)&p_node.service_name[0], 40); TIMER_SERVICE_INFO = sel; } OSD_TrackObject((POBJECT_HEAD) &timer_con_serviceinfo, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); } break; case EVN_REQUEST_STRING: sel = param1; Uni_str = (UINT16*)param2; get_prog_at(sel, &p_node); if (p_node.ca_mode) ComAscStr2Uni("$", Uni_str); ComUniStrCopyChar((UINT8*) &Uni_str[p_node.ca_mode], p_node.service_name); MEMCPY(settimer->event_name, (UINT8 *)Uni_str, 40); break; } return ret; }
static void win_ci_set_slot_status_text(UINT8 slot, UINT8 status) //guop edit 20101110 { char ansi_str[CI_MENU_TXT_LENGTH]; char *str; void *ci_buffer = (void*)win_ci_get_tmp_buf(); UINT16 *unistr=NULL; UINT16 *unistr2=NULL; UINT16 unistr_dest[50]={0}; UINT16 uni_string[300]={0}; UINT16 uni_string2[300]={0}; char string[20]; memset(string,0,sizeof(string)); memset(unistr_dest,0,sizeof(unistr_dest)); memset(uni_string,0,sizeof(uni_string)); memset(uni_string2,0,sizeof(uni_string2)); /* //for card name not reflash when enter a new card! if((status == ci_slots_info.status[slot]) && (ci_slots_info.status_str[slot][0] != 0)) { return; } */ ci_slots_info.status_str[slot][0] = 0; #ifdef SINGLE_CI_SUPPORT unistr = OSD_GetUnicodeString(RS_SLOT); sprintf(string," : "); ComAscStr2Uni(string,unistr_dest); ComUniStrCopyChar(&uni_string,(UINT16 *)unistr); ComUniStrCat(&uni_string,unistr_dest); //sprintf(ansi_str, "Slot: "); #else unistr = OSD_GetUnicodeString(RS_SLOT); sprintf(string," %d :",slot+1); ComAscStr2Uni(string,unistr_dest); ComUniStrCopyChar(&uni_string,(UINT16 *)unistr); ComUniStrCat(&uni_string,unistr_dest); //sprintf(ansi_str, "Slot %d: ", slot + 1); #endif switch(status) { case CAM_DETACH: { unistr2 = OSD_GetUnicodeString(RS_NOT_AVAILABLE); ComUniStrCopyChar(&uni_string2,(UINT16 *)unistr2); ComUniStrCat(&uni_string,uni_string2); //strcat(ansi_str, "Not Available"); } break; case CAM_ATTACH: { unistr2 = OSD_GetUnicodeString(RS_INIT); ComUniStrCopyChar(&uni_string2,(UINT16 *)unistr2); ComUniStrCat(&uni_string,uni_string2); //strcat(ansi_str, "Initializing"); } break; case CAM_STACK_DETACH: { unistr2 = OSD_GetUnicodeString(RS_UNINSTALLING); ComUniStrCopyChar(&uni_string2,(UINT16 *)unistr2); ComUniStrCat(&uni_string,uni_string2); //strcat(ansi_str, "Uninstalling"); } break; case CAM_STACK_ATTACH: str = api_ci_get_menu_string(ci_buffer, CI_DATA_BUFFER_LEN, slot); if(str != NULL) { ComAscStr2Uni((UINT8*)str,uni_string2); //ComUniStrCopyChar(&uni_string,(UINT16 *)unistr); ComUniStrCat(&uni_string,uni_string2); //strcat(ansi_str, str); //ComAscStr2Uni((UINT8*)str, ci_slots_info.status_str[slot]); } break; default: { unistr2 = OSD_GetUnicodeString(RS_UNKNOWN); ComUniStrCopyChar(&uni_string2,(UINT16 *)unistr2); ComUniStrCat(&uni_string,uni_string2); //strcat(ansi_str, "Unknown"); } break; } // ComAscStr2Uni((UINT8*)ansi_str, ci_slots_info.status_str[slot]); MEMCPY(ci_slots_info.status_str[slot], uni_string,sizeof(uni_string)); return; }
void win_timerlist_loadsetting(void) { SYSTEM_DATA* sys_data; TIMER_SET_CONTENT* timer; INT32 i; CONTAINER* con; TEXT_FIELD* txt; UINT16* pstr; char str[30]; UINT16 strID; P_NODE p_node; sys_data = sys_data_get(); for(i=0;i < MAX_TIMER_NUM;i++) { LOAD_ONE_TIMER: timer = &sys_data->timer_set.TimerContent[i]; con = timers_conts[i]; pstr = display_strs[2*i]; /*Number */ txt = (TEXT_FIELD*)OSD_GetContainerNextObj(con); OSD_SetTextFieldStrPoint(txt,pstr); OSD_SetTextFieldContent(txt, STRING_NUMBER, i+1); pstr += 3; /*Mode */ txt = (TEXT_FIELD*)OSD_GetObjpNext(txt); strID = TimerModeStr_id[timer->timer_mode]; OSD_SetTextFieldContent(txt, STRING_ID,(UINT32)strID); /*Service */ txt = (TEXT_FIELD*)OSD_GetObjpNext(txt); if(timer->timer_mode!= TIMER_MODE_OFF) strID = TimerServiceStr_id[timer->timer_service]; else strID = 0; OSD_SetTextFieldContent(txt, STRING_ID,(UINT32)strID); /*Content */ strID = 0; txt = (TEXT_FIELD*)OSD_GetObjpNext(txt); if(timer->timer_mode!= TIMER_MODE_OFF) { if(timer->timer_service == TIMER_SERVICE_MESSAGE) { strID = WakeupMessageStr_id[timer->wakeup_message]; pstr = NULL; } else { if(get_prog_by_id(timer->wakeup_channel,&p_node) == DB_SUCCES) { if(p_node.ca_mode) ComAscStr2Uni("$", pstr); ComUniStrCopyChar((UINT8*)&pstr[p_node.ca_mode], p_node.service_name); } else { /* When the specified channel not exit, turn off the timer */ timer->timer_mode = TIMER_MODE_OFF; pstr = NULL; goto LOAD_ONE_TIMER; } } } else pstr = NULL; OSD_SetTextFieldStrPoint(txt,pstr); OSD_SetTextFieldContent(txt, STRING_ID,(UINT32)strID); pstr = display_strs[2*i + 1]; /*Date&Time*/ txt = (TEXT_FIELD*)OSD_GetObjpNext(txt); str[0] = '\0'; if(timer->timer_mode!= TIMER_MODE_OFF) sprintf(str,"%02d/%02d/%04d %02d:%02d", timer->wakeup_month,timer->wakeup_day,timer->wakeup_year, timer->wakeup_time/60,timer->wakeup_time%60); OSD_SetTextFieldStrPoint(txt,pstr); OSD_SetTextFieldContent(txt, STRING_ANSI,(UINT32)str); pstr += 20; /*Duration*/ txt = (TEXT_FIELD*)OSD_GetObjpNext(txt); str[0] = '\0'; if(timer->timer_mode!= TIMER_MODE_OFF && (timer->timer_service == TIMER_SERVICE_CHANNEL #ifdef DVR_PVR_SUPPORT || timer->timer_service == TIMER_SERVICE_DVR_RECORD #endif ) ) sprintf(str,"%02d:%02d",timer->wakeup_duration_time/60,timer->wakeup_duration_time%60); ComAscStr2Uni(str, pstr); OSD_SetTextFieldStrPoint(txt,pstr); OSD_SetTextFieldContent(txt, STRING_ANSI,(UINT32)str); } #if 0 sys_data_set_cur_chan_mode(cur_chan_mode); recreate_prog_view(VIEW_ALL | cur_chan_mode,0); #endif }
static void dm_disk_show_hint(UINT32 dev_type, UINT32 dev_id, UINT32 hint_type) { UINT8 i; UINT16 hint[128]={0}; char strUsb[128]; char strA[128]; char strCon[128]; char strUcon[128]; char strSd[128]; char strIde[128]; char strSata[128]; UINT8 back_saved; UINT16 *unistr=NULL; #ifdef SUPPORT_CAS9 if(get_mmi_showed()!=0)//mmi pri is high than this popup return; #endif #ifndef _SYSTEM_DVBC switch (dev_type) { case MNT_TYPE_USB: //sprintf(hint, "USB disk %c", dev_id+'A'); ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_USB_DISK),strUsb); ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_KEY_A),strA); sprintf(hint," %c ",dev_id); strcat(strUsb,hint); strcat(strUsb,strA); strcat(strUsb," "); STRCPY(hint,strUsb); break; case MNT_TYPE_SD: ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_SD_CARD),strSd); sprintf(hint, strSd); break; case MNT_TYPE_IDE: ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_IDE_DISK),strIde); sprintf(hint, strIde); break; case MNT_TYPE_SATA: ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_SATA_DISK),strSata); sprintf(hint, strSata); break; default: return; } switch (hint_type) { case DM_HINT_CONNECT: ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_CONNECTED),strCon); strcat(hint,strCon); break; case DM_HINT_DISCONNECT: ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_DISCONNECTED),strUcon); strcat(hint,strUcon); break; default: return; } DM_DEBUG("%s() show message: %s\n", __FUNCTION__, hint); win_compopup_init(WIN_POPUP_TYPE_SMSG); win_compopup_set_msg_ext(hint, NULL, 0); #else if(hint_type==DM_HINT_CONNECT) { if(dev_type==MNT_TYPE_USB) { unistr=OSD_GetUnicodeString(RS_USB_DISK_CONNECTED); ComUniStrCopyChar(&hint,(UINT16 *)unistr); } else if(dev_type==MNT_TYPE_SD) { unistr=OSD_GetUnicodeString(RS_SD_CARD_CONNECTED); ComUniStrCopyChar(&hint,(UINT16 *)unistr); } else if(dev_type==MNT_TYPE_IDE) { unistr=OSD_GetUnicodeString(RS_IDE_DISK_CONNECTED); ComUniStrCopyChar(&hint,(UINT16 *)unistr); } else if(dev_type==MNT_TYPE_SATA) { unistr=OSD_GetUnicodeString(RS_SATA_DISK_CONNECTED); ComUniStrCopyChar(&hint,(UINT16 *)unistr); } } else if(hint_type==DM_HINT_DISCONNECT) { if(dev_type==MNT_TYPE_USB) { unistr=OSD_GetUnicodeString(RS_USB_DISK_DISCONNECTED); ComUniStrCopyChar(&hint,(UINT16 *)unistr); } else if(dev_type==MNT_TYPE_SD) { unistr=OSD_GetUnicodeString(RS_SD_CARD_DISCONNECTED); ComUniStrCopyChar(&hint,(UINT16 *)unistr); } else if(dev_type==MNT_TYPE_IDE) { unistr=OSD_GetUnicodeString(RS_IDE_DISK_DISCONNECTED); ComUniStrCopyChar(&hint,(UINT16 *)unistr); } else if(dev_type==MNT_TYPE_SATA) { unistr=OSD_GetUnicodeString(RS_SATA_DISK_DISCONNECTED); ComUniStrCopyChar(&hint,(UINT16 *)unistr); } } DM_DEBUG("%s() show message: %s\n", __FUNCTION__, hint); win_compopup_init(WIN_POPUP_TYPE_SMSG); win_compopup_set_msg_ext(NULL,hint, 0); #endif #ifdef SUPPORT_CAS9 win_compopup_set_frame(290, 250, 448, 100); #endif win_compopup_open_ext(&back_saved); osal_task_sleep(1000); win_compopup_smsg_restoreback(); }
void win_lan_set_menu_lan_string(UINT8 input) { UINT16 str[50]; ComUniStrCopyChar( (UINT8 *)str, osd_lang_strs[input]); OSD_SetTextFieldContent(&lan_item_txtset1, STRING_UNICODE,(UINT32)str); }
static void win_rs232upg_load_chunk_info() { CHUNK_HEADER blk_header; UINT32 id,mask; UINT8 chunk_number; UINT8 i; char strTmp[30]; char strTmp1[30]; char strTmp2[30]; char strTmp3[30]; char strTmp4[30]; char strTmp5[30]; char strTmp6[30]; char strTmp7[30]; char strTmp8[30]; #if (defined HDCP_IN_FLASH ||defined DIVX_CERT_ENABLE) UINT32 Block_id = 0, HDCP_key_ID = 0,divx_key_ID = 0,ciplus_key_ID = 0; UINT8 hdcp_chunk_index = 0; UINT8 cipluskey_chunk_index = 0; BOOL has_hdcp_chunk = FALSE; BOOL has_cipluskey_chunk = FALSE; UINT8 divx_chunk_index = 0; BOOL has_divx_chunk = FALSE; UINT32 special_type =0; #endif //-a by wangyang del seecode upgrade {{ UINT32 seecode_key_ID = 0; UINT8 seecode_chunk_index = 0; BOOL has_seecodekey_chunk = FALSE; //-a by wangyang del seecode upgrade }} chunk_number = sto_chunk_count(0,0); if(chunk_number == 0) return; if(InitBlockList() != SUCCESS) return; if(rs232upg_upgtype_chars != NULL) FREE(rs232upg_upgtype_chars); rs232upg_upgtype_chars = (UINT16**)MALLOC(sizeof(UINT16*)*chunk_number); if(rs232upg_upgtype_chars == NULL) ASSERT(0); for(i=0; i<chunk_number; i++) { rs232upg_upgtype_chars[i] = (UINT16*)MALLOC(16*sizeof(UINT16)); if(rs232upg_upgtype_chars[i] == NULL) ASSERT(0); } // STRCPY(rs232upg_upgtype_chars[0],"allcode"); { UINT16 *unistr=NULL; unistr=OSD_GetUnicodeString(RS_TOTAL_FLASH); ComUniStrCopyChar(rs232upg_upgtype_chars[0],(UINT16 *)unistr); //ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_TOTAL_FLASH),strTmp); //STRCPY(rs232upg_upgtype_chars[0],strTmp); } for(i=1; i<chunk_number; i++) { id = mask = 0; sto_chunk_goto(&id,mask,i + 1); sto_get_chunk_header(id, &blk_header); #if (defined HDCP_IN_FLASH ||defined DIVX_CERT_ENABLE || defined CI_PLUS_SUPPORT ) special_type = 0; #ifdef HDCP_IN_FLASH HDCP_key_ID = HDCPKEY_CHUNK_ID; if(((UINT32)blk_header.id) == HDCP_key_ID) { hdcp_chunk_index = i; has_hdcp_chunk = TRUE; special_type = 1; } #endif #ifdef DIVX_CERT_ENABLE divx_key_ID = DIVX_CHUCK_ID; if(((UINT32)blk_header.id) == divx_key_ID) { divx_chunk_index = i; has_divx_chunk = TRUE; special_type = 1; } #endif #ifdef CI_PLUS_SUPPORT ciplus_key_ID = CIPLUSKEY_CHUNK_ID; if(((UINT32)blk_header.id) == ciplus_key_ID) { cipluskey_chunk_index = i; has_cipluskey_chunk = TRUE; special_type = 1; } #endif //-a by wangyang del seecode upgrade {{ seecode_key_ID =SEECODE_CHUNK_ID if(((UINT32)blk_header.id) == ciplus_key_ID) { seecode_chunk_index = i; has_seecodekey_chunk = TRUE; special_type = 1; } //-a by wangyang del seecode upgrade }} if(special_type != 1) { STRCPY(rs232upg_upgtype_chars[i], blk_header.name); //-a by wangyang del seecode upgrade {{ if(i==1) { ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_FIRMWARE),strTmp1); STRCPY(rs232upg_upgtype_chars[i], strTmp1); } else if (i == 2) { ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_SEECODE),strTmp2); STRCPY(rs232upg_upgtype_chars[i],strTmp2); } else if (i == 3) { ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_LOGO),strTmp3); STRCPY(rs232upg_upgtype_chars[i], strTmp3); } else if (i == 4) { ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_CCCAM_PRIO),strTmp4); STRCPY(rs232upg_upgtype_chars[i], strTmp4); } else if (i == 5) { ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_CCCAM_NEWCAM),strTmp5); STRCPY(rs232upg_upgtype_chars[i], strTmp5); } else if (i == 6) { ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_DEFAULT_DATA),strTmp6); STRCPY(rs232upg_upgtype_chars[i], strTmp6); } else if (i == 7) { ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_USER_DATA),strTmp7); STRCPY(rs232upg_upgtype_chars[i], strTmp7); } //-a by wangyang del seecode upgrade }} } #else STRCPY(rs232upg_upgtype_chars[i],blk_header.name); //-a by wangyang del seecode upgrade {{ seecode_key_ID =SEECODE_CHUNK_ID; if(((UINT32)blk_header.id) == seecode_key_ID) { seecode_chunk_index = i; has_seecodekey_chunk = TRUE; //special_type = 1; } if(i==1) { UINT16 *unistr=NULL; unistr=OSD_GetUnicodeString(RS_FIRMWARE); ComUniStrCopyChar(rs232upg_upgtype_chars[1],(UINT16 *)unistr); //ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_FIRMWARE),strTmp1); //STRCPY(rs232upg_upgtype_chars[1], strTmp1); } else if (i == 2) { // ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_SEECODE),strTmp2); // STRCPY(rs232upg_upgtype_chars[i], strTmp2); } else if (i == 3) { // ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_LOGO),strTmp3); // STRCPY(rs232upg_upgtype_chars[i],strTmp3); } else if (i == 4) { // ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_CCCAM_PRIO),strTmp4); // STRCPY(rs232upg_upgtype_chars[i], strTmp4); } else if (i == 5) { // ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_CCCAM_NEWCAM),strTmp5); // STRCPY(rs232upg_upgtype_chars[i], strTmp5); } else if (i == 6) { // ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_DEFAULT_DATA),strTmp6); // STRCPY(rs232upg_upgtype_chars[i], strTmp6); } else if (i == 9) { // ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_USER_DATA),strTmp7); // STRCPY(rs232upg_upgtype_chars[2],strTmp7); } //-a by wangyang del seecode upgrade }} #endif } //-a by wangyang del seecode upgrade {{ if(has_seecodekey_chunk == TRUE) { FREE(rs232upg_upgtype_chars[seecode_chunk_index]); for(i=seecode_chunk_index; i<chunk_number;i++) rs232upg_upgtype_chars[i] = rs232upg_upgtype_chars[i+1]; chunk_number--; #ifdef HDCP_IN_FLASH if( (has_seecodekey_chunk == TRUE) && seecode_chunk_index < hdcp_chunk_index) hdcp_chunk_index --; if( (has_divx_chunk == TRUE) && seecode_chunk_index < cipluskey_chunk_index) cipluskey_chunk_index --; if( (has_divx_chunk == TRUE) && seecode_chunk_index < divx_chunk_index) divx_chunk_index --; #endif } //-a by wangyang del seecode upgrade }} #ifdef HDCP_IN_FLASH if(has_hdcp_chunk == TRUE) { FREE(rs232upg_upgtype_chars[hdcp_chunk_index]); for(i=hdcp_chunk_index; i<chunk_number;i++) rs232upg_upgtype_chars[i] = rs232upg_upgtype_chars[i+1]; chunk_number--; if( (has_cipluskey_chunk == TRUE) && hdcp_chunk_index < cipluskey_chunk_index) cipluskey_chunk_index --; if( (has_divx_chunk == TRUE) && hdcp_chunk_index < divx_chunk_index) divx_chunk_index --; } #endif #ifdef DIVX_CERT_ENABLE if(has_divx_chunk == TRUE) { FREE(rs232upg_upgtype_chars[divx_chunk_index]); for(i=divx_chunk_index; i<chunk_number;i++) rs232upg_upgtype_chars[i] = rs232upg_upgtype_chars[i+1]; chunk_number--; if( (has_cipluskey_chunk == TRUE) && divx_chunk_index < cipluskey_chunk_index) cipluskey_chunk_index --; } #endif #ifdef CI_PLUS_SUPPORT if(has_cipluskey_chunk == TRUE) { FREE(rs232upg_upgtype_chars[cipluskey_chunk_index]); for(i=cipluskey_chunk_index; i<chunk_number;i++) rs232upg_upgtype_chars[i] = rs232upg_upgtype_chars[i+1]; chunk_number--; } #endif #if (defined HDCP_IN_FLASH ||defined DIVX_CERT_ENABLE || defined CI_PLUS_SUPPORT ) OSD_SetMultiselSelTable(&rs232upg_sel_upgrade_type,rs232upg_upgtype_chars); OSD_SetMultiselCount(&rs232upg_sel_upgrade_type, chunk_number); #else OSD_SetMultiselSelTable(&rs232upg_sel_upgrade_type,rs232upg_upgtype_chars); OSD_SetMultiselCount(&rs232upg_sel_upgrade_type, 2); #endif }
static PRESULT favgrplst_list_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; VACTION unact; UINT16 uni_name[30]; UINT8* new_name; OBJLIST* ol; UINT16 curitem; SYSTEM_DATA* sys_data = sys_data_get(); ol = &favgrplist_olist; curitem = OSD_GetObjListNewPoint(ol); switch(event) { case EVN_PRE_DRAW: { POBJECT_HEAD focusObj=OSD_GetFocusObject(pObj); win_favgrplst_set_display(); #if ((!defined(OSD_15))&&(!defined(OSD_12))) #ifdef PREVIEW_SUBMENU if(preview_menu) { preview_menu=0; OSD_SetWholeObjStyleHL(focusObj,CON_SH_IDX,TXTN_SH_IDX,0,0); } else { OSD_SetWholeObjStyleHL(focusObj,CON_SH_IDX,TXTN_HL_IDX,0,0); } #endif #endif }break; case EVN_UNKNOWN_ACTION: unact = (VACTION)(param1>>16); if(unact== VACT_FAV_EDIT) { //ComAscStr2Uni(sys_data->favgrp_names[curitem], uni_name); MEMCPY(uni_name,(UINT16*)sys_data->favgrp_names[curitem],(FAV_GRP_NAME_LEN + 1)); #ifndef KEYBOARD_SUPPORT if(win_rename_open(uni_name,&new_name,favgrp_check_input_name)) #else #if (defined(GZ1105002)||defined(GZ1105003)||defined(GZ1105004)||defined(GZ1105005)||defined(GZ1105006)) if(win_rename_open(uni_name,&new_name,favgrp_check_input_name)) #else if(win_keyboard_rename_open(uni_name,&new_name,favgrp_check_input_name)) #endif #endif { //ComUniStrToAsc(new_name,sys_data->favgrp_names[curitem]); ComUniStrCopyChar(sys_data->favgrp_names[curitem],new_name); } OSD_TrackObject((POBJECT_HEAD)&g_win_favgrplst, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); // wincom_open_title(pObj,RS_FAVORITE,0); wincom_open_subtitle(pObj,RS_FAVORITE,0); } break; } return ret; }
static void newcamd_draw_progname(BOOL update) { UINT8 av_mode,j; UINT16 cur_channel,strlen; P_NODE p_node; UINT32 ret; char prog_name[50]; char string[100]; UINT16 uni_string[100]; av_mode = sys_data_get_cur_chan_mode(); if( sys_data_get_group_num() == 0 ) { sys_data_set_cur_chan_mode(av_mode==TV_CHAN? RADIO_CHAN : TV_CHAN); if( sys_data_get_group_num() == 0 ) { sys_data_set_cur_chan_mode(av_mode); ComUniStrCopyChar((UINT8 *)uni_string, OSD_GetUnicodeString(RS_MSG_NO_CHANNELS)); goto set_progname; } } cur_channel = sys_data_get_cur_group_cur_mode_channel(); ret = get_prog_at(cur_channel,&p_node); #ifndef DB_USE_UNICODE_STRING MEMSET(prog_name,0,sizeof(prog_name)); STRCPY(prog_name,p_node.service_name); for(j=0;j<STRLEN(prog_name);j++) { if(prog_name[j] >= 0x80) { prog_name[j] = '\0'; break; } } if(p_node.ca_mode==0) sprintf(string,"%d.%s",cur_channel+1,prog_name); else sprintf(string,"$%d.%s",cur_channel+1,prog_name); ComAscStr2Uni(string, (UINT16 *)uni_string) #else if(p_node.ca_mode==0) sprintf(string,"%d.",cur_channel+1); else sprintf(string,"$%d.",cur_channel+1); ComAscStr2Uni(string,uni_string); strlen = ComUniStrLen( uni_string); ComUniStrCopyChar( (UINT8 *)&uni_string[strlen],p_node.service_name); strlen = ComUniStrLen( uni_string); #endif set_progname: OSD_SetTextFieldContent(&newcamd_txt_chn, STRING_UNICODE, (UINT32)uni_string); if(update) { OSD_DrawObject((POBJECT_HEAD)&newcamd_txt_chn,C_DRAW_SIGN_EVN_FLG |C_UPDATE_ALL); } }
UINT8 win_news_edit_menu_open(UINT8 mode, NEWS_ADDR_T *news_addr) { CONTAINER *win; PRESULT ret = PROC_LOOP; UINT32 hkey; TEXT_FIELD *txt; EDIT_FIELD *eft; UINT16 strID; UINT32 value = 0; UINT16 *unistr=NULL; BOOL old_value = ap_enable_key_task_get_key(TRUE); news_addr_edit_mode = mode; bNewsAddrEditOK = FALSE; txt = &txt_news_edit_title; if(mode == 0) strID = RS_HELP_EDIT; else strID = RS_HELP_ADD; OSD_SetTextFieldContent(txt, STRING_ID,(UINT32)strID); eft = &edt_news_edit_item1; OSD_SetEditFieldContent(eft, STRING_UNICODE, news_addr->news_addr_name); eft = &edt_news_edit_item2; OSD_SetEditFieldContent(eft, STRING_ANSI, news_addr->news_addr_url); win = &g_win_news_edit; OSD_SetContainerFocus(win, 1); #if 1 unistr = OSD_GetUnicodeString(btn_txt_strs[0]); OSD_SetTextFieldContent(&txt_news_edit_caps,STRING_UNICODE,(UINT32)unistr); unistr = OSD_GetUnicodeString(btn_txt_strs[1]); OSD_SetTextFieldContent(&txt_news_edit_del,STRING_UNICODE,(UINT32)unistr); unistr = OSD_GetUnicodeString(btn_txt_strs[2]); OSD_SetTextFieldContent(&txt_news_edit_ok,STRING_UNICODE,(UINT32)unistr); unistr = OSD_GetUnicodeString(btn_txt_strs[3]); OSD_SetTextFieldContent(&txt_news_edit_cancel,STRING_UNICODE,(UINT32)unistr); #endif 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 (bNewsAddrEditOK) { eft = &edt_news_edit_item1; value = OSD_GetEditFieldContent(eft); //ComUniStrToAsc((UINT8 *)value, news_addr->news_addr_name); ComUniStrCopyChar(news_addr->news_addr_name,(UINT8 *)value); eft = &edt_news_edit_item2; value = OSD_GetEditFieldContent(eft); ComUniStrToAsc((UINT8 *)value, news_addr->news_addr_url); } wincom_restore_region(); ap_enable_key_task_get_key(old_value); return bNewsAddrEditOK; }
static void win_search_program_append(UINT32 tp_idx, UINT16 prog_idx) { UINT32 si,i,j,n,cnt,str_len; UINT16* pstr; OSD_RECT rect; UINT8 shidx; char str[30]; DBG_PRINTF("Enter %s....\n",__FUNCTION__); if(prog_idx != INVALID_ID) { P_NODE p_node; get_prog_at(prog_idx, &p_node); MEMCPY(&win_search_cur_prog[p_node.av_flag], &p_node, sizeof(p_node)); srch_ch_cnt[p_node.av_flag] ++; cnt = srch_ch_cnt[p_node.av_flag]; if(cnt <= INFOR_CHAN_CNT) { si = 0; n = cnt; } else { si = cnt - INFOR_CHAN_CNT; n = INFOR_CHAN_CNT; } if(si != 0) { for(i=0;i<n - 1;i++) MEMCPY(display_strs[10 + p_node.av_flag*10 + i], display_strs[10 + p_node.av_flag*10 + i + 1], MAX_DISP_STR_LEN*2); } pstr = display_strs[10 + p_node.av_flag*10 + n - 1]; if(p_node.ca_mode) ComAscStr2Uni("$", pstr); else ComAscStr2Uni("", pstr); str_len = ComUniStrLen(pstr); ComUniStrCopyChar((UINT8*)&pstr[str_len] ,p_node.service_name); if(p_node.av_flag == PROG_TV_MODE) { rect.uLeft = TVB_L + 20;//INFO_TV_L; rect.uTop = TVB_T + INFO_TXT_H;//INFO_TV_T+4; rect.uWidth = INFO_TV_W; rect.uHeight= INFO_TXT_H; shidx = TV_TXT_SH_IDX; } else { rect.uLeft = RADIOB_L + 20;//INFO_RADIO_L; rect.uTop = RADIOB_T + INFO_TXT_H;//INFO_RADIO_T+4; rect.uWidth = INFO_TV_W;//INFO_RADIO_W; rect.uHeight= INFO_TXT_H; shidx = RADIO_TXT_SH_IDX; } for(i=0;i<n;i++) { pstr = display_strs[10 + p_node.av_flag*10 + i]; //win_srch_draw_info(&rect, NULL,pstr, shidx); win_srch_draw_info_ex(&rect, NULL,pstr, INFOMATION_TXT_IDX); rect.uTop += rect.uHeight; } rect.uTop = TVB_T+3; rect.uLeft += (rect.uWidth-80); rect.uWidth = 80; rect.uHeight = TXT_H; sprintf(str,"%d",cnt); win_srch_draw_info(&rect, str,NULL, shidx); tp_chsrched = 1; } if(tp_idx != 0xFFFFFFFF) { T_NODE t_node; S_NODE s_node; get_tp_by_id(tp_idx, &t_node); //get_sat_at(cur_sat_pos, VIEW_ALL,&s_node); get_sat_by_id(cur_sat_id, &s_node); srch_tp_cnt ++; cnt = srch_tp_cnt; if(cnt <= INFOR_TP_CNT) { si = 0; n = cnt; } else { si = cnt - INFOR_TP_CNT; n = INFOR_TP_CNT; } if(si != 0) { for(i=0;i<n - 1;i++) { MEMCPY(display_strs[ 30 + i], display_strs[30 + i + 1], MAX_DISP_STR_LEN*2); } } if(n>1) { pstr = display_strs[ 30 + n - 2]; #if 0 str_len = ComUniStrLen(pstr); #else str_len = tp_info_chw_tbl[0] + tp_info_chw_tbl[1] + tp_info_chw_tbl[2] + tp_info_chw_tbl[3] + tp_info_chw_tbl[4]; #endif if(tp_chsrched) ComAscStr2Uni("OK", &pstr[str_len]); else ComAscStr2Uni("Failed", &pstr[str_len]); } pstr = display_strs[30 + n - 1]; sprintf(str,"%d",srch_tp_cnt); ComAscStr2Uni(str,&pstr[0]); #if 0 str_len = ComUniStrLen(pstr); str_len = tp_info_chw_tbl[0]; ComUniStrCopyChar(&pstr[str_len], s_node.sat_name); str_len = ComUniStrLen(pstr); sprintf(str," %d %c %d ... ",t_node.frq,(t_node.pol == 0)? 'H' : 'V',t_node.sym); ComAscStr2Uni(str,&pstr[str_len]); #else str_len = tp_info_chw_tbl[0]; ComUniStrCopyChar((UINT8*)&pstr[str_len], s_node.sat_name); str_len += tp_info_chw_tbl[1]; sprintf(str,"%d",t_node.frq); ComAscStr2Uni(str,&pstr[str_len]); str_len += tp_info_chw_tbl[2]; sprintf(str,"%c",(t_node.pol == 0)? 'H' : 'V'); ComAscStr2Uni(str,&pstr[str_len]); str_len += tp_info_chw_tbl[3]; sprintf(str,"%d",t_node.sym); ComAscStr2Uni(str,&pstr[str_len]); str_len += tp_info_chw_tbl[4]; STRCPY(str,""); ComAscStr2Uni(str,&pstr[str_len]); #endif tp_chsrched = 0; rect.uLeft = INFO_TP_L; rect.uTop = INFO_TP_T; rect.uWidth = INFO_TP_W; rect.uHeight= INFO_TXT_H; shidx = TP_TXT_SH_IDX; for(i=0;i<n;i++) { pstr = display_strs[30 + i]; #if 0 win_srch_draw_info(&rect, NULL,pstr, shidx); #else rect.uLeft = INFO_TP_L; str_len = 0; pstr = display_strs[30 + i]; for(j=0;j<7;j++) { rect.uWidth = tp_info_w_tbl[j] - 2; if(j != 5) win_srch_draw_info(&rect, NULL,pstr, shidx); else win_srch_draw_info(&rect, "...",NULL, shidx); rect.uLeft += tp_info_w_tbl[j] ; if(j < 5) { pstr += tp_info_chw_tbl[j]; //pstr += str_len; } } #endif rect.uTop += rect.uHeight; } } DBG_PRINTF("Exit %s....\n",__FUNCTION__); }
static UINT8 win_satsrch_set_scroll_drawselectsats(UINT8 start_sat_idx) { struct OSDRect rect; UINT16 i,sat_cnt,num; UINT16 col,row; TEXT_FIELD* txt = &satsrch_multisats_name; S_NODE s_node; UINT16 top; UINT16 str[50]; UINT16 nStrLen; UINT8 disp_total_row,adjust_row,start_disp_id; UINT8 next_start_idx=start_sat_idx+2; if(single_multi_srch_flag == 0) return; MEMSET(sat_ids,0,sizeof(sat_ids)/sizeof(sat_ids[0])); sat_cnt = num = get_tuner_sat_cnt(TUNER_EITHER_SELECT);//get_selected_sat_num(); if(num > SELSAT_ROW_CNT *2) num = SELSAT_ROW_CNT *2; txt->pString = display_strs[0]; for(i=0; i<sat_cnt; i++) { get_tuner_sat(TUNER_EITHER_SELECT,i,&s_node); sat_ids[i] = s_node.sat_id; } if(start_sat_idx>=(sat_cnt+SELSAT_ROW_CNT*2-2)) next_start_idx=0; start_disp_id=0; if(start_sat_idx==0) { disp_total_row=1; adjust_row=5; } else if(start_sat_idx==2) { disp_total_row=2; adjust_row=4; } else if(start_sat_idx==4) { disp_total_row=3; adjust_row=3; } else if(start_sat_idx==6) { disp_total_row=4; adjust_row=2; } else { disp_total_row=SELSAT_ROW_CNT; adjust_row=1; if(start_sat_idx>=(SELSAT_ROW_CNT*2)) start_disp_id=start_sat_idx-(SELSAT_ROW_CNT*2)+2; } /*if(start_sat_idx==0) { struct OSDRect r; r.uLeft=SELSAT_L0;//txt.head.frame.uLeft;//200; r.uTop=SELSAT_T-40;//txt.head.frame.uTop;//300; r.uWidth=SELSAT_W*2+40;//txt.head.frame.uWidth;//100; r.uHeight=SELSAT_H*5-30;//txt.head.frame.uHeight;//45; OSD_DrawFrame(&r,RGB24_RGB1555(173,173,173),NULL); }*/ for(i=/*0*//*start_sat_idx*/start_disp_id; i<(/*SELSAT_ROW_CNT*/disp_total_row*2+start_disp_id); i++) { row = (i-start_disp_id)/2+adjust_row; top = SELSAT_T + row * 30/*SELSAT_H*/-40; if(i%2 == 0) OSD_SetRect(&txt->head.frame, SELSAT_L0, top, SELSAT_W, SELSAT_H-6); else OSD_SetRect(&txt->head.frame, SELSAT_L1, top, SELSAT_W, SELSAT_H-6); get_tuner_sat(TUNER_EITHER_SELECT,i,&s_node); if(i<sat_cnt) { if(s_node.DiSEqC_type !=6) ComUniStrCopyChar((UINT8*)txt->pString, s_node.sat_name); } else { ComAscStr2Uni("", txt->pString); //next_start_idx=0; } OSD_DrawObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); //if(adjust_row && (i%2==1)) // adjust_row-=2; } if(num == 0) { txt->pString = NULL; top = SELSAT_T + 2 * SELSAT_H+40; OSD_SetRect(&txt->head.frame, SELSAT_L0 + SELSAT_W/2, top, SELSAT_W, SELSAT_H-6); OSD_SetTextFieldContent(txt, STRING_ID , RS_DISPLAY_NO_SATELLITE/*RS_NO_SATELLITE_SELECT*/); OSD_DrawObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); } return next_start_idx; }
static PRESULT timerset_mselinfo_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT32 sel; VACTION unact; P_NODE p_node; UINT16* Uni_str; TIMER_SET_CONTENT* settimer; COM_POP_LIST_PARAM_T param; OSD_RECT rect; settimer = &timer_set; switch(event) { case EVN_PRE_CHANGE: sel = *((UINT32*)param1); break; case EVN_POST_CHANGE: sel = param1; break; case EVN_UNKNOWN_ACTION: unact = (VACTION)(param1>>16); if(unact == VACT_ENTER) // select channel { OSD_SetRect2(&rect,&pObj->frame); rect.uTop -= 80; rect.uLeft -= 40; rect.uWidth += 40; rect.uHeight = 300; param.selecttype = POP_LIST_SINGLESELECT; param.cur = TIMER_SERVICE_INFO; sel = win_com_open_sub_list(POP_LIST_TYPE_CHANLIST,&rect,¶m); if(sel < (UINT32)TIMER_SERVICE_INFO_CNT) { get_prog_at(sel,&p_node); settimer->wakeup_channel = p_node.prog_id; TIMER_SERVICE_INFO = sel; } OSD_TrackObject( (POBJECT_HEAD )&timer_con_serviceinfo, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); } break; case EVN_REQUEST_STRING: sel = param1; Uni_str= (UINT16*)param2; get_prog_at(sel,&p_node); if(p_node.ca_mode) ComAscStr2Uni("$", Uni_str); ComUniStrCopyChar((UINT8*)&Uni_str[p_node.ca_mode], p_node.service_name); if((TIMER_MODE == TIMER_MODE_OFF) || (TIMER_SERVICE_TYPE != TIMER_SERVICE_DVR_RECORD) || (p_node.ca_mode == 1)) { set_container_active(&timer_con_rec_type, C_ATTR_INACTIVE); settimer->wakeup_message = 0; } else if((TIMER_SERVICE_TYPE == TIMER_SERVICE_DVR_RECORD) && (!pvr_info.hdd_valid)) //guop add set_container_active(&timer_con_rec_type, C_ATTR_INACTIVE); else { set_container_active(&timer_con_rec_type, C_ATTR_ACTIVE); if(settimer->wakeup_message > 2) settimer->wakeup_message = 0; } OSD_SetMultiselSel(&timer_msel_rec_type, settimer->wakeup_message); OSD_DrawObject((POBJECT_HEAD)&timer_con_rec_type, C_UPDATE_ALL); break; } return ret; }
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; 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)); #ifndef KEYBOARD_SUPPORT 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 { // ComUniStrToAsc(new_name,p_sys_data->map_city_name[curitem]); ComUniStrCopyChar(p_sys_data->map_city_name[curitem], new_name); } 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); win_compopup_set_msg(NULL,NULL,RS_LIST_IS_FULL); win_compopup_open_ext(&back_saved); break; } memset(uni_name, 0x0, sizeof(uni_name)); #ifndef KEYBOARD_SUPPORT 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 { // 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(); 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; map_download(p_sys_data->map_city_name[curitem], 14); bMapDownloading = TRUE; win_compopup_init(WIN_POPUP_TYPE_SMSG); win_compopup_set_msg(NULL,NULL,RS_CONNECTING_WAIT); win_compopup_open_ext(&back_saved); break; case VACT_MAP_SEARCH: memset(search_string, 0x0, sizeof(search_string)); if (win_map_search_input_menu_open(search_string)) { map_download(search_string, 14); bMapDownloading = FALSE; win_compopup_init(WIN_POPUP_TYPE_SMSG); win_compopup_set_msg(NULL,NULL,RS_CONNECTING_WAIT); win_compopup_open_ext(&back_saved); } break; default: break; } return ret; }
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 void win_satsrch_set_drawselectsats(void) { // FIXED_PRINTF("win_satsrch_set_drawselectsats : sky.bi \n"); struct OSDRect rect; UINT16 i,sat_cnt,num; UINT16 col,row; TEXT_FIELD* txt = &satsrch_multisats_name; S_NODE s_node; UINT16 top; UINT16 str[50]; UINT16 nStrLen; if(single_multi_srch_flag == 0) return; MEMSET(sat_ids,0,sizeof(sat_ids)/sizeof(sat_ids[0])); sat_cnt = num = get_tuner_sat_cnt(TUNER_EITHER_SELECT);//get_selected_sat_num(); if(num > SELSAT_ROW_CNT *2) num = SELSAT_ROW_CNT *2; txt->pString = display_strs[0]; // FIXED_PRINTF("sat_cnt :%d\n",sat_cnt); for(i=0;i<sat_cnt;i++) { get_tuner_sat(TUNER_EITHER_SELECT,i,&s_node); sat_ids[i] = s_node.sat_id; } for(i=0;i<SELSAT_ROW_CNT*3;i++) /*2 for 3 20110117 sky.bi*/ { row = i/3; top = SELSAT_T + row * SELSAT_H+40; if(i%3 == 0) { OSD_SetRect(&txt->head.frame, SELSAT_L0, top, SAT_NAME_STRING_LENGTH, SELSAT_H-6); // OSD_SetRect(&txt->head.frame, SELSAT_L0, top, SELSAT_W, SELSAT_H-6); } else { OSD_SetRect(&txt->head.frame, SELSAT_L0 + (SAT_NAME_STRING_LENGTH) * (i%3), top, SAT_NAME_STRING_LENGTH, SELSAT_H-6); // OSD_SetRect(&txt->head.frame, SELSAT_L1, top, SELSAT_W, SELSAT_H-6); } get_tuner_sat(TUNER_EITHER_SELECT,i,&s_node); if(i<sat_cnt) { if(s_node.DiSEqC_type !=6) { ComUniStrCopyChar((UINT8*)txt->pString, s_node.sat_name); } } else { ComAscStr2Uni("", txt->pString); } if ((sat_cnt > SELSAT_ROW_CNT*3) &&(i == 5) ) { ComAscStr2Uni("...", txt->pString); } OSD_DrawObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); } if(num == 0) { txt->pString = NULL; top = SELSAT_T + 2 * SELSAT_H+40; OSD_SetRect(&txt->head.frame, SELSAT_L0 + SELSAT_W/2, top, SELSAT_W, SELSAT_H-6); OSD_SetTextFieldContent(txt, STRING_ID , RS_DISPLAY_NO_SATELLITE/*RS_NO_SATELLITE_SELECT*/); OSD_DrawObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); } }