예제 #1
0
static PRESULT nagra2_list_item_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	BITMAP	*newBmp,*curBmp,*bmp;
	UINT8	bID ;
	UINT16  icon_id;
	

 	bID = OSD_GetObjID(pObj);

	bmp = (BITMAP*)OSD_GetFocusObject(pObj);
	
	switch(event)
	{
	case EVN_ITEM_PRE_CHANGE:

		newBmp = (BITMAP*)param1;
		curBmp = (BITMAP*)param2;
		if(newBmp != curBmp)
		{
			newBmp->head.style.bHLIdx = BMP_HLEDIT_IDX;
			curBmp->head.style.bHLIdx = BMP_HL_IDX;
		}
		win_nagra2_check_focusID(OSD_GetObjID(newBmp));
		break;
	}

	return ret;

}
예제 #2
0
static PRESULT ad_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
    PRESULT ret = PROC_PASS;
    CONTAINER* root = (CONTAINER*) pObj;

    switch(event)
    {
    case EVN_PRE_OPEN:
#ifdef EXIT_KEY_EXIT_ALL_MENU
        exit_key_flag =  FALSE;
#endif
#ifdef PREVIEW_SUBMENU  //-a by wangyang 
        {

            POBJECT_HEAD focusObj=OSD_GetFocusObject(pObj);

            if(param2==MENU_OPEN_TYPE_OTHER)
            {
                ad_menu_sels[focusObj->bID-1]->style.bHLIdx=SEL_SH_IDX;
                ad_menu_txts[focusObj->bID-1]->style.bHLIdx=TXT_SH_IDX;
            }
            else
            {
                ad_menu_sels[focusObj->bID-1]->style.bHLIdx=SEL_HL_IDX;
                ad_menu_txts[focusObj->bID-1]->style.bHLIdx=TXT_HL_IDX;
            }

        }
#endif
        win_ad_load_setting();
        wincom_open_subtitle(pObj, /*RS_AUDIO_DESCRIPTION_SETTING*/RS_AUDIO_DESCRIPTION, 0);
        break;
    case EVN_POST_OPEN:
        wincom_open_commen_help(pObj);//-a by wangyang
        break;
    case EVN_PRE_CLOSE:
        sys_data_save(1);
        *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG; /* Make OSD not flickering */
        break;
    case EVN_POST_CLOSE:
        wincom_close_subtitle();
        OSD_ClearScreen();
#ifdef EXIT_KEY_EXIT_ALL_MENU
        if( exit_key_flag == TRUE)
        {
            exit_key_flag =FALSE;
            mm_leave_all_menu();
        }
#endif
        //OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL);
        break;
    case EVN_MSG_GOT:
        break;
    default:
        break;
    }

    return ret;
}
예제 #3
0
static PRESULT lan_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT32 i;
	UINT8	unact;
	BOOL subt_popup;
	CONTAINER* cont = (CONTAINER*)pObj;
	UINT8	id = OSD_GetObjID(pObj);
	SYSTEM_DATA* p_sys_data;
	UINT8 lang_code[8];
    
	switch(event)
	{
	case EVN_PRE_OPEN:
#ifdef EXIT_KEY_EXIT_ALL_MENU
	         exit_key_flag =  FALSE;
#endif
		wincom_open_subtitle((POBJECT_HEAD)&win_lan_con,RS_SYSTEM_LANGUAGE, 0);
#ifdef SHOW_WELCOME_SCREEN
		if(show_win_as_welcome)
		//if(1)
		{
			OSD_SetAttr(&lan_item_con6, C_ATTR_ACTIVE);
			((POBJECT_HEAD)(&lan_item_con1))->bUpID = 6;
			((POBJECT_HEAD)(&lan_item_con5))->bDownID = 6;
            //win_lan_con.head.style.bShowIdx = WSTL_WIN_BODYLEFT_01_HD;
            //win_lan_con.head.style.bHLIdx = WSTL_WIN_BODYLEFT_01_HD;
           // win_lan_con.head.style.bSelIdx = WSTL_WIN_BODYLEFT_01_HD;
           // win_lan_con.head.style.bGrayIdx = WSTL_WIN_BODYLEFT_01_HD;
            OSD_SetRect(&(win_lan_con.head.frame), MAIN_W_L, W_T, MAIN_W_W, W_H);
		}
		else
		{
			OSD_SetAttr(&lan_item_con6, C_ATTR_HIDDEN);
			((POBJECT_HEAD)(&lan_item_con1))->bUpID = 5;
			((POBJECT_HEAD)(&lan_item_con5))->bDownID = 1;
            win_lan_con.head.style.bShowIdx = WIN_SH_IDX;
            win_lan_con.head.style.bHLIdx = WIN_HL_IDX;
            win_lan_con.head.style.bSelIdx = WIN_SL_IDX;
            win_lan_con.head.style.bGrayIdx = WIN_GRY_IDX;

            OSD_SetRect(&(win_lan_con.head.frame), W_L, W_T, W_W, W_H);
    		//remove_menu_item(&win_lan_con, (OBJECT_HEAD *)&lan_item_con6, CON_H + CON_GAP);
			
		}
         ((CONTAINER*)(&win_lan_con))->FocusObjectID = 1;
#endif

		p_sys_data=sys_data_get();
//libc_printf("\nmmmmm-lan_open--mmmmmmm==%d\n",p_sys_data->lang.OSD_lang);
		win_lan_set_menu_lan_string(p_sys_data->lang.OSD_lang);
		win_lan_set_1st_audio_lan_string(p_sys_data->lang.Audio_lang_1);
		win_lan_set_2nd_audio_lan_string(p_sys_data->lang.Audio_lang_2);
		win_lan_set_subtitle_lan_string(p_sys_data->lang.sub_lang);
		win_lan_set_teletext_lan_string(p_sys_data->lang.ttx_lang);
#ifdef ORDER_GZ1207009
		win_lan_set_epg_lan_string(p_sys_data->lang.epg_lang);
#endif

#ifdef SUPPORT_POP_SUBT
		subt_popup = TRUE;
#else
		subt_popup = FALSE;
#endif

#ifdef PREVIEW_SUBMENU  //-a by wangyang 
{
				
			POBJECT_HEAD focusObj=OSD_GetFocusObject(pObj);
			
			if(param2==MENU_OPEN_TYPE_OTHER)
			{
				lan_item_set[focusObj->bID-1]->style.bHLIdx=TXTS_SH_IDX;
				lan_item_name[focusObj->bID-1]->style.bHLIdx=TXTN_SH_IDX;
			}
			else
			{
				lan_item_set[focusObj->bID-1]->style.bHLIdx=TXTS_HL_IDX;
				lan_item_name[focusObj->bID-1]->style.bHLIdx=TXTN_HL_IDX;
			}

}
#endif

	/*	if(subt_popup) //-d by wangyang  for add subtitle language
		{
			remove_menu_item(&win_lan_con, (POBJECT_HEAD)lan_items[3], (CON_H + CON_GAP));			
		}*/
		break;
	
	case EVN_POST_OPEN:
		wincom_open_commen_help(pObj);//-a by wangyang 
		break;
		
	case EVN_PRE_CLOSE:
#ifdef EPG_MULTI_LANG
#ifndef ORDER_GZ1207009
		/*set epg language*/
		p_sys_data = sys_data_get();
		STRCPY(lang_code,stream_iso_639lang_abbr[p_sys_data->lang.OSD_lang]);
		epg_set_lang_code(lang_code);
#endif
#endif

#ifndef NEW_DEMO_FRAME
		UIChChgApplyAudLanguage();
#endif
//libc_printf("\nmmmmm---mmmmmmm==%d\n",p_sys_data->lang.OSD_lang);
		sys_data_save(1);
		/* Make OSD not flickering */
		*((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG;	
		
		break;

	case EVN_POST_CLOSE:
              TTXEng_set_g0_set();
  		wincom_close_subtitle();
			OSD_ClearScreen();
#ifdef EXIT_KEY_EXIT_ALL_MENU
	        if( exit_key_flag == TRUE)
	        	{
 			 exit_key_flag =FALSE;
			mm_leave_all_menu();
		}
#endif
		//OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL);
		break;
	}
	return ret;
}
예제 #4
0
static PRESULT sys_backup_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	CONTAINER* cont = (CONTAINER*)pObj;
	UINT8	id = OSD_GetObjID(pObj);
	OSD_RECT rect;
	UINT32 posi;
	switch(event)
	{
		case EVN_PRE_OPEN:
#ifdef PREVIEW_SUBMENU  //-a by wangyang 
			if(param2==MENU_OPEN_TYPE_OTHER)
			{
				if(focus_flag==1)
				{
					POBJECT_HEAD focusObj=OSD_GetFocusObject(pObj);
					focusObj_id =focusObj->bID;
				       OSD_SetContainerFocus((CONTAINER*)pObj,0);
					 focus_flag  =0;
				}
			}
			else
			{
			        OSD_SetContainerFocus((CONTAINER*)pObj,focusObj_id);
				focus_flag  =1;

			}
#endif
#ifdef EXIT_KEY_EXIT_ALL_MENU
	         exit_key_flag =  FALSE;
#endif
	//		win_usb_backup_tmr_loop =0;
			wincom_open_subtitle(pObj, RS_SYSTEM_BACKUP, 0);
			wincom_open_help(NULL, NULL, HELP_TYPE_RS232);
			OSD_SetProgressBarPos(&sys_backup_bar_progress,(INT16)0);
			OSD_SetTextFieldContent(&sys_backup_txt_progress, STRING_NUM_PERCENT, (UINT32)0);
			ret = win_sys_backup_init();
			break;			
		case EVN_POST_OPEN:
			system_state = SYS_STATE_USB_UPG;
		wincom_open_commen_help(pObj);//-a by wangyang 
			win_sys_backup_msg_clear();
			break;
		case EVN_PRE_CLOSE:
          	/* Make OSD not flickering */
		    *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG;	
			break;
		case EVN_POST_CLOSE:
			system_state = SYS_STATE_NORMAL;
			//wincom_close_title();
			wincom_close_subtitle();
			wincom_close_help();
			win_progress_bar_draw_bmp_close();
			OSD_ClearScreen();
#ifdef EXIT_KEY_EXIT_ALL_MENU
	        if( exit_key_flag == TRUE)
	        	{
 			 exit_key_flag =FALSE;
			mm_leave_all_menu();
		}
#endif
			//epg_init(ap_send_epg_PF_update, ap_send_epg_sch_update, ap_send_epg_detail_update);
			//OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL);
			break;
		case EVN_MSG_GOT:
			if(param1 ==  CTRL_MSG_SUBTYPE_CMD_EXIT)
			{
				ret = PROC_LEAVE;
			}
		#ifdef PREVIEW_SUBMENU  //-a by wangyang 
			if (param1 == CTRL_MSG_SUBTYPE_CMD_STO && param2 == USB_STATUS_OVER)
			{
				system_state = SYS_STATE_NORMAL;
				wincom_close_subtitle();
				OSD_ClearScreen();
				wincom_close_help();
				OSD_ClearObject( pObj, C_UPDATE_ALL);
				OSD_DrawFill(SUBMENU_W_L, SUBMENU_W_T, (SUBMENU_W_W), (SUBMENU_W_H), OSD_TRANSPARENT_COLOR, NULL);
				OSD_ObjOpen((POBJECT_HEAD)&win_rs232upg_con, MENU_OPEN_TYPE_OTHER );
				ret = PROC_LEAVE;
			}
		#endif
			if (param1 == CTRL_MSG_SUBTYPE_CMD_TIMEDISPLAYUPDATE )
			{
				/*if(start_backup==1)
				{
					win_usb_backup_tmr_loop++;
					posi = win_usb_backup_tmr_loop % PROGRESS_BAR_ICON_CNT;
					OSD_SetRect(&rect, BAR_TXT_L, BAR_TXT_T+BAR_TXT_H+4, 80, 80);
					win_progress_bar_draw_bmp(&rect,progress_bar_ids[posi]);
				}
				else
					win_progress_bar_draw_bmp_close();*/

			}

			break;		
		default:
			break;
	}
	return ret;
}
예제 #5
0
static PRESULT miscset_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	CONTAINER* root = (CONTAINER*) pObj;
	
	switch(event)
	{
	case EVN_PRE_OPEN:
#ifdef PREVIEW_SUBMENU  //-a by wangyang 
{
				
			POBJECT_HEAD focusObj=OSD_GetFocusObject(pObj);
			
			if(param2==MENU_OPEN_TYPE_OTHER)
			{
				//misc_menu_sels[focusObj->bID-1]->style.bHLIdx=SEL_SH_IDX;
				//misc_menu_txts[focusObj->bID-1]->style.bHLIdx=TXT_SH_IDX;
				misc_menu_sels[4]->style.bHLIdx=SEL_SH_IDX;
				misc_menu_txts[4]->style.bHLIdx=TXT_SH_IDX;
				#ifdef ORDER_GZ1207009
				misc_menu_sels[6]->style.bHLIdx=SEL_SH_IDX;
				misc_menu_txts[6]->style.bHLIdx=TXT_SH_IDX;
				#endif
			}
			else
			{
				//misc_menu_sels[focusObj->bID-1]->style.bHLIdx=SEL_HL_IDX;
				//misc_menu_txts[focusObj->bID-1]->style.bHLIdx=TXT_HL_IDX;
				misc_menu_sels[4]->style.bHLIdx=SEL_HL_IDX;
				misc_menu_txts[4]->style.bHLIdx=TXT_HL_IDX;
				#ifdef ORDER_GZ1207009
				misc_menu_sels[6]->style.bHLIdx=SEL_HL_IDX;
				misc_menu_txts[6]->style.bHLIdx=TXT_HL_IDX;
				#endif
			}

}
#endif
#ifdef EXIT_KEY_EXIT_ALL_MENU
	         exit_key_flag =  FALSE;
#endif
		win_miscset_load_setting();
		wincom_open_subtitle(pObj,RS_AUTO_STANDBY,0);
		break;
	case EVN_POST_OPEN:
		wincom_open_commen_help(pObj);//-a by wangyang 
		break;
	case EVN_PRE_CLOSE:
		win_miscset_save_setting();
		/* Make OSD not flickering */
		*((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG;	
		break;
	case EVN_POST_CLOSE:
  		wincom_close_subtitle();
		//OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL);
		OSD_ClearScreen();
#ifdef EXIT_KEY_EXIT_ALL_MENU
	        if( exit_key_flag == TRUE)
	        	{
 			 exit_key_flag =FALSE;
			mm_leave_all_menu();
		}
#endif
		break;
	case EVN_MSG_GOT:
 		#ifdef PREVIEW_SUBMENU  //-a by wangyang 
			if (param1 == CTRL_MSG_SUBTYPE_CMD_STO && param2 == USB_STATUS_OVER)
			{
			OSD_ObjOpen((POBJECT_HEAD)&g_win_submenu, MENU_OPEN_TYPE_OTHER );
			}
		#endif
		break;
		
	}

	return ret;
}
예제 #6
0
static PRESULT rs232upg_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	CONTAINER* cont = (CONTAINER*)pObj;
	UINT8	id = OSD_GetObjID(pObj);

	switch(event)
	{
		case EVN_PRE_OPEN:
#ifdef PREVIEW_SUBMENU  //-a by wangyang 
			if(param2==MENU_OPEN_TYPE_OTHER)
			{
				if(focus_flag==1)
				{
					POBJECT_HEAD focusObj=OSD_GetFocusObject(pObj);
					focusObj_id =focusObj->bID;
				       OSD_SetContainerFocus((CONTAINER*)pObj,0);
					 focus_flag  =0;
				}
			}
			else
			{
			        OSD_SetContainerFocus((CONTAINER*)pObj,focusObj_id);
				focus_flag  =1;

			}
#endif
#ifdef EXIT_KEY_EXIT_ALL_MENU
	         exit_key_flag =  FALSE;
#endif
			wincom_open_subtitle((POBJECT_HEAD)&win_rs232upg_con,RS_UPGRADE_MODE_RS232, 0);
			win_rs232upg_load_chunk_info();
			OSD_SetProgressBarPos(&rs232upg_bar_progress,(INT16)0);
			OSD_SetTextFieldContent(&rs232upg_txt_progress, STRING_NUM_PERCENT, (UINT32)0);

			break;
			
		case EVN_POST_OPEN:
			win_rs232upg_msg_clear();
		wincom_open_commen_help(pObj);//-a by wangyang 
			break;
		
		case EVN_PRE_CLOSE:
			win_rs232upg_clear();
			/* Make OSD not flickering */
			*((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG;	
			
			break;

		case EVN_POST_CLOSE:
	  		wincom_close_subtitle();
			OSD_ClearScreen();
#ifdef EXIT_KEY_EXIT_ALL_MENU
	        if( exit_key_flag == TRUE)
	        	{
 			 exit_key_flag =FALSE;
			mm_leave_all_menu();
		}
#endif
			//OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL);
			break;
		#ifdef PREVIEW_SUBMENU  //-a by wangyang 
  		case EVN_MSG_GOT:
			if (param1 == CTRL_MSG_SUBTYPE_CMD_STO && param2 == USB_STATUS_OVER)
			{
			OSD_ObjOpen((POBJECT_HEAD)&g_win_submenu, MENU_OPEN_TYPE_OTHER );
			}
			break;		
		#endif
	}
	return ret;
}
예제 #7
0
static PRESULT favgrplst_list_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	UINT16 uni_name[30];
	UINT8* new_name;
	OBJLIST* ol;
	UINT16 curitem;
    SYSTEM_DATA* sys_data = sys_data_get();

	ol = &favgrplist_olist;
	curitem = OSD_GetObjListNewPoint(ol);

	switch(event)
	{
	case EVN_PRE_DRAW:
		{
			POBJECT_HEAD focusObj=OSD_GetFocusObject(pObj);
			
			win_favgrplst_set_display();

#if ((!defined(OSD_15))&&(!defined(OSD_12)))
#ifdef PREVIEW_SUBMENU
			if(preview_menu)
			{
				preview_menu=0;
				OSD_SetWholeObjStyleHL(focusObj,CON_SH_IDX,TXTN_SH_IDX,0,0);
			}
			else
			{
				OSD_SetWholeObjStyleHL(focusObj,CON_SH_IDX,TXTN_HL_IDX,0,0);
			}
#endif
#endif

		}break;
	
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);
		if(unact== VACT_FAV_EDIT)
		{
			//ComAscStr2Uni(sys_data->favgrp_names[curitem], uni_name);
			MEMCPY(uni_name,(UINT16*)sys_data->favgrp_names[curitem],(FAV_GRP_NAME_LEN + 1));
#ifndef KEYBOARD_SUPPORT
			if(win_rename_open(uni_name,&new_name,favgrp_check_input_name))
#else
#if (defined(GZ1105002)||defined(GZ1105003)||defined(GZ1105004)||defined(GZ1105005)||defined(GZ1105006))	
			if(win_rename_open(uni_name,&new_name,favgrp_check_input_name))
#else
			if(win_keyboard_rename_open(uni_name,&new_name,favgrp_check_input_name))
#endif	
#endif
			{
				//ComUniStrToAsc(new_name,sys_data->favgrp_names[curitem]);
				ComUniStrCopyChar(sys_data->favgrp_names[curitem],new_name);
			}
			OSD_TrackObject((POBJECT_HEAD)&g_win_favgrplst, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
		//	wincom_open_title(pObj,RS_FAVORITE,0);
			wincom_open_subtitle(pObj,RS_FAVORITE,0);
		}
		break;
	}

	return ret;
}
예제 #8
0
static void win_satlist_set_display(void)
{
	UINT32 i,j,n,lnb_cnt;
	S_NODE s_node;
	OBJLIST* ol;
	UINT16 top,cnt,page,index,curitem;
	UINT32 valid_idx,sat_longitude,ew_flag;
	CONTAINER* item;
	TEXT_FIELD* txt;
	char str[30];
	UINT16 icon_id;
	BITMAP* bmp;
	SYSTEM_DATA* sys_data;
	UINT8	hl_idx;

	sys_data = sys_data_get();
	
#ifdef SUPPORT_TWO_TUNER
	if(sys_data->antenna_connect_type == ANTENNA_CONNECT_DUAL_DIFF)
		lnb_cnt = 2;
	else
		lnb_cnt = 1;
#endif		


	ol = &satlist_olist;

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

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

		if(valid_idx)
			get_sat_at(index,VIEW_ALL,&s_node);

		 /* Sat IDX */
		txt = (PTEXT_FIELD)OSD_GetContainerNextObj(item);
		if(valid_idx)
			OSD_SetTextFieldContent(txt, STRING_NUMBER, (UINT32) (index + 1));
		else
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)"");

		/* Sat Name*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
#ifdef DB_USE_UNICODE_STRING
			OSD_SetTextFieldContent(txt, STRING_UNICODE,(UINT32)s_node.sat_name);
#else
			OSD_SetTextFieldContent(txt, STRING_ANSI,(UINT32),s_node.sat_name);
#endif
		else
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)"");


		 /* Sat Orbit*/
		txt = (PTEXT_FIELD)OSD_GetObjpNext(txt);
		if(valid_idx)
		{
			sat_longitude = s_node.sat_orbit; 
            if(sat_longitude>1800)
            {
                sat_longitude = 3600 - sat_longitude;
                ew_flag = 0;
            }
            else
                ew_flag = 1;
            sprintf(str,"%s %d.%d",ew_flag? "E" : "W",
                sat_longitude/10, 
                sat_longitude%10);

			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str);
		}
		else
			OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)"");

