Example #1
0
static VACTION weathercitylst_list_keymap(POBJECT_HEAD pObj, UINT32 key)
{
	VACTION act;
	OBJLIST* ol;
	
	ol = &weather_city_olist;
	
	switch(key)
	{
		case V_KEY_UP:
			act = VACT_CURSOR_UP;
			break;			
		case V_KEY_DOWN:
			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:
			if (OSD_GetObjListCount(ol) > 0)
			{
				act = VACT_CITY_EDIT;
			}
			break;
		case V_KEY_GREEN:
			act = VACT_CITY_ADD;
			break;
		case V_KEY_BLUE:
			if (OSD_GetObjListCount(ol) > 0)
			{
				act = VACT_CITY_DEL;
			}
			break;
		case V_KEY_ENTER:
		case V_KEY_RIGHT:
			if (OSD_GetObjListCount(ol) > 0)
			{
				act = VACT_CITY_ENTER;
			}
			break;
		default:
			act = VACT_PASS;
	}

	return act;
}
Example #2
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)"");
		}
		
	}
}
Example #3
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;
}
Example #4
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;
}
Example #5
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)"");
	}
	
}
Example #6
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)"");
	}
	
}
Example #7
0
static PRESULT mail_unknow_proc(VACTION act)
{
	PRESULT ret = PROC_LOOP;
	UINT16 i,sel, cnt;
	OBJLIST *ol;
	POBJECT_HEAD temp;
    UINT8 back_saved;
	ol = &mail_ol;
	sel = OSD_GetObjListCurPoint(ol);
	cnt = OSD_GetObjListCount(ol);

	switch (act)
	{
		case VACT_DELETE_SINGLE:
			  	{
				mail_del_type = 0;
			   //if(email_count > 0)
                     //{
                   // win_compopup_init(WIN_POPUP_TYPE_OKNO);
	                //win_compopup_set_msg(NULL, NULL, RS_MAIL_POP_DEL_CURRENT);
                    //win_compopup_open_ext(&back_saved);
                    
        			mail_set_del_flag(sel);
					//mail_exec_delete();  //yuanlin change
        			OSD_TrackObject((POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
                     //}
			  }
			break;
		case VACT_DELETE_ALL:
			mail_del_type = 1;
			{	
			    //win_compopup_init(WIN_POPUP_TYPE_OKNO);
	            //win_compopup_set_msg(NULL, NULL, RS_MAIL_POP_DEL_ALL);
				//win_compopup_open_ext(&back_saved);
				mail_set_del_flag(0xffff);//set all to delete
				//mail_exec_delete();  //yuanlin change
				OSD_TrackObject((POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
			};        //----yuanlin
			break;
		case VACT_ENTER:
			 if (0 == email_count)
			 break;                                 //  ---yuanlin
			cur_mail_id = sel;
			temp = (POBJECT_HEAD)&g_win_mail_content; //进入到Win_mail_content界面
			if (OSD_ObjOpen(temp, 0xFFFFFFFF) != PROC_LEAVE)
			{
				menu_stack_push(temp);
				if(email_head[sel].status)
				 	email_count_unread--;
				//MailDrawNum0();         //yuanlin 21013/02/04
			}
			
			break;
		default:
			break;
	}
	return ret;
}
Example #8
0
static void detitle_set_alldel_flag()
{
    OBJLIST* ol;
    UINT16 cnt,i=0;
    ol = &detitle_olist;
    cnt = OSD_GetObjListCount(ol);
    for(i=0; i<cnt; i++)
    {
        del_detitle_idx[i]=1;
    }
}
Example #9
0
void win_detitle_list_display()
{
    CONTAINER* con;
    TEXT_FIELD* text;
    OBJLIST* ol;
    UINT16 index, cnt,iconID;
    BITMAP *bmp;
    ol = &detitle_olist;
    cnt = OSD_GetObjListCount(ol);
    BOOL del_flag;
    //argly :), may remove status item later
    OSD_SetTextFieldContent(&detitle_status0, STRING_ID, (UINT32)0);
    OSD_SetTextFieldContent(&detitle_status1, STRING_ID, (UINT32)0);
    OSD_SetTextFieldContent(&detitle_status2, STRING_ID, (UINT32)0);
    OSD_SetTextFieldContent(&detitle_status3, STRING_ID, (UINT32)0);
    OSD_SetTextFieldContent(&detitle_status4, STRING_ID, (UINT32)0);
    OSD_SetTextFieldContent(&detitle_status5, STRING_ID, (UINT32)0);
    OSD_SetTextFieldContent(&detitle_status6, STRING_ID, (UINT32)0);
    OSD_SetTextFieldContent(&detitle_status7, STRING_ID, (UINT32)0);
    OSD_SetTextFieldContent(&detitle_status8, STRING_ID, (UINT32)0);
    OSD_SetBitmapContent(&ca_detitle_delete_0, 0);
    OSD_SetBitmapContent(&ca_detitle_delete_1, 0);
    OSD_SetBitmapContent(&ca_detitle_delete_2, 0);
    OSD_SetBitmapContent(&ca_detitle_delete_3, 0);
    OSD_SetBitmapContent(&ca_detitle_delete_4, 0);
    OSD_SetBitmapContent(&ca_detitle_delete_5, 0);
    OSD_SetBitmapContent(&ca_detitle_delete_6, 0);
    OSD_SetBitmapContent(&ca_detitle_delete_7, 0);
    OSD_SetBitmapContent(&ca_detitle_delete_8, 0);
    for(index=0; index<cnt; index++)
    {
        con = (CONTAINER*)detitle_olist_ListField[index];

        del_flag = detitle_get_del_flag(index);

        /* index */
        text = (TEXT_FIELD*)OSD_GetContainerNextObj(con);
        OSD_SetTextFieldContent(text, STRING_NUMBER, Detitle_Chknum[index]);

        /* status**/
        text = (TEXT_FIELD*)OSD_GetObjpNext(text);
        OSD_SetTextFieldContent(text, STRING_ID, (UINT32)RS_DETITLE_STATUS_READED);

        /* detitle confirm code**/
        //text = (TEXT_FIELD*)OSD_GetObjpNext(text);
        //OSD_SetTextFieldContent(text, STRING_NUMBER, (UINT32)Detitle_Chknum[index]);
        /* Delete */
        bmp = (BITMAP*)OSD_GetObjpNext(text);
        iconID = (del_flag) ?IM_TV_DEL: 0;
        OSD_SetBitmapContent(bmp, iconID);
    }

}
Example #10
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)"");
	}    
}
Example #11
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;
}
Example #12
0
void win_multifeed_change_feed()
{
	OBJLIST* ol;	
	UINT16 sel;
	UINT16 cur_channel = sys_data_get_cur_group_cur_mode_channel();
	
	ol = &multifeed_ol;
	if(OSD_GetObjListCount(ol) == 0)
		return;

	sel = OSD_GetObjListSingleSelect(ol);
      
	if(SUCCESS == multifeed_change_feed(cur_channel, sel))
	{
		api_play_channel(cur_channel, TRUE, TRUE,FALSE);
	}
}
Example #13
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)"");
	}    
}
Example #14
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)"");
        
	}    
}
Example #15
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;
}
Example #16
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)"");
	}
}
Example #17
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)"");
	}    
}
Example #18
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;
}
Example #19
0
static PRESULT IPPVinfo_list_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	OBJLIST* ol;

	UINT16 cnt;

	ol = &IPPVinfo_olist;
	cnt = OSD_GetObjListCount(ol);

	switch(event)
	{
		case EVN_PRE_DRAW:
			if (cnt==0)
				ret = PROC_LOOP;
			break;
		case EVN_POST_DRAW:
			break;
		default:
			break;

	}
	return ret;
}
Example #20
0
static PRESULT movefile_item_enter(UINT16 uIdx)
{
	PRESULT ret = PROC_LOOP;
	BOOL bRoot;
	char str_name[FULL_PATH_SIZE],str_txt[FULL_PATH_SIZE];
	FileInfo file_node;
	POBJLIST pOl;
	TEXT_FIELD *pTxt;
	UINT8 back_saved;

	bRoot = win_check_openroot(win_move_dirlist);
	if((uIdx == 0) && (bRoot == FALSE))
	{//TODO:Exit to up dir		

		get_file_list_info(win_move_dirlist, &movefile_dirnum, &movefile_filenum, str_name);
		win_get_parent_dirname(str_txt, str_name);
		win_compopup_init(WIN_POPUP_TYPE_SMSG);
		win_compopup_set_frame(200, 200, 200, 100);
		win_compopup_set_msg(NULL, NULL,RS_DISPLAY_PLEASE_WAIT);
		win_compopup_open_ext(&back_saved);
		read_folder_to_file_list(win_move_dirlist, str_txt);
		win_compopup_smsg_restoreback();
		bRoot = win_check_openroot(win_move_dirlist);
		if(bRoot)
		{
			file_list_change_device(win_move_dirlist, movefile_cur_device);
		}
		movefile_curidx = win_get_file_idx(win_move_dirlist, str_name);
		if(movefile_curidx == (UINT16)(~0))
			movefile_curidx = 0;
		
		get_file_list_info(win_move_dirlist, &movefile_dirnum, &movefile_filenum, str_name);
		pTxt = &mpmove_dir_txt;
		win_get_display_dirname(str_txt, str_name);//get dirname to show
		OSD_SetTextFieldContent(pTxt,STRING_UTF8,(UINT32)str_txt);
		OSD_DrawObject((POBJECT_HEAD)pTxt,C_UPDATE_ALL);

		pOl  = &ol_mpmove;
		movefile_curidx = movefile_curidx + (bRoot?0:1);
		OSD_SetObjListCurPoint(pOl, movefile_curidx);
		OSD_SetObjListNewPoint(pOl, movefile_curidx);
		OSD_SetObjListTop(pOl, movefile_curidx);
		if(bRoot == TRUE)
			OSD_SetObjListCount(pOl, (movefile_dirnum + movefile_filenum));//to show it's child dir
		else
			OSD_SetObjListCount(pOl, (movefile_dirnum + movefile_filenum + 1));//to show it's child dir
		if(OSD_GetObjListCount(pOl) <= MV_ITEM_CNT)
			OSD_SetObjListTop(pOl, 0);
		OSD_TrackObject((POBJECT_HEAD)pOl, C_UPDATE_ALL | C_DRAW_SIGN_EVN_FLG);
		return ret;
	}

	if(!bRoot)
	{
		uIdx--;
	}
	
	get_file_from_file_list(win_move_dirlist, uIdx+1, &file_node);
	if(file_node.filetype == F_DIR)
	{
		//TODO: Enter child directory & retrive items,set not_root flag
		win_get_fullname(str_name, file_node.path, file_node.name);
		win_compopup_init(WIN_POPUP_TYPE_SMSG);
		win_compopup_set_frame(200, 200, 200, 100);
		win_compopup_set_msg(NULL, NULL,RS_DISPLAY_PLEASE_WAIT);
		win_compopup_open_ext(&back_saved);
		read_folder_to_file_list(win_move_dirlist, str_name);
		win_compopup_smsg_restoreback();

		get_file_list_info(win_move_dirlist, &movefile_dirnum, &movefile_filenum, str_name);

		pTxt = &mpmove_dir_txt;
		win_get_display_dirname(str_txt, str_name);//get dirname to show
		OSD_SetTextFieldContent(pTxt,STRING_UTF8,(UINT32)str_txt);
		OSD_DrawObject((POBJECT_HEAD)pTxt,C_UPDATE_ALL);

		movefile_curidx = 0;
		pOl  = &ol_mpmove;
		OSD_SetObjListCount(pOl, (movefile_dirnum + movefile_filenum + 1));//to show it's child dir
		OSD_SetObjListCurPoint(pOl, movefile_curidx);
		OSD_SetObjListNewPoint(pOl, movefile_curidx);
		OSD_SetObjListTop(pOl, movefile_curidx);
		OSD_TrackObject((POBJECT_HEAD)pOl, C_UPDATE_ALL | C_DRAW_SIGN_EVN_FLG);
	}
	else
	{
		//TODO:soc_printf("not dir!!\n");
	}

	return ret;
}
Example #21
0
static PRESULT win_detitle_list_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
    PRESULT ret = PROC_PASS;
    VACTION unact;
    OBJLIST* ol;
    POBJECT_HEAD temp;
    UINT8 back_saved, deldtl;

    UINT16 cnt,curitem,top,ret2,i;

    ol = &detitle_olist;
    curitem = OSD_GetObjListCurPoint(ol);
    cnt = OSD_GetObjListCount(ol);

    switch(event)
    {
    case EVN_PRE_DRAW:
        win_detitle_list_display();
        break;
    case EVN_POST_DRAW:
        break;
    case EVN_UNKNOWN_ACTION:
        unact = (VACTION)(param1>>16);

        if (unact == VACT_DEL_SINGLE_DETITLE)
        {
            if(cnt!=0)
            {
                detitle_set_del_flag(curitem);
                OSD_TrackObject((POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
            }
            /*win_compopup_init(WIN_POPUP_TYPE_OKNO);
            win_compopup_set_msg(NULL, NULL, RS_DETITLE_DELPOP_CURRENT);
            win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
            ret2= win_compopup_open_ext(&back_saved);
            if (ret2 == WIN_POP_CHOICE_YES)
            {
            	//to do
            	deldtl = CDCASTB_DelDetitleChkNum(current_operator_ID, Detitle_Chknum[curitem]);
            	if (FALSE == deldtl)
            	{
            		win_popup_msg(NULL, NULL, RS_OPERATION_ERROR);
            	}
            	ret = PROC_LEAVE;
            }*/
        }
        else if(unact == VACT_DEL_ALL_DETITLE)
        {
            detitle_set_alldel_flag();
            OSD_TrackObject((POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
            /*win_compopup_init(WIN_POPUP_TYPE_OKNO);
            win_compopup_set_msg(NULL, NULL, RS_DETITLE_DELPOP_ALL);
            win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
            ret2= win_compopup_open_ext(&back_saved);
            if (ret2 == WIN_POP_CHOICE_YES)
            {
            	//to do
            	deldtl = CDCASTB_DelDetitleChkNum(current_operator_ID, 0);
            	if (FALSE == deldtl)
            	{
            		win_popup_msg(NULL, NULL, RS_OPERATION_ERROR);
            	}
            	ret = PROC_LEAVE;
            }*/
        }
        break;

    }
    return ret;
}
Example #22
0
static void win_tplist_set_display(void)
{
	char str[20];
	UINT16 pol_strID;
	UINT16 top,cnt,page,index,curitem;
	UINT32 i,n;
	UINT32 valid_idx;
	S_NODE s_node;
	T_NODE t_node;
	OBJLIST* ol;
	CONTAINER* item;	
	TEXT_FIELD* txt;


	ol = &tplst_olist;

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

	get_tuner_sat(TUNER_EITHER, cur_tp_sat_idx, &s_node);

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

		if(valid_idx)
			get_tp_at(s_node.sat_id,index,&t_node);

		/* TP IDX */
		txt = (PTEXT_FIELD)OSD_GetContainerNextObj(item);
		if(valid_idx)
			sprintf(str,"%d",index + 1);
		else
			STRCPY(str,"");
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);

		/* Freq*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
			sprintf(str,"%5dMHz",t_node.frq);
		else
			STRCPY(str,"");
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);

		/* Symb */
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
			sprintf(str,"%5dKs/s",t_node.sym);
		else
			STRCPY(str,"");
		OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);

		/* pol */
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(!valid_idx)
			pol_strID = 0;
		else if(t_node.pol == 0)
			pol_strID = RS_INFO_POLARITY_H;
		else
			pol_strID = RS_INFO_POLARITY_V;
		OSD_SetTextFieldContent(txt, STRING_ID, (UINT32)pol_strID);
		
		
	
	}

}
Example #23
0
/*
static void win_operator_IPPV_draw(GUI_RECT* pRect,UINT16 strid)
{
	TEXT_FIELD* txt;
	UINT16 *string;
	
	//index: 0 for title, 1~9 for list item
	txt = &IPPVinfo_title;
	OSD_SetRect2(&txt->head.frame,pRect);
	
	if (txt->pString != NULL)
	{
		txt->pString = NULL;
	}
	OSD_SetTextFieldContent(txt, STRING_ID, (UINT32)strid);
	
	OSD_DrawObject((POBJECT_HEAD)txt, C_UPDATE_ALL);
}

void	win_ippv_draw_title(void)
{
	UINT8 i;

	for (i=0;i<6;i++)
	{
		win_operator_IPPV_draw(&win_ippv_title_rect[i], win_ippv_title_string[i]);
	}
}
*/
static void ippv_txt_info_display(UINT16 info_idx,PCONTAINER pCon)	
{
	UINT8 i,j,date[11];
	UINT16 top,index, curitem,count,strid=0;
	PTEXT_FIELD pTxt;
	OBJLIST *ol = &IPPVinfo_olist;
	PCONTAINER ppcon;
	
	curitem = OSD_GetObjListCurPoint(ol);
	count = OSD_GetObjListCount(ol);
	top  = OSD_GetObjListTop(ol);
	index = top +info_idx -1; //for container index is 1,2,....9

	ppcon = pCon;
	if (count == 0)
	{
		IPPVINFO_PRINT("@@@@ippv_txt_info_display: list count is 0!\n ");
	}
	else if (index<count)
	{
		for(i = 0;i < IPPVINFO_ITEM_TXT_CNT; i++)
		{
			pTxt= IPPVinfo_listtxt[i];
			OSD_SetObjRoot(pTxt,ppcon);
			OSD_SetContainerFocus(ppcon,1);
			OSD_SetObjRect(pTxt, pTxt->head.frame.uLeft, ppcon->head.frame.uTop, pTxt->head.frame.uWidth, pTxt->head.frame.uHeight);
					
			if (i==0)//operator id
			{
				OSD_SetTextFieldContent(pTxt, STRING_NUMBER, (UINT32)current_operator_ID);
				OSD_SetContainerNextObj(ppcon, pTxt);
			}

			if (i==1)//slot id
			{
				OSD_SetTextFieldContent(pTxt, STRING_NUMBER, (UINT32)IPPV_program_info[index].m_bySlotID);
			}
			if (i==2)//prog id
			{
				OSD_SetTextFieldContent(pTxt, STRING_NUMBER, (UINT32)IPPV_program_info[index].m_dwProductID);
			}
			if (i==3)//booking status
			{
				switch(IPPV_program_info[index].m_byBookEdFlag)
				{
					case CDCA_IPPVSTATUS_BOOKING:  // 1 for booking
						strid = 0;
						break;
					case 2: // 2 for expired????? (how to confirm??)
						strid = 0;
						break;
					case CDCA_IPPVSTATUS_VIEWED: // 3 for viewed
						strid = RS_IPPV_STATUS_VIEWED;
						break;
				}
				OSD_SetTextFieldContent(pTxt, STRING_ID, (UINT32)strid);
			}
			if (i==4)//tape
			{
				OSD_SetTextFieldContent(pTxt, STRING_ANSI, (UINT32)((IPPV_program_info[index].m_bCanTape)?"Yes":"No"));
			}
			if (i==5)//price
			{
				OSD_SetTextFieldContent(pTxt, STRING_NUMBER, (UINT32)IPPV_program_info[index].m_wPrice);
			}
			if (i==6)//expired time
			{
				YMD_calculate(IPPV_program_info[index].m_wExpiredDate, date);
				OSD_SetTextFieldContent(pTxt, STRING_ANSI, (UINT32)date);
			}
		}
		
		if ((curitem%9) == (info_idx-1))
			OSD_TrackObject((POBJECT_HEAD)ppcon, C_UPDATE_ALL);
		else
			OSD_DrawObject((POBJECT_HEAD)ppcon, C_UPDATE_ALL);
	}

	else 
	{
		for(i = 0;i < IPPVINFO_ITEM_TXT_CNT; i++)
		{
			pTxt= IPPVinfo_listtxt[i];
			OSD_SetObjRoot(pTxt,ppcon);
			OSD_SetObjRect(pTxt, pTxt->head.frame.uLeft, ppcon->head.frame.uTop, pTxt->head.frame.uWidth, pTxt->head.frame.uHeight);
			if (3==i)
				OSD_SetTextFieldContent(pTxt, STRING_ID, (UINT32)0);
			else
				OSD_SetTextFieldContent(pTxt, STRING_ANSI, (UINT32)"");
		}
	}
}
Example #24
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	
	}
