Пример #1
0
PRESULT comlist_country_net_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	UINT16 i,wTop;
	UINT8 id;
	//char str_len;
	OBJLIST* ol;
	//UINT8 temp[4];
     char *str;
	//SYSTEM_DATA* p_sys_data=sys_data_get();
	MULTISEL * msel;

	PRESULT cbRet = PROC_PASS;

	ol = (OBJLIST*)pObj;

    id = OSD_GetFocusID((POBJECT_HEAD)&win_country_net_con);

	if(event==EVN_PRE_DRAW)
	{
		switch(id)
		{
			case COUNTRY_ID:
	    		    wTop = OSD_GetObjListTop(ol);
	    		    for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
	    		    {
					win_comlist_set_str(i + wTop,NULL,NULL,country_str[i+wTop]);
	    		    }
				break;
			case NETWORK_ID:
	    		    wTop = OSD_GetObjListTop(ol);
                 msel = &item_country_sel;
                 if(GERMANY == OSD_GetMultiselSel(msel))
                 {
	    		        for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
	    		        {
					    win_comlist_set_str(i + wTop, NULL,NULL,network_str[i+wTop]);
	    		        }

                 }
                 else
                 {
	    		        for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
	    		        {
                           win_comlist_set_str(i + wTop, NULL,NULL,network_str[i+wTop+4]);
	    		        }
                 }
			    break;
		}
	}
	else if(event == EVN_POST_CHANGE)
		cbRet = PROC_LEAVE;

	return cbRet;
}
Пример #2
0
PRESULT comlist_disk_info_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT cbRet = PROC_PASS;
	UINT16 i,wTop,cnt;
	OBJLIST* ol;
	char  str[50];

	ol = (OBJLIST*)pObj;
	cnt = OSD_GetObjListCount(ol);
	
	if(event==EVN_PRE_DRAW)
	{
    	wTop = OSD_GetObjListTop(ol);
    	for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
    	{
#ifndef _BUILD_OTA_E_
		win_removable_disk_get_show_str(i + wTop, str);
#endif
		win_comlist_set_str(i + wTop, str, NULL, 0);
    	}
	}
	else if(event == EVN_POST_CHANGE)
		cbRet = PROC_LEAVE;

	return cbRet;
}
Пример #3
0
PRESULT comlist_volumelist_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT cbRet = PROC_PASS;
	UINT16 i,wTop;
    OBJLIST* ol;
	UINT16 unistr[50];
	char str[50];

    ol = (OBJLIST*)pObj;
	wTop = OSD_GetObjListTop(ol);

	if (event == EVN_PRE_DRAW)
	{
    	for (i = 0; i< ol->wDep && (i+wTop) < ol->wCount; i++)
    	{            
			storage_index_to_osd_string(i+wTop,str);
			ComAscStr2Uni(str,unistr);
            win_comlist_set_str(i+wTop, NULL, unistr, 0);
    	}
	}
	else if(event == EVN_POST_CHANGE)
		cbRet = PROC_LEAVE;

	return cbRet;
}
Пример #4
0
void win_multifeed_set_display(void)
{
	TEXT_FIELD *txt;
	OBJLIST* ol;	
	UINT16 i,cnt,top_idx,cur_idx,dep;
	P_NODE p_node;
	UINT16 channel;
	UINT8 name[32];

	channel = sys_data_get_cur_group_cur_mode_channel();

	get_prog_at(channel,&p_node);

	ol = &multifeed_ol;
	cnt = OSD_GetObjListCount(ol);
	dep = OSD_GetObjListPage(ol);	
	top_idx = OSD_GetObjListTop(ol);

	for(i=0;i<dep;i++)
	{
		cur_idx = top_idx + i;		
		txt = text_items[i];

		if(cur_idx < cnt )
		{
			multifeed_get_feed_name(p_node.prog_id, cur_idx, name);
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)name);
		}
		else
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)"");
	}
	
}
Пример #5
0
PRESULT comlist_partition_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT cbRet = PROC_PASS;
	UINT16 i,wTop,cnt;
	OBJLIST* ol;
	char  str[50];

	ol = (OBJLIST*)pObj;
	cnt = OSD_GetObjListCount(ol);
	
	if(event==EVN_PRE_DRAW)
	{
    	wTop = OSD_GetObjListTop(ol);
    	for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
    	{
		//ComUniStrCopyChar((UINT8*)&str[p_node.ca_mode], p_node.service_name);	
#ifndef _BUILD_OTA_E_
		win_partition_get_str(i + wTop, str);
#endif
		win_comlist_set_str(i + wTop, str, NULL, 0);
    	}
	}
	else if(event == EVN_POST_CHANGE)
		cbRet = PROC_LEAVE;

	return cbRet;
}
Пример #6
0
static PRESULT purse_list_item_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	UINT8	bID ;
	UINT16  icon_id, top;
	POBJECT_HEAD submenu;	
	
 	bID = OSD_GetObjID(pObj);
	top = OSD_GetObjListTop(&purse_olist);	
	cur_purse = bID + top;

	switch(event)
	{
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);
		if(unact == VACT_ENTER)
		{
			if(0 != purse_cnt)
			{
			submenu = (POBJECT_HEAD)&win_token_con;
			if(OSD_ObjOpen(submenu, MENU_OPEN_TYPE_MENU) != PROC_LEAVE)
				menu_stack_push(submenu);					
		        }
		}
		break;
	}
	return ret;
}
Пример #7
0
static PRESULT movefile_list_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	UINT16 uTop,uCurpos;
	PRESULT ret = PROC_PASS;
	VACTION unact;

	uTop = OSD_GetObjListTop((POBJLIST)pObj);
	uCurpos = OSD_GetObjListCurPoint((POBJLIST)pObj);
	switch(event)
	{
		case EVN_PRE_DRAW:
			movefile_display_items(uTop);
			break;
		case EVN_POST_DRAW:
			break;
		case EVN_ITEM_PRE_CHANGE:
			break;
		case EVN_ITEM_POST_CHANGE:
			break;
		case EVN_UNKNOWN_ACTION:
			ret = movefile_item_enter(uCurpos);
			break;
		default:
			break;
	}
	
	return ret;
}
Пример #8
0
void win_satfav_set_display(void)
{
	UINT32 i;
	UINT16 top,cnt,page,idx;
	
	OBJLIST* ol = &satfav_item_list;
	BITMAP* bmp;
	TEXT_FIELD* txt;
	CONTAINER* item;
	UINT32 valid_idx;
	UINT16 unistr[50];
	UINT8 group_type,group_idx,av_flag;

	av_flag = sys_data_get_cur_chan_mode();
	

	cnt = OSD_GetObjListCount(ol);
	page = OSD_GetObjListPage(ol); 
	top = OSD_GetObjListTop(ol);

	for(i=0;i<page;i++)
	{
		item = (CONTAINER*)satfav_items[i];


		idx = top + i;
		group_idx = (UINT8)(idx);
		if(sat_fav_list_flag == 1)
		{
			group_idx += sys_data_get_sate_group_num(av_flag);
			group_idx ++;
		}
				
		if(idx< cnt)
			valid_idx = 1;
		else
			valid_idx = 0;
		
		if(valid_idx)
			get_chan_group_name((UINT8*)unistr,group_idx,&group_type);
		

		/*IDX */
		txt = (TEXT_FIELD*)OSD_GetContainerNextObj(item);//bmp->head.pNext;
		if(valid_idx)
			OSD_SetTextFieldContent(txt,STRING_NUMBER, idx + 1);
		else
			OSD_SetTextFieldContent(txt,STRING_ANSI,(UINT32)"");

		/*Name*/
		txt = (TEXT_FIELD*)OSD_GetObjpNext(txt);//txt->head.pNext;
		if(valid_idx)
		{
			OSD_SetTextFieldContent(txt, STRING_UNICODE, (UINT32)unistr);
		}
		else
			OSD_SetTextFieldContent(txt,STRING_ANSI,(UINT32)"");
	}
	
}
Пример #9
0
static void ci_info_list_display()
{
	OBJLIST* ol;
	CONTAINER* item;	
	TEXT_FIELD* txt;	
	UINT16 top,cnt,page,index, i;

	

	ol = &olst_ci_info;

	cnt = OSD_GetObjListCount(ol);
	page = OSD_GetObjListPage(ol); 
	top = OSD_GetObjListTop(ol);


	
	for( i = 0; i < page; i++)
	{
		index = top + i;

		item = (PCONTAINER)ci_info_list_items[i];
		txt  = (PTEXT_FIELD)OSD_GetContainerNextObj(item);
		if(index < cnt)
		{
			OSD_SetTextFieldContent(txt, STRING_UNICODE, (UINT32)ci_info.menu.entry_ls_txt[index]);
		}
		else
		{
			OSD_SetTextFieldContent(txt, STRING_UNICODE, (UINT32)"");
		}
		
	}
}
Пример #10
0
static void win_mail_scroll_string()
{
	POBJLIST ol = &mail_ol;
	UINT16 cur_point = 0;

	cur_point = OSD_GetObjListCurPoint(ol);
	cur_point -= OSD_GetObjListTop(ol);
	wincom_scroll_textfield((PTEXT_FIELD)mail_titles[cur_point]);
}
Пример #11
0
PRESULT comlist_menu_opts_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	UINT16 i,wTop;
	UINT8 id;
	char str_len;
    	OBJLIST* ol;
	UINT8 temp[4];
	
	PRESULT cbRet = PROC_PASS;

    	ol = (OBJLIST*)pObj;
	
	if(event==EVN_PRE_DRAW)
	{
		id=OSD_GetFocusID((POBJECT_HEAD)&win_youtube_opts_con);
		switch(id)
		{
			case MENU_YT_OPTS:
			    	wTop = OSD_GetObjListTop(ol);
			    	for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
			    	{
					sprintf(temp,"%d", i+wTop+1);
					win_comlist_set_str(i + wTop,temp,NULL,0);
			    	}
				break;
			case MENU_YT_OPTS_NEXT_OPTS:
			    	wTop = OSD_GetObjListTop(ol);
			    	for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
			    	{
					sprintf(temp,"%d0%%", i+wTop);
					if(i+wTop)
						win_comlist_set_str(i + wTop,temp,NULL,0);
					else
						win_comlist_set_str(i + wTop,NULL,NULL,RS_COMMON_OFF);
			    	}
				break;
		}
	}
	else if(event == EVN_POST_CHANGE)
		cbRet = PROC_LEAVE;

	return cbRet;
}
Пример #12
0
static void win_purse_set_display(void)
{
	UINT32 i,j,n;
	OBJLIST* ol;
	UINT16 top,cnt,page,index,curitem;
	UINT32 valid_idx,ew_flag;
	CONTAINER* item;
	TEXT_FIELD* txt;
	UINT8  purse_str[30];
	UINT16 icon_id;
	BITMAP* bmp;
	SYSTEM_DATA* sys_data;
	UINT8	hl_idx;

	sys_data = sys_data_get();
	
	ol = &purse_olist;
	cnt = purse_cnt;
//	cnt = OSD_GetObjListCount(ol);
	OSD_SetObjListCount(ol, cnt);
	page = OSD_GetObjListPage(ol); 
	top = OSD_GetObjListTop(ol);
	curitem = OSD_GetObjListNewPoint(ol);

	for(i=0;i<page;i++)
	{
		item = (CONTAINER*)purselist_items[i];
		index = top + i;
		
		if(index< cnt)
			valid_idx = 1;
		else
			valid_idx = 0;		

		/* Name*/
		txt = (PTEXT_FIELD)OSD_GetContainerNextObj(item);
		if(valid_idx)
			OSD_SetTextFieldContent(txt, STRING_ANSI,ap_purse[top+i].name);
		else
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)"");

		 /* Balance*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
		{
			sprintf(purse_str, "%d", ap_purse[top+i].balance);
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)purse_str);
		}
		else
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)"");
	}
}
Пример #13
0
static void catch_up_list_display(void)
{
	CONTAINER* con;
	TEXT_FIELD* text;
	OBJLIST* ol;
	UINT16 i,top,cnt,page,index,curitem,valid_idx;	
	struct catch_up_list_node_s *catch_up_list_node;
	char name[50] = {0};
	char time[50] = {0};

	ol = &ol_catch_up;

	cnt = OSD_GetObjListCount(ol);
	page = OSD_GetObjListPage(ol); 
	top = OSD_GetObjListTop(ol);
	curitem = OSD_GetObjListNewPoint(ol);
	
	for(i=0;i<page;i++)
	{
		con = (CONTAINER *)catch_up_items[i];
		index = top + i;

		if(index < cnt)
			valid_idx = 1;
		else
			valid_idx = 0;	

		/* IDX */
		text = (TEXT_FIELD*)OSD_GetContainerNextObj(con);
		
		if(valid_idx)
			OSD_SetTextFieldContent(text, STRING_NUMBER, index+ 1);
		else
			OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)"");

		/* Name**/
		text = (TEXT_FIELD*)OSD_GetObjpNext(text);
		
		if(valid_idx)
		{
			catch_up_list_node = catch_up_query(index);
			OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)(catch_up_list_node->data));
			memset(name, 0x0, sizeof(name));
			memset(time, 0x0, sizeof(time));
			catch_up_get_prog_name_time(catch_up_list_node->data, name, time);
			libc_printf("name = %s, time = %s\n", name, time);
		}
		else
			OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)"");
	}    
}
Пример #14
0
PRESULT comlist_menu_time_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
    UINT16 i,wTop;
    UINT8 id;
    char str_len;
    OBJLIST* ol;
    UINT8 temp[15];
    UINT8 hour,minute,offset;

    PRESULT cbRet = PROC_PASS;

    ol = (OBJLIST*)pObj;

    if(event==EVN_PRE_DRAW)
    {
        id=OSD_GetFocusID((POBJECT_HEAD)&win_time_con);
        switch(id)
        {
        case MENU_TIMESET_GMT_OFFESET:
            wTop = OSD_GetObjListTop(ol);
            for(i=0; i<ol->wDep && (i+wTop)<ol->wCount; i++)
            {


                if(i+wTop>=23)
                {
                    offset= (i+wTop) - 23;
                    hour=offset/2;
                    minute=offset%2 * 30;
                    sprintf(temp, "UTC + %02d:%02d", hour, minute);
                }
                else
                {
                    offset=23-(i+wTop);
                    hour=offset/2;
                    minute=offset%2 * 30;
                    sprintf(temp, "UTC - %02d:%02d", hour, minute);
                }
                win_comlist_set_str(i + wTop,temp,NULL,0);
            }
            break;
        }
    }
    else if(event == EVN_POST_CHANGE)
        cbRet = PROC_LEAVE;

    return cbRet;
}
Пример #15
0
static PRESULT win_findprog_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT cbRet = PROC_PASS;
	
	UINT32 i,wTop,prog_idx,nStrLen,k;

	UINT16 channel,str_len;
	UINT16 unistr[50];
	char prog_pre[20];
	P_NODE  p_node;
	OBJLIST* ol = (OBJLIST*)pObj;

	UINT16 dep,cnt;

	dep = OSD_GetObjListPage(ol);
	cnt = OSD_GetObjListCount(ol);

	if(event==EVN_PRE_DRAW)
	{		
    	wTop = OSD_GetObjListTop(ol);
    	for(i=0;i<dep && (i+wTop)<cnt;i++)
		{
			prog_idx = i + wTop;
			get_find_prog_by_pos(prog_idx,&p_node);

			sprintf(prog_pre,"%04d  %s",prog_idx + 1,(p_node.ca_mode==0)? "" :  "$");
			nStrLen = ComAscStr2Uni(prog_pre, unistr);
			ComUniStrCopy(&unistr[nStrLen], (UINT16*)p_node.service_name);

			win_comlist_set_str(i + wTop, NULL, (char*)unistr,0);
		}
	}
	else if(event==EVN_POST_CHANGE)
	{
		cbRet = PROC_LEAVE;
		select_channel_idx = win_comlist_get_selitem();
		get_find_prog_by_pos(select_channel_idx,&p_node);
		select_channel_idx = get_prog_pos(p_node.prog_id);
		
		clear_node_find_flag();

		//UIChChgPlayProg(0, select_channel_idx);

		api_play_channel(p_node.prog_id, TRUE, TRUE, TRUE);
	}

	return cbRet;
}
Пример #16
0
static void news_list_display(void)
{
	CONTAINER* con;
	TEXT_FIELD* text;
	OBJLIST* ol;
	UINT16 i,top,cnt,page,index,curitem,valid_idx;	
	struct news_node_s *news_node;

	ol = &ol_news_list;

	cnt = OSD_GetObjListCount(ol);
	page = OSD_GetObjListPage(ol); 
	top = OSD_GetObjListTop(ol);
	curitem = OSD_GetObjListNewPoint(ol);
	
	for(i=0;i<page;i++)
	{
		con = (CONTAINER *)news_list_items[i];
		index = top + i;

		if(index < cnt)
			valid_idx = 1;
		else
			valid_idx = 0;	

		/* IDX */
		text = (TEXT_FIELD*)OSD_GetContainerNextObj(con);
		
		if(valid_idx)
			OSD_SetTextFieldContent(text, STRING_NUMBER, index+ 1);
		else
			OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)"");

		/* Name**/
		text = (TEXT_FIELD*)OSD_GetObjpNext(text);
		
		if(valid_idx)
		{
			news_node = news_query(1, index);
			OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)(news_node->data));
		}
		else
			OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)"");
	}    
}
Пример #17
0
static void  win_favgrplst_set_display(void)
{
    CONTAINER* con;
    TEXT_FIELD* text;
	OBJLIST* ol;
	UINT16 i,top,cnt,page,index,curitem,valid_idx;	
    SYSTEM_DATA* sys_data = sys_data_get();

	ol = &favgrplist_olist;
char ee[30];
	cnt = OSD_GetObjListCount(ol);
	page = OSD_GetObjListPage(ol); 
	top = OSD_GetObjListTop(ol);
	curitem = OSD_GetObjListNewPoint(ol);
	

	for(i=0;i<page;i++)
    {
        con = (CONTAINER*)favgrplist_items[i];
		index = top + i;
		
		if(index< cnt)
			valid_idx = 1;
		else
			valid_idx = 0;		

        /* IDX */
        text = (TEXT_FIELD*)OSD_GetContainerNextObj(con); 
		if(valid_idx)
			OSD_SetTextFieldContent(text, STRING_NUMBER, index+ 1);
		else
			OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)"");
 
        /* Name**/
        text = (TEXT_FIELD*)OSD_GetObjpNext(text);
		ComUniStrToAsc(sys_data->favgrp_names[index],ee);
		libc_printf("\n88888888===%s\n",ee);
		if(valid_idx)
			OSD_SetTextFieldContent(text, STRING_UNICODE, (UINT32)sys_data->favgrp_names[index]);
		else
			OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)"");
        
	}    
}
Пример #18
0
INT32 favgrp_check_input_name(UINT16* uni_name)
{
	char ansi_name[30];
	UINT16 unicode_tmp[FAV_GRP_NAME_LEN];
	OBJLIST* ol;
	UINT16 i,top,cnt,page,index,curitem,valid_idx;
	UINT8 back_saved;

    if (ComUniStrLen(uni_name) == 0)
    {
		win_compopup_init(WIN_POPUP_TYPE_OK);
		win_compopup_set_msg(NULL,NULL, RS_MSG_NAME_EMPTY);
		win_compopup_open_ext(&back_saved);
        return -2;
    }

	SYSTEM_DATA* sys_data = sys_data_get();
	
	ol = &favgrplist_olist;

	cnt = OSD_GetObjListCount(ol);
	page = OSD_GetObjListPage(ol); 
	top = OSD_GetObjListTop(ol);
	curitem = OSD_GetObjListNewPoint(ol);

	memset((void *)unicode_tmp,0x0,sizeof(unicode_tmp));
	memcpy((void *)unicode_tmp,(void *)uni_name,(sizeof(unicode_tmp[0]) * (FAV_GRP_NAME_LEN - 1)) );
	ComUniStrToAsc((UINT8*)unicode_tmp,ansi_name);
	for(i=0;i<MAX_FAVGROUP_NUM;i++)
	{
		if(i==curitem)
			continue;

		if(STRCMP(ansi_name,sys_data->favgrp_names[i]) == 0)
		{
			win_compopup_init(WIN_POPUP_TYPE_OK);
			win_compopup_set_msg(NULL,NULL, RS_DISPLAY_NAME_EXIST);
			win_compopup_open_ext(&back_saved);
			return -1;		
		}			
	}

	return 0;
}
Пример #19
0
static void  weathercitylst_set_display(void)
{
	CONTAINER* con;
	TEXT_FIELD* text;
	OBJLIST* ol;
	UINT16 i,top,cnt,page,index,curitem,valid_idx;	
	SYSTEM_DATA* sys_data = sys_data_get();
	ol = &weather_city_olist;

	cnt = OSD_GetObjListCount(ol);
	page = OSD_GetObjListPage(ol); 
	top = OSD_GetObjListTop(ol);
	curitem = OSD_GetObjListNewPoint(ol);
	
	for(i=0;i<page;i++)
	{
		con = (CONTAINER *)weathercitylst_items[i];
		index = top + i;

		if(index < cnt)
			valid_idx = 1;
		else
			valid_idx = 0;	

		/* IDX */
		text = (TEXT_FIELD*)OSD_GetContainerNextObj(con);
		
		if(valid_idx)
			OSD_SetTextFieldContent(text, STRING_NUMBER, index+ 1);
		else
			OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)"");

		/* Name**/
		text = (TEXT_FIELD*)OSD_GetObjpNext(text);
		
		if(valid_idx)
		{
				//libc_printf("\n^^^^^^^^555555==%s==%d\n",sys_data->weather_city_name[index],index);
				OSD_SetTextFieldContent(text, STRING_UNICODE, (UINT32)sys_data->weather_city_name[index]);	
		}
		else
			OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)"");
	}
}
Пример #20
0
static void map_city_list_display(void)
{
	CONTAINER* con;
	TEXT_FIELD* text;
	OBJLIST* ol;
	UINT16 i,top,cnt,page,index,curitem,valid_idx;	
	SYSTEM_DATA *p_sys_data = sys_data_get();

	ol = &ol_map_city;

	cnt = OSD_GetObjListCount(ol);
	page = OSD_GetObjListPage(ol); 
	top = OSD_GetObjListTop(ol);
	curitem = OSD_GetObjListNewPoint(ol);
	
	for(i=0;i<page;i++)
	{
		con = (CONTAINER *)map_city_items[i];
		index = top + i;

		if(index < cnt)
			valid_idx = 1;
		else
			valid_idx = 0;	

		/* IDX */
		text = (TEXT_FIELD*)OSD_GetContainerNextObj(con);
		
		if(valid_idx)
			OSD_SetTextFieldContent(text, STRING_NUMBER, index+ 1);
		else
			OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)"");

		/* Name**/
		text = (TEXT_FIELD*)OSD_GetObjpNext(text);
		
		if(valid_idx)
			OSD_SetTextFieldContent(text, STRING_UNICODE, (UINT32)p_sys_data->map_city_name[index]);
		else
			OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)"");
	}    
}
Пример #21
0
PRESULT comlist_menu_language_stream_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT cbRet = PROC_PASS;
	UINT16 i,wTop;
	char str_len;
	OBJLIST* ol;

	ol = (OBJLIST*)pObj;
	
	if(event==EVN_PRE_DRAW)
	{
    	wTop = OSD_GetObjListTop(ol);
    	for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
    	{
			win_comlist_set_str(i + wTop,NULL,NULL,stream_lang_str_ids[i + wTop] );
		}
	}
	else if(event == EVN_POST_CHANGE)
		cbRet = PROC_LEAVE;

	return cbRet;
}
Пример #22
0
static PRESULT playlst_list_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	UINT8 bID;
	UINT16 uTop,uCnt,uCurpos;
	PRESULT ret = PROC_PASS;
	VACTION unact;

	uCnt = OSD_GetObjListCount((POBJLIST)pObj);
	uTop = OSD_GetObjListTop((POBJLIST)pObj);
	uCurpos = OSD_GetObjListCurPoint((POBJLIST)pObj);
	bID = uCurpos - uTop;
	switch(event)
	{
		case EVN_PRE_DRAW:
			ret = PROC_LOOP;
			if(param1 == C_DRAW_TYPE_HIGHLIGHT)
			{
				playlist_display_items(uTop);
				OSD_TrackObject(pObj, C_UPDATE_ALL);
			}
			break;
		case EVN_POST_DRAW:
			break;
		case EVN_ITEM_PRE_CHANGE:
			break;
		case EVN_ITEM_POST_CHANGE:
			break;
		case EVN_UNKNOWN_ACTION:
			unact = (VACTION)(param1>>16);
			ret = playlist_colorkey_proc(unact);
			break;
		default:
			break;
	}
	
	return ret;
}
Пример #23
0
PRESULT comlist_display_set_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
    UINT16 i,wTop;
    UINT8 id;
    OBJLIST* ol;
    UINT8 temp[4];
    SYSTEM_DATA* p_sys_data=sys_data_get();

    PRESULT cbRet = PROC_PASS;

    ol = (OBJLIST*)pObj;

    if(event==EVN_PRE_DRAW)
    {
        id = OSD_GetFocusID((POBJECT_HEAD)&g_win_display_set);
        switch(id)
        {
        case IDC_DIS_BRIGHT:
        case IDC_DIS_CONTRAST:
        case IDC_DIS_SATURATION:
        case IDC_DIS_HUE:
        case IDC_DIS_SHARP:
            wTop = OSD_GetObjListTop(ol);
            for(i=0; i<ol->wDep && (i+wTop)<ol->wCount; i++)
            {
                sprintf(temp,"%d", i+wTop+m_dis_set_range[id][0]);
                win_comlist_set_str(i + wTop,temp,NULL,0);
            }
            break;
        }
    }
    else if(event == EVN_POST_CHANGE)
        cbRet = PROC_LEAVE;

    return cbRet;
}
Пример #24
0
PRESULT comlist_tvsys_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	UINT16 i,wTop;
	UINT8 id;
	char str_len;
	OBJLIST* ol;
	UINT8 temp[4];
	SYSTEM_DATA* p_sys_data=sys_data_get();
	
	PRESULT cbRet = PROC_PASS;

	ol = (OBJLIST*)pObj;
	
	if(event==EVN_PRE_DRAW)
	{
		id=OSD_GetFocusID((POBJECT_HEAD)&win_av_con);
		switch(id)
		{
			case TVMODE_ID:
			    	wTop = OSD_GetObjListTop(ol);
			    	for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
			    	{
						win_comlist_set_str(i + wTop,get_tv_mode_string(i+wTop),NULL,0);
			    	}
				break;
			
			case TVASPECT_ID:
#ifdef HDMI_CERTIFICATION_UI
				if( check_tv_display_in_hd_mode() )
				{
					OSD_SetObjListCount(ol, 1);
					//insert [16:9] into com_list[0];
					win_comlist_set_str(0, tv_ratio[3], NULL,0);
					break;
				}
				else
				{
					wTop = OSD_GetObjListTop(ol);
					OSD_SetObjListCount(ol, TV_RATIO_NCNT);
				}
#else
				wTop = OSD_GetObjListTop(ol);
#endif
			    	for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
			    	{
						win_comlist_set_str(i + wTop,tv_ratio[i+wTop],NULL,0);
			    	}
				break;

				
			case VIDEOOUT_ID:
			    	wTop = OSD_GetObjListTop(ol);
			    	for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
			    	{
#ifndef HDTV_SUPPORT
						win_comlist_set_str(i + wTop,NULL,NULL,video_output_ids[i]);
#else
						win_comlist_set_str(i + wTop,video_output[i+wTop],NULL,0);
#endif
			    	}			
				break;
				
			case RFSYSTEM_ID:
			    	wTop = OSD_GetObjListTop(ol);
			    	for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
			    	{
						win_comlist_set_str(i + wTop,rf_mode_stings[i+wTop],NULL,0);
			    	}
				break;
				
			case RFCHAN_ID:
			    	wTop = OSD_GetObjListTop(ol);
			    	for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
			    	{
						sprintf(temp,"%d", i+wTop+rf_ch_range[p_sys_data->avset.rf_mode][0]);
						win_comlist_set_str(i + wTop,temp,NULL,0);
			    	}
				break;

			
#ifdef HDTV_SUPPORT
			case HDMIOUT_ID:
			    	wTop = OSD_GetObjListTop(ol);
			    	for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
			    	{
						win_comlist_set_str(i + wTop,format_setting[i+wTop],NULL,0);
			    	}
				break;
				
			case AUDIOOUT_ID:
			    	wTop = OSD_GetObjListTop(ol);
			    	for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
			    	{
						win_comlist_set_str(i + wTop,audio_setting[i+wTop],NULL,0);
			    	}
				break;
#endif
		}
	}
	else if(event == EVN_POST_CHANGE)
	{
		cbRet = PROC_LEAVE;
	}

	return cbRet;
}
Пример #25
0
static void win_nagra2_set_display(void)
{
	UINT32 i,j,n;
	CAS_KEYINFO *Pm = NULL;
	OBJLIST* ol;
	UINT16 top,cnt,page,index,curitem;
	UINT32 valid_idx;
	CONTAINER* item1,*item2;
	TEXT_FIELD* txt;
	char str[100], str1[16],str2[8],str3[100];
	UINT16 icon_id;
	UINT8	hl_idx;
	char ch1,ch2;

	ol = &nagra2_olist;

	cnt = OSD_GetObjListCount(ol);
	page = OSD_GetObjListPage(ol); 
	top = OSD_GetObjListTop(ol);
	curitem = OSD_GetObjListNewPoint(ol);

	for(i=0;i<page/2;i++)
	{
		if(top%2)
		{
			item1 = (CONTAINER*)nagra2_items[i*2+1];
		}
		else
		{
			item1 = (CONTAINER*)nagra2_items[i*2];
		}
		index = top/2 + i;
					
		if(index< cnt)
			valid_idx = 1;
		else
			valid_idx = 0;		

		if(valid_idx)
		{
			if(top%2)
			{
				Pm = (CAS_KEYINFO *) softcam_get_keydata((u8) CAS_ID_NAGRA2,(top/2+i+1));
			}
			else
			{
				Pm = (CAS_KEYINFO *) softcam_get_keydata((u8) CAS_ID_NAGRA2,(top/2+i));
			}
		}
		
		if(Pm==NULL)
		{
			valid_idx=0;
		}

		 /* viaccess2 IDX */
		txt = (PTEXT_FIELD)OSD_GetContainerNextObj(item1);
		if(valid_idx)
		{
			if(top%2)
			{
				OSD_SetTextFieldContent(txt, STRING_NUMBER, (UINT32) (index + 1+1));
			}
			else
			{
				OSD_SetTextFieldContent(txt, STRING_NUMBER, (UINT32) (index + 1));
			}
		}
		else
		{
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)"");
		}
		
		/* patch chan Name*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
			OSD_SetTextFieldContent(txt, STRING_ANSI,(UINT32)Pm ->ChanName);
		else
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)"");
		//soc_printf("%d chan name is %d \n",index + 1,Pm->KeyData);

		 /* patch ident*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
		{
			sprintf(str,"%08x",Pm ->Ident);
		}
		else
		{
			sprintf(str,"");
		}
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);
		
		 /* patch num*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
		{
			ch1 = (Pm ->KeyNum)>>8;//is ch1 '0'~'9' 'a'~z A~Z
			ch2 = (Pm ->KeyNum)&0xFF;
			sprintf(str,"%c%c",(ch1>0)?ch1:' ',(ch2>0)?ch2:' ');
		}
		else
		{
			sprintf(str,"");
		}
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);
#if 1
		 /* patch keydata*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
		{
			memset(str,0,sizeof(str));
			sprintf(str,"%02x ",Pm->KeyData[0]);
			if((Pm->Lenth < 65))
			{
				for(j=1;j<8;j++)
				{
					sprintf(str1,"%02x ",Pm->KeyData[j]);
					strcat(str,str1);
				}
			}
		}
		else
		{
			sprintf(str,"");
		}
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);
#endif	
	}
Пример #26
0
PRESULT comlist_tvsys_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	UINT16 i,wTop;
	UINT8 id;
	char str_len;
	OBJLIST* ol;
	UINT8 temp[4];
	SYSTEM_DATA* p_sys_data=sys_data_get();
	
	PRESULT cbRet = PROC_PASS;

	ol = (OBJLIST*)pObj;
	
	if(event==EVN_PRE_DRAW)
	{
		id=OSD_GetFocusID((POBJECT_HEAD)&win_av_con);
		switch(id)
		{
		case TVMODE_ID:
	    	wTop = OSD_GetObjListTop(ol);
	    	for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
	    	{
				win_comlist_set_str(i + wTop,get_tv_mode_string(i+wTop),NULL,0);
	    	}
			break;
		case TVASPECT_ID:
	    	wTop = OSD_GetObjListTop(ol);
	    	for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
	    	{
				win_comlist_set_str(i + wTop,tv_ratio[i+wTop],NULL,0);
	    	}
			break;
		case RFSYSTEM_ID:
	    	wTop = OSD_GetObjListTop(ol);
	    	for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
	    	{
				win_comlist_set_str(i + wTop,rf_mode_stings[i+wTop],NULL,0);
	    	}
			break;
		case RFCHAN_ID:
	    	wTop = OSD_GetObjListTop(ol);
	    	for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
	    	{
				sprintf(temp,"%d", i+wTop+rf_ch_range[p_sys_data->avset.rf_mode][0]);
				win_comlist_set_str(i + wTop,temp,NULL,0);
	    	}
			break;
#ifdef HDTV_SUPPORT
		case HDMIOUT_ID:
	    	wTop = OSD_GetObjListTop(ol);
	    	for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
	    	{
				win_comlist_set_str(i + wTop,format_setting[i+wTop],NULL,0);
	    	}
			break;
		case AUDIOOUT_ID:
	    	wTop = OSD_GetObjListTop(ol);
	    	for(i=0;i<ol->wDep && (i+wTop)<ol->wCount;i++)
	    	{
				//win_comlist_set_str(i + wTop,audio_setting[i+wTop],NULL,0);
				win_comlist_set_str(i + wTop,NULL,NULL,audio_setting[i+wTop]);
	    	}
			break;
#endif
		}
	}
	else if(event == EVN_POST_CHANGE)
		cbRet = PROC_LEAVE;

	return cbRet;
}
Пример #27
0
static void win_wifilist_update_wifi_ap_list_display(BOOL refresh_ap_list)
{
	UINT16 top,cnt,page,index,curitem;
	UINT32 i,n;
	UINT32 valid_idx;
	OBJLIST* ol;
	CONTAINER* item;	
	TEXT_FIELD* txt;

	ol = &wifilist_olist;

	cnt = OSD_GetObjListCount(ol);
	page = OSD_GetObjListPage(ol); 
	top = OSD_GetObjListTop(ol);
	curitem = OSD_GetObjListNewPoint(ol);

	DEBUG_PRINTF("win_wifilist_update_wifi_ap_list_display()\n");
	DEBUG_PRINTF("-cnt=%d\n", cnt);
	DEBUG_PRINTF("-page=%d\n", page);
	DEBUG_PRINTF("-top=%d\n", top);
	DEBUG_PRINTF("-curitem=%d\n", curitem);
	DEBUG_PRINTF("-select=%d\n", OSD_GetObjListSingleSelect(ol));
	
	// update ap_list selected item info (cursor, highlight positions)
	ap_list_item_sel = curitem;
	ap_list_top = top;
    	ap_list_pos = ap_list_item_sel-ap_list_top;

	
	for(i=0;i<page;i++)
	{
		item = (CONTAINER*)wifilist_items[i];
		index = top + i;
		
		if(index< cnt)
		{
			valid_idx = 1;
		}
		else
		{
			valid_idx = 0;	
		}

		/* AP IDX */
		txt = (PTEXT_FIELD)OSD_GetContainerNextObj(item);
		#if 1
		if(valid_idx)
		{
			OSD_SetTextFieldContent(txt, STRING_NUMBER, (UINT32) (index + 1));
		}
		else
		{
			OSD_SetTextFieldContent(txt,STRING_ANSI,(UINT32)"");
		}
		#else
		OSD_SetTextFieldContent(txt, STRING_NUMBER, (UINT32) (index + 1));
		#endif

		/* AP Name*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
		{
			if(strlen(AP_List[index].ssid))
			{
				OSD_SetTextFieldContent(txt, STRING_ANSI,(UINT32)AP_List[index].ssid);
			}
			else
			{
				#ifdef ENABLE_HIDDEN_SSID_WIFI_AP_SCAN_LIST
				OSD_SetTextFieldContent(txt, STRING_ANSI,(UINT32)"*Hidden AP*");
				#else
				OSD_SetTextFieldContent(txt, STRING_ANSI,(UINT32)"");
				#endif
			}
		}
		else
		{
			OSD_SetTextFieldContent(txt,STRING_ANSI,(UINT32)"");
		}

		/* AP EncrytMode*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
		{
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)wifi_encrypt_str[AP_List[index].encryptMode]);
		}
		else
		{
			OSD_SetTextFieldContent(txt,STRING_ANSI,(UINT32)"");
		}

		/* Status*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		#if 1
		if(valid_idx)
		{
			OSD_SetTextFieldContent(txt, STRING_NUM_PERCENT, api_wifi_convert_signal_quality_to_percentage(AP_List[index].quality));
		}
		else
		{
			OSD_SetTextFieldContent(txt,STRING_ANSI,(UINT32)"");
		}	
		#endif
	}

	if(refresh_ap_list)
	{
		OSD_TrackObject((POBJECT_HEAD)&wifilist_olist, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);		
	}
}
Пример #28
0
static VACTION nagra2_rsa_list_keymap(POBJECT_HEAD pObj, UINT32 key)
{
	VACTION act;
	UINT16 top,curitem;
	OBJLIST* ol;
	
	ol = &nagra2_rsa_olist;
	top = OSD_GetObjListTop(ol);
	curitem = OSD_GetObjListNewPoint(ol);
	
	switch(key)
	{
	case V_KEY_UP:
		if(curitem != top)
		{
			act = VACT_CURSOR_UP;
		}
		else
		{
			act = VACT_CURSOR_PGUP;
		}
		break;			
	case V_KEY_DOWN:
		if((curitem+1)%8 != 0)
		{
			act = VACT_CURSOR_DOWN;
		}
		else
		{
			if((curitem+1) != top)
			{
				act = VACT_CURSOR_PGDN;
				OSD_ObjListChgFocus(ol,top,C_UPDATE_FOCUS);
			}
			else
			{
				act = VACT_CURSOR_DOWN;
			}
		}
		break;			
	case V_KEY_P_UP:
		act = VACT_CURSOR_PGUP;
		break;			
	case V_KEY_P_DOWN:
		act = VACT_CURSOR_PGDN;
		break;
	#if 1
	case V_KEY_RED:		
		act = VACT_NAGRA2_RSA;
		break;
	case V_KEY_GREEN:
		act = VACT_CONAX;
		break;
	case V_KEY_YELLOW:	
		act = VACT_MORE;		
		break;

	#else
	case V_KEY_RED:		
		act = VACT_NAGRA_RSA;
		break;
	case V_KEY_GREEN:
		act = VACT_NAGRA2_RSA;
		break;
	case V_KEY_YELLOW:	
		act = VACT_CONAX;		
		break;
	case V_KEY_BLUE:
		act = VACT_MORE;
		break;	
	#endif
	case V_KEY_ENTER:
		act = VACT_patch_EDIT_WIN;
		break;
	default:
		act = VACT_PASS;
	}

	return act;		

}
Пример #29
0
static VACTION cryptowork_list_keymap(POBJECT_HEAD pObj, UINT32 key)
{
	VACTION act;
	UINT16 top,curitem;
	OBJLIST* ol;
	
	ol = &cryptowork_olist;
	top = OSD_GetObjListTop(ol);
	curitem = OSD_GetObjListNewPoint(ol);
	
	switch(key)
	{
	case V_KEY_UP:
		if(curitem != top)
		{
			act = VACT_CURSOR_UP;
		}
		else
		{
			act = VACT_CURSOR_PGUP;
		}
		break;			
	case V_KEY_DOWN:
		if((curitem+1)%8 != 0)
		{
			act = VACT_CURSOR_DOWN;
		}
		else
		{
			if((curitem+1) != top)
			{
				act = VACT_CURSOR_PGDN;
				OSD_ObjListChgFocus(ol,top,C_UPDATE_FOCUS);
			}
			else
			{
				act = VACT_CURSOR_DOWN;
			}
		}
		break;			
	case V_KEY_P_UP:
		act = VACT_CURSOR_PGUP;
		break;			
	case V_KEY_P_DOWN:
		act = VACT_CURSOR_PGDN;
		break;	
	case V_KEY_RED:		
		act = VACT_BISS;
		break;
	case V_KEY_GREEN:
		act = VACT_CRYPTOWORK;
		break;
  //added by Eric.Ren, for updata TP list from net(kingofsat) ,2010.7.23
	case V_KEY_YELLOW:	
		act = VACT_DIRECT_CW;		
		break;
	case V_KEY_BLUE:
		act = VACT_MORE;
		break;		
	case V_KEY_ENTER:
		act = VACT_patch_EDIT_WIN;
		break;
	default:
		act = VACT_PASS;
	}

	return act;		

}
Пример #30
0
static void mail_disp()
{
	UINT32 i, valid_idx;
	UINT32 MJD_Date;
	UINT16 UTC_Date[3];
	UINT8 K;
	UINT8 asc_str[100];
	UINT16 top, cnt, page, index, strid,iconID;
	UINT16 mail_title[40+1], date[20];
	UINT8 str[6];//-----yuanlin
	BOOL del_flag;
	OBJLIST *ol;
	CONTAINER *item;
	TEXT_FIELD *txt;
	BITMAP *bmp;

	ol = &mail_ol;

	cnt = OSD_GetObjListCount(ol);
	page = OSD_GetObjListPage(ol);
	top = OSD_GetObjListTop(ol);

	for (i = 0; i < page; i++)
	{
		item = (CONTAINER*)mail_ol_ListField[i];
		index = top + i;
		del_flag = FALSE;

		valid_idx = (index < cnt) ? 1 : 0;
		if (valid_idx)
		{
			del_flag = mail_get_del_flag(index);
		}

		/* IDX */
		txt = (TEXT_FIELD*)OSD_GetContainerNextObj(item);
		if (valid_idx)
		{
			sprintf(str, "%02d", index + 1);
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);
		}
		else
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)"");
         
		/*mail title*/
		txt = (TEXT_FIELD*)OSD_GetObjpNext(txt);
		if (valid_idx)
		{
			convert_gb2312_to_unicode(email_head[index].title, 40+1, mail_title, 40+1);
			OSD_SetTextFieldContent(txt, STRING_UNICODE, (UINT32)mail_title);
		}
		else
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)"");
		wincom_scroll_textfield_stop(txt);



		
		/* time */
		txt = (TEXT_FIELD*)OSD_GetObjpNext(txt);
		if (valid_idx)
		{
			#if 1
			MEMSET(len_display_str, 0, sizeof(len_display_str));
			MJD_Date = email_head[index].create_Time[0]*256 + email_head[index].create_Time[1];
			UTC_Date[0] = ( MJD_Date-15078.2 )/365.25;//MJD算法计算发行年份
			UTC_Date[1] =  ( MJD_Date-14956.1-(UINT32)(UTC_Date[0]*365.25))/30.6001;//月份
			UTC_Date[2] = MJD_Date-14956-(UINT32)(UTC_Date[0]*365.25)-(UINT32)(UTC_Date[1]*30.6001);//日期
			if( (UTC_Date[1]==15) || (UTC_Date[1]==14) )
				K=1;
			else
				K=0;
			UTC_Date[0] += K;
			UTC_Date[1] = UTC_Date[1]-1-K*12;
			UTC_Date[0] += 1900;//Year since 1900
			
			sprintf(asc_str, "%02d%02d-%02d-%02d",(UINT8)(UTC_Date[0]/100),(UINT8)(UTC_Date[0]%100),UTC_Date[1],UTC_Date[2]);
			ComAscStr2Uni(asc_str, len_display_str);
			
			OSD_SetTextFieldContent(txt, STRING_UNICODE, (UINT32)len_display_str);
			#else
			convert_sysdate_to_uni(email_head[index].create_Time, date);
			date[16] = '\0';
			OSD_SetTextFieldContent(txt, STRING_UNICODE, (UINT32)date);
			#endif
		}
		else
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)"");
        
			/* Delete */
		bmp = (BITMAP*)OSD_GetObjpNext(txt);
		iconID = (del_flag) ?IM_TV_DEL: 0;
		OSD_SetBitmapContent(bmp, iconID);
         
	}
}