#ifdef SUPPORT_TWO_TUNER
		for(j=0;j<lnb_cnt;j++)
		{
			icon_id = 0;
			if(valid_idx)
			{
				if((j==0 && s_node.tuner1_valid) || (j==1 && s_node.tuner2_valid))
				{
#ifndef SUPPORT_SELECT_SAME_SAT
					if(s_node.tuner1_valid && s_node.tuner2_valid)
					{
						s_node.tuner2_valid = 0;
						modify_sat(s_node.sat_id, &s_node);
					}
#endif /* #if0 */
					icon_id = IM_TV_FAVORITE;
				}
			}
			
			bmp = sat_lnb_sel_bmps[i][j];
			OSD_SetBitmapContent(bmp, icon_id);

			hl_idx = BMP_HL_IDX;
			if(index == curitem)
			{
				if(OSD_GetFocusObject((POBJECT_HEAD)item) == (POBJECT_HEAD)bmp)
					hl_idx = BMP_HLEDIT_IDX;
			}
			bmp->head.style.bHLIdx = hl_idx;

		}

#endif		

	}
예제 #9
0
static PRESULT pvr_setting_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8	unact;
	UINT32 i;
	BOOL subt_flag;
	CONTAINER* cont = (CONTAINER*)pObj;
	UINT8	id = OSD_GetObjID(pObj);
	static UINT8 preval;
	SYSTEM_DATA* p_sys_data;
	
	switch(event)
	{
		case EVN_PRE_OPEN:
#ifdef EXIT_KEY_EXIT_ALL_MENU
	         exit_key_flag =  FALSE;
#endif
			wincom_open_subtitle((POBJECT_HEAD)&win_osdset_con, RS_PVR_SETTING, 0);
			p_sys_data=sys_data_get();
			win_pvr_setting_timeshift_set_string(p_sys_data->timeshift);
			win_pvr_setting_jumpstep_set_string(p_sys_data->jumpstep);
			win_pvr_setting_scramble_record_mode_set_string(p_sys_data->scramble_record_mode);
            remove_menu_item(&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con3, CON_H + CON_GAP);
			win_pvr_setting_ts_file_size_set_string(p_sys_data->record_ts_file_size);
			remove_menu_item(&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con4, CON_H + CON_GAP);
			win_pvr_setting_tms2rec_set_string(p_sys_data->tms2rec);			
			win_pvr_setting_ttx_subt_set_string(p_sys_data->record_ttx_subt);
			remove_menu_item(&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con6, CON_H + CON_GAP);
			win_pvr_setting_rec_num_set_string(p_sys_data->rec_num);
			remove_menu_item(&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con7, CON_H + CON_GAP);
#ifdef NEW_DEMO_FRAME
			win_pvr_setting_record_ps_set_string(p_sys_data->rec_ps_enable);
	#ifdef SUPPORT_CAS9
			remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con5, CON_H + CON_GAP);
			remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con8, CON_H + CON_GAP);
	#endif
