static void slideidx_display(BOOL refresh) { char str_buffer[20]; TEXT_FIELD *pTxt = &imageslide_idx; UINT32 image_total_num; get_play_list_info(cur_playlist_image,&image_total_num, NULL); sprintf(str_buffer,"%d/%d",cur_image_idx,image_total_num); OSD_SetTextFieldContent(pTxt,STRING_ANSI,(UINT32)str_buffer); if(refresh) OSD_DrawObject((POBJECT_HEAD)pTxt,C_UPDATE_ALL); }
static void win_satsrch_set_nitactive(BOOL update) { UINT8 action; #ifdef ORDER_GZ1011001 action = (SATSRCH_MODE_IDX == 1)? C_ATTR_INACTIVE : C_ATTR_ACTIVE; #else action = (SATSRCH_MODE_IDX == IDX_SCAN_MODE_AUTO_SCAN)? C_ATTR_INACTIVE : C_ATTR_ACTIVE; #endif set_container_active(&satsrch_item4, action); if(update) OSD_DrawObject( (POBJECT_HEAD)&satsrch_item4, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); }
void win_timerset_set_currenttime(BOOL update) { TEXT_FIELD *txt; char str[30]; date_time dt; get_local_time(&dt); txt = &timer_cur_datetime; sprintf(str, "%d:%02d %04d-%02d-%02d", dt.hour, dt.min, dt.year, dt.month, dt.day); OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str); if (update) OSD_DrawObject((POBJECT_HEAD)txt, C_UPDATE_ALL); }
static PRESULT otaset_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT32 sat_cnt; POBJECT_HEAD submenu; switch(event) { case EVN_PRE_OPEN: ota_presat_id = 0xFFFF; //wincom_open_title(pObj,RS_UPGRADE_MODE_SAT, 0); wincom_open_subtitle(pObj,RS_TOOLS_SW_UPGRADE_BY_OTA, 0); #ifdef _BUILD_OTA_E_ ota_load_parameter(); #else win_otaset_load_default_setting(0); #endif win_otaset_load_FreqSymbPid_display(); break; case EVN_POST_DRAW: //win_signal_open(pObj); win_signal_open_ex(pObj,pObj->frame.uLeft+30,pObj->frame.uTop + LIST_ITEMCNT*(CON_H + CON_GAP) +20); win_otaset_turn_frntend(); wincom_open_commen_help(pObj); //win_signal_refresh(); //win_signal_update(); break; case EVN_PRE_CLOSE: /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: wincom_close_subtitle(); OSD_ClearScreen(); if((sys_data_get_sate_group_num(sys_data_get_cur_chan_mode())==0)) OSD_DrawObject((POBJECT_HEAD)&g_win_mainmenu,C_UPDATE_ALL); win_open_submenu_title(submenu,sub_menu_desc->title_id, 0); //guop break; case EVN_MSG_GOT: if(param1 == CTRL_MSG_SUBTYPE_STATUS_SIGNAL) win_signal_refresh(); //win_signal_update(); break; } return ret; }
static void win_pvod_download() { UINT16 i; BOOL bFinished=FALSE; #if 0 OSD_SetAttr(&pvod_item_con1, C_ATTR_INACTIVE); OSD_DrawObject( (POBJECT_HEAD)&pvod_item_con1, C_UPDATE_ALL); OSD_SetAttr(&pvod_item_con2, C_ATTR_INACTIVE); OSD_DrawObject( (POBJECT_HEAD)&pvod_item_con1, C_UPDATE_ALL); OSD_SetAttr(&pvod_item_con3, C_ATTR_INACTIVE); OSD_DrawObject( (POBJECT_HEAD)&pvod_item_con1, C_UPDATE_ALL); OSD_SetAttr(&pvod_item_con4, C_ATTR_INACTIVE); OSD_DrawObject( (POBJECT_HEAD)&pvod_item_con1, C_UPDATE_ALL); OSD_SetProgressBarPos(&pvod_bar_progress,(INT16)0); OSD_SetTextFieldContent(&pvod_txt_progress, STRING_NUM_PERCENT, (UINT32)0); #endif //download data /* for(i=0;i<5;i++) { osal_delay(300); win_pvod_process_update(20*(i+1)); } */ //download finished // bFinished = TRUE; // SendMsgtoThread(0x01,0x00,0x00);/**Pvod_Programschedule_Query*/ //检查USB连接???? //启动pushvod SendMsgtoThread(Pvod_START_PAT,0,0); }
static void win_mpegYT_player_draw(BOOL bShow) { POBJECT_HEAD pObj = (POBJECT_HEAD) & g_win_mpegYT_player; if (bShow) { m_HideWindow = FALSE; OSD_DrawObject(pObj, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); } else { m_HideWindow = TRUE; OSD_ClearObject(pObj, C_UPDATE_ALL); } }
static PRESULT av_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; VACTION unact; POBJECT_HEAD submenu; switch(event) { case EVN_PRE_OPEN: wincom_open_subtitle((POBJECT_HEAD)&win_av_con,RS_SYSTEM_TV_SYSTEM, 0); win_av_load_setting(); win_av_set_vcrloop_action(FALSE); win_av_init_items(); #ifdef NEW_DEMO_FRAME remove_menu_item((POBJECT_HEAD)&win_av_con, (OBJECT_HEAD *)&av_item_con5, CON_H + CON_GAP); remove_menu_item((POBJECT_HEAD)&win_av_con, (OBJECT_HEAD *)&av_item_con6, CON_H + CON_GAP); remove_menu_item((POBJECT_HEAD)&win_av_con, (OBJECT_HEAD *)&av_item_con7, CON_H + CON_GAP); #endif break; case EVN_POST_OPEN: wincom_open_commen_help(pObj); wincom_open_help(pObj,0,0); break; case EVN_PRE_CLOSE: sys_data_save(1); /* Make OSD not flickering */ *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; break; case EVN_POST_CLOSE: wincom_close_subtitle(); OSD_ClearScreen(); if((sys_data_get_sate_group_num(sys_data_get_cur_chan_mode())==0)) OSD_DrawObject((POBJECT_HEAD)&g_win_mainmenu,C_UPDATE_ALL); win_open_submenu_title(submenu,sub_menu_desc->title_id, 0); //guop break; case EVN_MSG_GOT: if(param1 == CTRL_MSG_SUBTYPE_CMD_TVSAT_SWITCH) { win_av_load_tv_mode_setting(TRUE); ret = PROC_LOOP; } break; default: break; } return ret; }
void win_progname_redraw(BOOL if_reset_scroll) { POBJECT_HEAD pObj = (POBJECT_HEAD) &g_win_progname; if(NULL == menu_stack_get_top() || (POBJECT_HEAD) &g_win_progname == menu_stack_get_top()) { if (if_reset_scroll) win_progname_stop_scroll(); OSD_DrawObject(pObj, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); #ifdef AD_TYPE AD_UpdateAD(AD_TYPE_CHANNEL_BAR); #endif } }
static void newcamd_display_info1(BOOL update) { TEXT_CONTENT* tcont; char strTemp[50]; UINT8 idx = g_newcamd_curidx-1; UINT32 ip = newcamd_serinfo[idx].ip; if(newcamd_serinfo[idx].bActive) { tcont = &str_info1[0]; tcont->text.pString = display_strs[31]; //sprintf(strTemp,"Server %d [%s]",g_newcamd_curidx,newcamd_serinfo[idx].name); sprintf(strTemp,"Server %d",g_newcamd_curidx); ComAscStr2Uni(strTemp,tcont->text.pString); tcont = &str_info1[1]; tcont->text.pString = display_strs[32]; // sprintf(strTemp,"Server IP[%d.%d.%d.%d] Server Port[%d]",\ // ip&0xff,(ip>>8)&0xff,(ip>>16)&0xff,(ip>>24)&0xff, newcamd_serinfo[idx].port); //pppppppppp sprintf(strTemp,"%s",newcamd_serinfo[idx].domain); ComAscStr2Uni(strTemp,tcont->text.pString); tcont = &str_info1[2]; tcont->text.pString = display_strs[33]; sprintf(strTemp,"User Name[******] User Password[******]"); ComAscStr2Uni(strTemp,tcont->text.pString); } else { tcont = &str_info1[0]; tcont->text.pString = display_strs[31]; //sprintf(strTemp,"Server %d [%s] Inactival",g_newcamd_curidx,newcamd_serinfo[idx].name); sprintf(strTemp,"Server %d Inactival",g_newcamd_curidx); ComAscStr2Uni(strTemp,tcont->text.pString); tcont = &str_info1[1]; tcont->text.pString=0; tcont = &str_info1[2]; tcont->text.pString=0; } if(update) { OSD_DrawObject((POBJECT_HEAD)&newcamd_item_info1, C_UPDATE_ALL); } }
static void spidercam_title_display() { UINT8 i; for(i=0;i<SPIDERCAM_HOST_COUNT;i++) { spidercam_set_title_rect(TITLE_ITEM_L+i*(TITLE_ITEM_GRAP+TITLE_ITEM_W), TITLE_ITEM_T, TITLE_ITEM_W, TITLE_ITEM_H); if(uHostConStatus[i]) { OSD_SetBitmapContent(&spidercam_title_bitmap, spidercam_title_item_bmp_ids[BMP_ON_INDEX]); } else { OSD_SetBitmapContent(&spidercam_title_bitmap, spidercam_title_item_bmp_ids[BMP_OFF_INDEX]); } OSD_SetTextFieldContent(&spidercam_title_txtname,STRING_NUMBER, i+1); OSD_DrawObject( (POBJECT_HEAD)&spidercam_title_bitmap, C_UPDATE_ALL); OSD_DrawObject( (POBJECT_HEAD)&spidercam_title_txtname, C_UPDATE_ALL); } }
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 ShowReplayHintOSDOnOff(UINT8 flag) { OBJECT_HEAD* obj; obj = (OBJECT_HEAD*)&win_replay_hint_bmp; if(exit_submenu_flag_replay==FALSE) { if(flag) OSD_DrawObject(obj, C_UPDATE_ALL); else OSD_ClearObject(obj, 0); } exit_submenu_flag_replay=FALSE; }
static void win_progress_bar_draw_bmp(UINT16 iconID) { BITMAP* bmp; // OSD_RECT rect; UINT32 posi; bmp = &progress_bar_bmp; // win_usb_backup_tmr_loop++; // posi = win_usb_backup_tmr_loop % PROGRESS_BAR_ICON_CNT; // OSD_SetRect(&rect, INFO_WAV_L, INFO_WAV_T, INFO_WAV_W, INFO_WAV_H); // OSD_SetRect2(&bmp->head.frame,pRect); OSD_SetBitmapContent(bmp, progress_bar_ids[iconID]); OSD_DrawObject( (POBJECT_HEAD)bmp, C_UPDATE_ALL); }
static void win_wifilist_update_wifi_device_status_display(BOOL refresh_device_status) { TEXT_FIELD* txt; UINT16 name[80]; name[0] = 0; txt = &wifilst_dev_status; ComAscStr2Uni(wifi_manager_state_str[g_ui_wifi_manager_state], name); OSD_SetTextFieldContent(txt, STRING_UNICODE, (UINT32)name); if(refresh_device_status) OSD_DrawObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); }
static void sudoku_draw_cursor(UINT8 row, UINT8 col) { UINT8 pos; UINT8 WStyle; pos = row*BOARD_COLS+col; WStyle = WSTL_GAMESUDOKU_CURSOR_HD; drawSquare(BK_X_OFFSET+col*GRID_WIDTH-2, BK_Y_OFFSET+row*GRID_WIDTH-2,\ GRID_WIDTH+4, GRID_WIDTH+4, WStyle); if(pboard[pos]!=' ') { OSD_MoveObject((POBJECT_HEAD)&txt_Grid,BK_X_OFFSET+col*GRID_WIDTH,BK_Y_OFFSET+row*GRID_WIDTH,FALSE); OSD_SetTextFieldContent(&txt_Grid,STRING_NUMBER, (UINT32)(pboard[pos]-'0')); OSD_DrawObject((POBJECT_HEAD)&txt_Grid,C_UPDATE_ALL); } }
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; }
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); }
void win_progname_draw_bmp(void) { UINT32 i,j; BITMAP* bmp; UINT16 icon; prog_bmp_t_gray* p_prog_bmp; bmp = &prog_bmp; for(i=0;i<PROG_BMP_GRAY_NUM;i++) { p_prog_bmp = &prog_bmps_gray[i]; icon = prog_bmps_gray[i].icon; 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); } }
void ap_cas_free_previewing_open(UINT16 strID) { static UINT8 i=0; OSD_RECT free_prew_rc; free_prew_rc.uLeft = 350; free_prew_rc.uTop = 0; free_prew_rc.uWidth = 360; free_prew_rc.uHeight = 120; OSD_SetRect2(&cas_freeprewing_info.head.frame, &free_prew_rc); OSD_SetRect(&(cas_freeprewing_info.rcText), 4, 4, free_prew_rc.uWidth-8, free_prew_rc.uHeight-8); cas_reeprewing_txt.bTextType =STRING_ID; cas_reeprewing_txt.text.wStringID= strID; OSD_DrawObject((POBJECT_HEAD)&cas_freeprewing_info, C_UPDATE_ALL); CAS_POPUP_FREE_PREVIEWING_STATUS = 1; }
static void win_imageslide_showpause(void) { UINT16 slide_interval; slide_interval = (image_slide_setting.uTime_gap * 1000); if(0 != slide_interval) { if(imageslide_pause_state == IMG_PAUSE_STATE) { OSD_DrawObject((POBJECT_HEAD)&imageslide_pause,C_UPDATE_ALL); } else { OSD_ClearObject((POBJECT_HEAD)&imageslide_pause, 0); } } }
void win_mlimit_draw_bmpinfo(UINT32 pos,UINT32 state) { BITMAP* bmp; UINT16 icon; bmp = &mlimit_bmpinfo; bmp->head.frame.uLeft = (pos == 0)? BMPINFO_L1 : BMPINFO_L2; if(state>=2) icon = 0; else icon = bmp_info_icons[pos][state]; OSD_SetBitmapContent(bmp, icon); OSD_DrawObject((POBJECT_HEAD)bmp,C_UPDATE_ALL); }
void win_par_switch_confirm(BOOL flag) { UINT8 action; if(flag) action = C_ATTR_ACTIVE; else action = C_ATTR_INACTIVE; if( !OSD_CheckAttr(&par_item_con4, action)) { OSD_SetAttr(&par_item_con4, action); OSD_SetAttr(&par_item_txtname4, action); OSD_SetAttr(&par_item_txtset4, action); OSD_DrawObject((POBJECT_HEAD )&par_item_con4,C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); } }
static void show_loadinglogo(UINT8 firstpos) { UINT8 i; UINT16 Col,Row; UINT16 top, left; PBITMAP pbitmap; for(i=firstpos; i<image_cnt_inpage; i++) { OSD_GetMtrxBoxCellLocation(&imgpreview_mbx_img, i, &Col, &Row); left = MBX_IMG_L + (MBX_IMG_WIDTH+MBX_IMG_GAP)*Col; top = MBX_IMG_T + (MBX_IMG_HEIGHT+MBX_IMG_GAP)*Row; pbitmap = &imgpreview_bmp_load; OSD_MoveObject((POBJECT_HEAD)pbitmap,left+LOAD_OFFSET_L,top+LOAD_OFFSET_T,FALSE); OSD_DrawObject((POBJECT_HEAD)pbitmap,C_UPDATE_ALL); } }
static void hdmi_display_info_set(void) { int Position; UINT8 i; OSD_SetTextFieldContent(&hdmi_info_name,STRING_ANSI, (UINT32)menuname); memset(test,0x00,sizeof(test)); STRCPY(test,HDMIVERSION); hdmi_strcat(test,get_hdmi_sw_version()); HDMI_PRINTF("%s\n",get_hdmi_sw_version()); OSD_SetTextFieldContent(&hdmi_info1,STRING_ANSI, (UINT32)test); memset(test,0x00,sizeof(test)); STRCPY(test,HDCPMFCCODE); hdmi_strcat(test, get_hdmi_cm_mfc_code()); HDMI_PRINTF("%s\n",get_hdmi_cm_mfc_code()); OSD_SetTextFieldContent(&hdmi_info2,STRING_ANSI, (UINT32)test); memset(test,0x00,sizeof(test)); STRCPY(test,CRYPTOMEMORY); hdmi_strcat(test, get_hdmi_cm_status() ); OSD_SetTextFieldContent(&hdmi_info3,STRING_ANSI, (UINT32)test); memset(test,0x00,sizeof(test)); memset(Key_id,0x00,sizeof(Key_id)); Position = 0; Position += sprintf( test+Position,"%s",HDCPKEYID); MEMCPY(Key_id,get_hdmi_cm_key_id(),sizeof(Key_id)); for(i = 0; i < sizeof(Key_id) - 1; i++) { Position += sprintf(test+Position,"0x%.2x,",Key_id[i]); HDMI_PRINTF("0x%.2x,",Key_id[i]); } Position += sprintf(test+Position,"0x%.2x",Key_id[i]); HDMI_PRINTF("0x%.2x",Key_id[i]); HDMI_PRINTF("\n"); OSD_SetTextFieldContent(&hdmi_info4,STRING_ANSI, (UINT32)test); OSD_DrawObject((POBJECT_HEAD )&g_win_hdmi_factory_test,C_UPDATE_ALL); }
static void catch_up_draw_week() { TEXT_FIELD* txt; char str[10]; INT32 i; txt = &txt_catch_up_week; for(i=0;i<7;i++) { OSD_MoveObject( (POBJECT_HEAD)txt, WEEK_L + WEEK_W*i, WEEK_T, FALSE); OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)week_str[i]); if(i == cur_weekday) OSD_TrackObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); else OSD_DrawObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); } }
void win_time_set_time_zone_citys(BOOL update) { POBJECT_HEAD pObj = (POBJECT_HEAD)&time_item_con2; MULTI_TEXT* mtxt = &time_mtxt_zone_city; TEXT_CONTENT* txtcont = timezone_mtxt_content; UINT8 bAction; struct time_zone_name* time_zone; INT32 i,hoffset,moffset,str_len; txtcont->bTextType = STRING_UNICODE; txtcont->text.pString = len_display_str; if(OSD_CheckAttr(pObj, C_ATTR_INACTIVE)) ComAscStr2Uni("", len_display_str); else { sys_data_gmtoffset_2_hmoffset(&hoffset,&moffset); time_zone = get_time_zone_name(hoffset, moffset); if(time_zone == NULL) ComAscStr2Uni("", len_display_str); else { str_len = 0; for(i=0; i<time_zone->namecnt; i++) { if(i!=0) { str_len = ComUniStrLen(len_display_str); SetUniStrCharAt(len_display_str,',', str_len); str_len++; } ComAscStr2Uni(time_zone->city_name[i], &len_display_str[str_len]); } } } if(update) OSD_DrawObject((POBJECT_HEAD)mtxt, C_UPDATE_ALL); }
static void win_sys_backup_msg_update(UINT16 str_id) { UINT32 i,j; OSD_RECT rect; sys_backup_msg_buf[sys_backup_msg_line % SYS_BACKUP_MSG_MAX_LINE] = str_id; for(i=0; i<SYS_BACKUP_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(&sys_backup_txt_msg.head.frame, &rect); OSD_SetTextFieldContent(&sys_backup_txt_msg, STRING_ID, (UINT32)sys_backup_msg_buf[i]); OSD_DrawObject( (POBJECT_HEAD)&sys_backup_txt_msg, C_UPDATE_ALL); } sys_backup_msg_line++; }
static PRESULT mlimit_item_sel_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT32 val; POBJECT_HEAD pObjRef = (POBJECT_HEAD)&mlimit_txtbtn_gotoref; switch(event) { case EVN_POST_CHANGE: /* remove "Go to reference inactive when disable limit selected" OSD_SetAttr(pObjRef, (LIMIT_OPT==0)? C_ATTR_INACTIVE: C_ATTR_ACTIVE); */ OSD_DrawObject(pObjRef,C_UPDATE_ALL); win_mlimit_draw_info(motor_move_state); break; } return ret; }
static void newcamd_draw_ext_server_info(UINT8 idx) { NEWCAMD_SERVER_T newcamd_ext_ser_info; char string[100],c; int i=0,j=0; //get_newcamd_ext_serinfo(&newcamd_ext_ser_info,idx); get_newcamd_serinfo(&newcamd_ext_ser_info,idx+MAX_VISIBLE_SERVER_NUM); MEMSET(string,0,sizeof(string)); while(newcamd_ext_ser_info.username[i]) { if(i>=8) { string[j++]='-'; break; } c = newcamd_ext_ser_info.username[i++]; if(c>='0' && c<='9') string[j++]=view_conver_string[c-'0']; else string[j++]='X'; } i=0; while(newcamd_ext_ser_info.userpwd[i]) { if(i>=8) { string[j++]='.'; break; } c = newcamd_ext_ser_info.userpwd[i++]; if(c>='0' && c<='9') string[j++]=view_conver_string[c-'0']; else string[j++]='X'; } string[j]='\0'; OSD_SetTextFieldContent(&newcamd_txt_ext_ser_info,STRING_ANSI,(UINT32)string); OSD_DrawObject((POBJECT_HEAD)&newcamd_txt_ext_ser_info,C_DRAW_SIGN_EVN_FLG |C_UPDATE_ALL); }
static void win_sys_backup_msg_clear() { UINT8 i; OSD_RECT rect; for(i=0;i<SYS_BACKUP_MSG_MAX_LINE;i++) { sys_backup_msg_buf[i] = 0;//display_strs[10+i]; rect.uLeft = MSG_L; rect.uTop = MSG_T+(MSG_H+MSG_GAP)*i; rect.uWidth = MSG_W; rect.uHeight= MSG_H; OSD_SetRect2(&sys_backup_txt_msg.head.frame, &rect); OSD_SetTextFieldContent(&sys_backup_txt_msg, STRING_ID, (UINT32)sys_backup_msg_buf[i]); OSD_DrawObject( (POBJECT_HEAD)&sys_backup_txt_msg, C_UPDATE_ALL); } sys_backup_msg_line = 0; }