示例#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_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;
}
示例#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;
}
示例#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;
}
示例#5
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;
}
示例#6
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;
}
示例#7
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;
}
示例#8
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;
}
示例#9
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;
}
示例#10
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;
}
示例#11
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;
}