#else
			remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con8, CON_H + CON_GAP);
#endif
#ifdef PREVIEW_SUBMENU  //-a by wangyang 
{
				
			POBJECT_HEAD focusObj=OSD_GetFocusObject(pObj);
			
			if(param2==MENU_OPEN_TYPE_OTHER)
			{
				pvr_setting_item_set[focusObj->bID-1]->style.bHLIdx=TXTS_SH_IDX;
				pvr_setting_item_name[focusObj->bID-1]->style.bHLIdx=TXTN_SH_IDX;
			}
			else
			{
				pvr_setting_item_set[focusObj->bID-1]->style.bHLIdx=TXTS_HL_IDX;
				pvr_setting_item_name[focusObj->bID-1]->style.bHLIdx=TXTN_HL_IDX;
			}

}
#endif

			break;
		case EVN_POST_OPEN:
		wincom_open_commen_help(pObj);//-a by wangyang 
			break;			
		case EVN_PRE_CLOSE:
       		*((UINT32 *)param2) &= ~C_CLOSE_CLRBACK_FLG;
			p_sys_data=sys_data_get();
			sys_data_save(1);
#ifndef PVR3_SUPPORT
			pvr_r_set_ts_file_size(p_sys_data->record_ts_file_size + 1);
#endif
			//api_pvr_jumpstep_trans();
			break;
		case EVN_POST_CLOSE:
	  		wincom_close_subtitle();
			OSD_ClearScreen();
