Ejemplo n.º 1
0
static PRESULT nagra2_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;

	switch(event)
	{
	case EVN_PRE_OPEN:
		//patch_softcam_key_init();
		win_init_pstring(30);
		win_nagra2_check_focusID(1);
		win_nagra2_load_select();
		wincom_open_subtitle1(pObj,RS_CODE_EDIT,0);
		break;
	case EVN_POST_OPEN:
		wincom_open_help(pObj,nagra2_helpinfo , HELP_CNT);
		break;
	case EVN_PRE_CLOSE:
		softcam_save_keydata_to_flash_1();
		/* Make OSD not flickering */
		*((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG;	
		break;
	case EVN_POST_CLOSE:
		wincom_close_subtitle();
		wincom_close_help();
		OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL);
		break;
		
	case EVN_MSG_GOT:
	default:
		break;		
		
	}

	return ret;
}
Ejemplo n.º 2
0
static PRESULT mail_content_callback ( POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2 )
{
	PRESULT ret = PROC_PASS;
	INT32 iret;
	/*struct help_item_resource mail_con_help[] =
	{
		{1,IM_HELP_ICON_TB,RS_HELP_SELECT},
		{0,RS_MENU,RS_HELP_BACK},
		{0,RS_HELP_EXIT,RS_FULL_PLAY},  
	};*/

	switch ( event )
	{
		case EVN_PRE_OPEN:
			 OSD_ClearObject((POBJECT_HEAD)&g_win_mail, C_UPDATE_ALL);
			mail_title_info.pTextTable = ( PTEXT_CONTENT ) &mail_mtxt_title;
			//mail_title_info.pString = NULL;
			mail_content_info.pTextTable = ( PTEXT_CONTENT ) &mail_mtxt_content;
			//mail_content_info.pString = NULL;
			win_init_pstring(3);

			iret = mail_content_got_info();
			if (0 == iret)
			{
				ret = PROC_LEAVE;
				break;
			}
			//wincom_open_help(mail_con_help, 3);
			break;
		case EVN_POST_OPEN:
			break;
		case EVN_PRE_DRAW:
			mail_content_set_display();
			break;
		case EVN_PRE_CLOSE:
			/* Make OSD not flickering */
			if((menu_stack_get(0)!=( POBJECT_HEAD ) &g_win_mainmenu)&&(menu_stack_get(0)!=( POBJECT_HEAD ) &g_win_mail))
			{	
				*((UINT32*)param2) &= C_CLOSE_CLRBACK_FLG;
				MAILCONTENT_FORCE_FLAG=0;
			}
			else
				*((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG;
			break;
		case EVN_POST_CLOSE:
			break;
	}
	return ret;
}
Ejemplo n.º 3
0
static PRESULT win_detitle_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
    PRESULT ret = PROC_PASS;
    OBJLIST* ol = &detitle_olist;
    UINT16 tmp, num=0;
    struct help_item_resource detitle_help[] =
    {
        {1,IM_EPG_COLORBUTTON_RED,RS_HELP_DELETE},
        {1,IM_EPG_COLORBUTTON_GREEN,RS_DELETE_ALL},
        {1,IM_HELP_ICON_TB,RS_HELP_SELECT},
    };
    switch(event)
    {
    case EVN_PRE_OPEN:
        init_detitle_flag();
        tmp = detitle_get_info(&num);
        if (0 == tmp)
        {
            ret = PROC_LEAVE;
            break;
        }
        OSD_SetObjListCount(ol, num);
        if (num <= OSD_GetObjListCurPoint(&detitle_olist))
        {
            OSD_SetObjListCurPoint (&detitle_olist, 0);
            OSD_SetObjListNewPoint (&detitle_olist, 0);
            OSD_SetObjListTop (&detitle_olist, 0);
            //OSD_SetObjListNewPoint(&detitle_olist, 0);
        }
        wincom_open_title_ext(RS_DETITLE, IM_TITLE_ICON_SYSTEM);
        wincom_open_help(detitle_help, 3);
        win_init_pstring(18);
        break;
    case EVN_POST_OPEN:
        break;
    case EVN_PRE_CLOSE:
        /* Make OSD not flickering */
        save_detitle();
        *((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG;
        break;
    case EVN_POST_CLOSE:
        //TFCAS_WriteFlash();//write to flash at once, ignore the delay
        break;
    }

    return ret;
}
Ejemplo n.º 4
0
static PRESULT IPPVinfo_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT32 cnt = 0;
	INT32 iret;

	switch(event)
	{
	case EVN_PRE_OPEN:
		total_IPPV_number = 0;
		
        	iret = IPPVinfo_got_info();
		if(0 == iret)
		{
			ret = PROC_LEAVE;
			break;
		}
		OSD_SetObjListCount(&IPPVinfo_olist,total_IPPV_number);
		//for different card display
		if (total_IPPV_number <= OSD_GetObjListCurPoint(&IPPVinfo_olist))
		{
			//OSD_SetObjListNewPoint(&IPPVinfo_olist, 0);
			OSD_SetObjListCurPoint (&IPPVinfo_olist, 0);
			OSD_SetObjListNewPoint (&IPPVinfo_olist, 0);
			OSD_SetObjListTop (&IPPVinfo_olist, 0);
		}
		wincom_open_title_ext(RS_IPPV_PROGRAM, IM_TITLE_ICON_SYSTEM);
		wincom_open_help(win_opinfo_help, 2);
        	win_init_pstring(9);
		break;
	case EVN_POST_OPEN:
//		win_ippv_draw_title();
		break;
	case EVN_PRE_CLOSE:
		/* Make OSD not flickering */
		*((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG;	
		break;
	case EVN_POST_CLOSE:
		break;
	}

	return ret;
}
Ejemplo n.º 5
0
static PRESULT satlst_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;

	switch(event)
	{
	case EVN_PRE_OPEN:
		win_init_pstring(30);
		win_satlist_check_focusID(1);
		win_satlist_load_sat_select();
		wincom_open_subtitle(pObj,RS_SATELLITE_LIST,0);
		break;
	case EVN_POST_OPEN:
		wincom_open_help_1(pObj,satlist_helpinfo , HELP_CNT);
		break;
	case EVN_PRE_CLOSE:
		win_satlist_save_sat_select();
		/* Make OSD not flickering */
		*((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG;	
		break;
	case EVN_POST_CLOSE:
		wincom_close_subtitle();
		wincom_close_help();
		OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL);
		sys_data_check_channel_groups();
		break;
		
	case EVN_MSG_GOT:
		{
 //added by Eric.Ren, 接收control task 的消息,处理kingofsat  更新,2010.7.30
#ifdef KINGOFSAT_SUPPORT
			OBJLIST* ol;
			UINT16 sel;
			S_NODE s_node;
			INT32 kingofsat_tp_num = 0;  //可更新的TP个数
			UINT8 back_saved;
			
			if(param1 == CTRL_MSG_SUBTYPE_STATUS_DOWNLOAD_FINISH)
			{
				if((INT32)param2 < 0)
				{
					win_compopup_smsg_restoreback();

					win_compopup_init(WIN_POPUP_TYPE_SMSG);                        
					win_compopup_set_frame(MSG_POPUP_LAYER_L, MSG_POPUP_LAYER_T, MSG_POPUP_LAYER_W, MSG_POPUP_LAYER_H);
					win_compopup_set_msg("Downloading error,Try again!", NULL, 0);
					win_compopup_open_ext(&back_saved);			

					osal_task_sleep(2000);
					win_compopup_smsg_restoreback();
					
					break ;
				}
				ol = &satlist_olist;
				sel = OSD_GetObjListCurPoint(ol);
				get_sat_at(sel,VIEW_ALL,&s_node);

				//判断是有可更新的TP 数据
				kingofsat_get_tp_num(&kingofsat_tp_num);
				if(kingofsat_tp_num == 0)
				{
					win_compopup_smsg_restoreback();
					win_compopup_init(WIN_POPUP_TYPE_SMSG);                        
					win_compopup_set_frame(MSG_POPUP_LAYER_L, MSG_POPUP_LAYER_T, MSG_POPUP_LAYER_W, MSG_POPUP_LAYER_H);
					win_compopup_set_msg("NO TP in downloading data!", NULL, 0);
					win_compopup_open_ext(&back_saved);
					osal_task_sleep(1000);
					win_compopup_smsg_restoreback();
					
					break;
				}
				
				kingofsat_parse();		//解析下载数据
				recreate_tp_view(VIEW_SINGLE_SAT, s_node.sat_id);//创建TP view
				kingofsat_update(s_node.sat_id);	//更新数据
				kingofsat_destroy();	//释放资源

				OSD_TrackObject( (POBJECT_HEAD)&g_win_satlist, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);

				recreate_sat_view(VIEW_ALL, 0); //创建SAT view
			}

#endif
			break;
		}

	default:
		break;		
		
	}

	return ret;
}