Example #25
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);		
	}
}
Example #26
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);
         
	}
}
Example #27
0
static void SNstate_addr_list_display(BOOL updata)
{
	CONTAINER* con;
	TEXT_FIELD* text;
	OBJLIST* ol;
	UINT16 i,top,cnt,page,index,curitem,valid_idx;	
	SYSTEM_DATA *p_sys_data = sys_data_get();
	char sstat[21]={0},nstat[64]={0},ret=0;
	
	ol = &ol_SNstate_addr;

	cnt = OSD_GetObjListCount(ol);
	page = OSD_GetObjListPage(ol); 
	top = OSD_GetObjListTop(ol);
	curitem = OSD_GetObjListNewPoint(ol);
	
	for(i=0;i<page;i++)
	{
		con = (CONTAINER *)SNstate_addr_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)
			{
			if(i==0)
				OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)"S:");
			else
				OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)"N:");
			}
		else
			OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)"");

		/* Name**/
		text = (TEXT_FIELD*)OSD_GetObjpNext(text);
		
		if(valid_idx)
		{
			if(i==0)
			{
			ret=getSState(sstat);
			if(ret==1)
				OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)sstat);
			else
				OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)"Error");
			}
			else
			{
			ret=getNState(nstat);
			if(ret==1)
				OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)nstat);
			else
				OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)"Error");
			}
		}
			
		else
			OSD_SetTextFieldContent(text, STRING_ANSI, (UINT32)"");
	}  

	if(updata)
		OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
}
Example #28
0
static VACTION map_city_list_keymap(POBJECT_HEAD pObj, UINT32 key)
{
	VACTION act;
	OBJLIST* ol = &ol_map_city;

	switch(key)
	{
		case V_KEY_UP:
			if (!bMapDownloading)
			act = VACT_CURSOR_UP;
			break;			
		case V_KEY_DOWN:
			if (!bMapDownloading)
			act = VACT_CURSOR_DOWN;
			break;			
		case V_KEY_P_UP:
			if (!bMapDownloading)
			act = VACT_CURSOR_PGUP;
			break;			
		case V_KEY_P_DOWN:
			if (!bMapDownloading)
			act = VACT_CURSOR_PGDN;
			break;	
		case V_KEY_ENTER:
			if (bMapDownloading)
			{
				break;
			}
			if (OSD_GetObjListCount(ol) > 0)
			{
				act = VACT_MAP_CITY_DOWNLOAD;
			}
			break;
		case V_KEY_RED:
			if (bMapDownloading)
			{
				break;
			}
			if (OSD_GetObjListCount(ol) > 0)
			{
				act = VACT_MAP_CITY_EDIT;
			}
			break;
		case V_KEY_GREEN:
			if (bMapDownloading)
			{
				break;
			}
			act = VACT_MAP_CITY_ADD;
			break;
		case V_KEY_YELLOW:
			if (bMapDownloading)
			{
				break;
			}
			if (OSD_GetObjListCount(ol) > 0)
			{
				act = VACT_MAP_CITY_DEL;
			}
			break;
		case V_KEY_BLUE:
			if (bMapDownloading)
			{
				break;
			}
			act = VACT_MAP_SEARCH;
			break;	
		default:
			act = VACT_PASS;
			break;
	}

	return act;
}
Example #29
0
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;
}
Example #30
0
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;
}