#ifdef EXIT_KEY_EXIT_ALL_MENU
	        if( exit_key_flag == TRUE)
	        	{
 			 exit_key_flag =FALSE;
			mm_leave_all_menu();
		}
#endif
			//OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL);
			break;
		#ifdef PREVIEW_SUBMENU  //-a by wangyang 
  		case EVN_MSG_GOT:
			if (param1 == CTRL_MSG_SUBTYPE_CMD_STO && param2 == USB_STATUS_OVER)
			{
				//system_state = SYS_STATE_NORMAL;
				wincom_close_subtitle();
				OSD_ClearScreen();
				//wincom_close_help();
				OSD_ClearObject( pObj, C_UPDATE_ALL);
				OSD_DrawFill(SUBMENU_W_L, SUBMENU_W_T, (SUBMENU_W_W), (SUBMENU_W_H), OSD_TRANSPARENT_COLOR, NULL);
				OSD_ObjOpen((POBJECT_HEAD)&win_info_con, MENU_OPEN_TYPE_OTHER );
				ret = PROC_LEAVE;
			}
			break;		
		#endif
      case EVN_UNKNOWN_ACTION:
            if (api_pvr_is_record_active())
                break;
            
            win_popup_choice_t choice;
            UINT8 back_saved;

#ifndef CI_PLUS_PVR_SUPPORT
			if (sys_data_get_tms() == 0)
			{
				win_popup_choice_t choice;
				UINT8 back_saved;			
				win_compopup_init(WIN_POPUP_TYPE_OKNO);
				win_compopup_set_msg("Are you sure to enter record TP mode?", NULL, 0);
				if (pvr_r_get_record_all())
					win_compopup_set_default_choice(WIN_POP_CHOICE_YES);
				else
					win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
				choice = win_compopup_open_ext(&back_saved);
				if(choice == WIN_POP_CHOICE_YES)
				{
					pvr_r_set_record_all(TRUE);
				}	
				else if (choice == WIN_POP_CHOICE_NO)
				{
					pvr_r_set_record_all(FALSE);
				}
			
			}
			else
#endif
			{
	            win_compopup_init(WIN_POPUP_TYPE_OKNO);
	            win_compopup_set_msg("Record CA program in descrambled format?", NULL, 0);
	            if (sys_data_get_scramble_record_mode())
	                win_compopup_set_default_choice(WIN_POP_CHOICE_YES);
	            else
	                win_compopup_set_default_choice(WIN_POP_CHOICE_NO);
	            choice = win_compopup_open_ext(&back_saved);
	            if (choice == WIN_POP_CHOICE_YES)
	            {
	                sys_data_set_scramble_record_mode(1);
	                pvr_r_set_scramble_ext(0);
	            }
	            else if (choice == WIN_POP_CHOICE_NO)
	            {
	                sys_data_set_scramble_record_mode(0);
	                pvr_r_set_scramble_ext(1);
	            }
			}
            break;
	}
	
	return ret;
}