Пример #1
0
static void win_ad_load_setting(void)
{
    MULTISEL *msel;

    msel =&ad_sel0; // AD service
    OSD_SetMultiselSel(msel, sys_data_get_ad_service());

    msel =&ad_sel1; // Use AD as default
    OSD_SetMultiselSel(msel, sys_data_get_ad_default_mode());

    msel =&ad_sel2; // AD volume offset
    OSD_SetMultiselSel(msel, (sys_data_get_ad_volume_offset() + AD_VOLUME_NO_OFFSET_IDX));

    if (sys_data_get_ad_service() == 0)
    {
        set_container_active(&ad_item1, C_ATTR_INACTIVE);
        set_container_active(&ad_item2, C_ATTR_INACTIVE);
    }
    /*
    else if (sys_data_get_ad_default_mode() == 0)
    {
    	set_container_active(&ad_item2, C_ATTR_INACTIVE);
    }
    */

}
Пример #2
0
void win_dis_load_setting(void)
{
    MULTISEL * msel;
    SYSTEM_DATA* sys_data;
    UINT32 sel;

    sys_data = sys_data_get();


    /* Brightness */
    msel = dis_item_set[IDC_DIS_BRIGHT - 1];
    sel = sys_data->avset.brightness;
    OSD_SetMultiselSel(msel, sel);

    /* Contrast */
    msel = dis_item_set[IDC_DIS_CONTRAST - 1];
    sel = sys_data->avset.contrast;
    OSD_SetMultiselSel(msel, sel);

    /* Saturation */
    msel = dis_item_set[IDC_DIS_SATURATION - 1];
    sel = sys_data->avset.saturation;
    OSD_SetMultiselSel(msel, sel);

    /* Hue */
    msel = dis_item_set[IDC_DIS_HUE - 1];
    sel = sys_data->avset.hue;
    OSD_SetMultiselSel(msel, sel);

    /* Sharpness */
    msel = dis_item_set[IDC_DIS_SHARP - 1];
    sel = sys_data->avset.sharpness;
    OSD_SetMultiselSel(msel, sel);

}
Пример #3
0
void win_timerset_timerservice_change(BOOL update)
{
	UINT8 action;
	TEXT_FIELD *txt;
	MULTISEL *msel;
	UINT16 ch_idx, ch_cnt;
	TIMER_SET_CONTENT *settimer;
	P_NODE p_node;


	settimer = &timer_set;

	if (TIMER_MODE == TIMER_MODE_OFF)
		action = C_ATTR_INACTIVE;
	else
	{
		if (TIMER_SERVICE_TYPE == TIMER_SERVICE_MESSAGE)
			action = C_ATTR_INACTIVE;
		else
			action = C_ATTR_ACTIVE;
	}

	/* TIMER service information: message or channel */
	txt = &timer_txt_serviceinfo;
	msel = &timer_msel_serviceinfo;

	if (TIMER_SERVICE_TYPE == TIMER_SERVICE_MESSAGE)
	{
		/* TIMER_SERVICE_SMG */
		OSD_SetMultiselSelType(msel, STRING_ID);
		OSD_SetMultiselCount(msel, 3);
		OSD_SetMultiselSelTable(msel, (void*)WakeupMessageStr_id);
		if (settimer->wakeup_message >= 3)
			settimer->wakeup_message = 0;
		OSD_SetMultiselSel(msel, settimer->wakeup_message);
	}
	else
	{
		//modified by Robin

		if (get_prog_by_id(settimer->wakeup_channel, &p_node) == DB_SUCCES)
			ch_idx = get_prog_pos(settimer->wakeup_channel);
		else
			ch_idx = sys_data_get_cur_group_cur_mode_channel();
		ch_cnt = get_prog_num(VIEW_ALL | settimer->wakeup_chan_mode, 0);
		OSD_SetMultiselSelType(msel, STRING_PROC);
		OSD_SetMultiselCount(msel, ch_cnt);
		OSD_SetMultiselSel(msel, ch_idx);
	}
	OSD_SetTextFieldContent(txt, STRING_ID, (UINT32)TimerServiceTxtStr_id[TIMER_SERVICE_TYPE]);
	if (update)
		OSD_DrawObject((POBJECT_HEAD) &timer_con_serviceinfo, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);

	set_container_active(&timer_con_duration, action);
	if (update)
		OSD_DrawObject((POBJECT_HEAD) &timer_con_duration, C_UPDATE_ALL);
}
Пример #4
0
static void win_av_load_tv_mode_setting(BOOL bDraw)
{
	MULTISEL * msel;	
	SYSTEM_DATA* sys_data;
	UINT32 i,sel,cnt;
	UINT32 focus = OSD_GetFocusID((POBJECT_HEAD)&win_av_con);

	sys_data = sys_data_get();

	/* TV MODE */
	msel = av_item_set[TVMODE_ID - 1];
	OSD_SetMultiselCount(msel, get_tv_mode_count());

	sel = tvmode_setting_to_osd(sys_data->avset.tv_mode);
	OSD_SetMultiselSel(msel, sel);
	if (bDraw)
	{
		if (focus == TVMODE_ID)
		{
			OSD_TrackObject((POBJECT_HEAD)av_items[TVMODE_ID - 1], C_UPDATE_ALL);
		}
		else
		{
			OSD_DrawObject((POBJECT_HEAD)av_items[TVMODE_ID - 1], C_UPDATE_ALL);
		}
	}

	/* Video Output */
	msel = av_item_set[VIDEOOUT_ID - 1];
#ifdef HDTV_SUPPORT
	if (sys_data_get_scart_out() == SCART_YUV)
	{
		sel = 0;
	}
	else
	{
		sel = 1;
	}
#else			
	sel = sys_data->avset.scart_out;
#endif
	OSD_SetMultiselSel(msel, sel);
	if (bDraw)
	{
		if (focus == VIDEOOUT_ID)
		{
			OSD_TrackObject((POBJECT_HEAD)av_items[VIDEOOUT_ID - 1], C_UPDATE_ALL);
		}
		else
		{
			OSD_DrawObject((POBJECT_HEAD)av_items[VIDEOOUT_ID - 1], C_UPDATE_ALL);
		}
	}
}
Пример #5
0
void win_timer_load(TIMER_SET_CONTENT *settimer)
{
	MULTISEL *msel;
	EDIT_FIELD *edf;
	TEXT_FIELD *txt;
	P_NODE p_node;
	UINT16 ch_idx, ch_cnt;
	UINT32 value;
	UINT8 action;

	win_timerset_set_currenttime(FALSE);

	/* TIMER_MODE*/
	msel = &timer_msel_mode;
	if (settimer->timer_mode >= OSD_GetMultiselCount(msel))
		settimer->timer_mode = TIMER_MODE_OFF;
	OSD_SetMultiselSel(msel, settimer->timer_mode);

	/* TIMER_SERVICE */
	msel = &timer_msel_servicetype;
	if (settimer->timer_service >= OSD_GetMultiselCount(msel))
		settimer->timer_service = 0;
	OSD_SetMultiselSel(msel, settimer->timer_service);

	/* TIMER service information: message or channel */
	txt = &timer_txt_serviceinfo;
	OSD_SetTextFieldContent(txt, STRING_ID, (UINT32)TimerServiceTxtStr_id[settimer->timer_service]);


	win_timerset_timerservice_change(FALSE);

	edf = &timer_edf_wakeupdate;
	value = settimer->wakeup_year *10000+settimer->wakeup_month *100+settimer->wakeup_day;
	OSD_SetEditFieldContent(edf, STRING_NUMBER, value);


	edf = &timer_edf_wakeuptime;
	value = (settimer->wakeup_time / 3600) *10000+((settimer->wakeup_time / 60) % 60)*100 + settimer->wakeup_time%60;
	timerSec = settimer->wakeup_time % 60;
	OSD_SetEditFieldContent(edf, STRING_NUMBER, value);


	edf = &timer_edf_duration;
	value = settimer->wakeup_duration_time / 3600 * 10000 + (settimer->wakeup_duration_time/60%60)*100 + settimer->wakeup_duration_time%60;
	OSD_SetEditFieldContent(edf, STRING_NUMBER, value);

	win_timerset_timermode_change(FALSE);


}
Пример #6
0
static void win_tpsrch_mode_init(void)
{
	CONTAINER* win = &g_win_tpsrch_set;
	CONTAINER* mode_item = &tpsrch_item0;
	CONTAINER* item1 = &tpsrch_item1;
	CONTAINER* item2 = &tpsrch_item2;
	CONTAINER* item3 = &tpsrch_item3;
	TEXT_FIELD* title = &tpsrch_title;
	TEXT_FIELD* ok_btn = &tpsrch_btntxt_ok;
	TEXT_FIELD* cancel_btn = &tpsrch_btntxt_cancel;

#ifdef PID_SEARCH_SUPPORT
	OSD_SetObjpNext(title,mode_item);
	item1->head.bUpID = mode_item->head.bID;
#else
	OSD_SetMultiselSel(&tpsrch_sel0, NORMAL_SRCH);
	OSD_SetObjpNext(title,item1);
	item1->head.bUpID = mode_item->head.bUpID;
/*
	OSD_MoveObject(item1,0, -(CON_H + CON_GAP)/2, TRUE);
	OSD_MoveObject(item2,0, -(CON_H + CON_GAP)/2, TRUE);
	OSD_MoveObject(item3,0, -(CON_H + CON_GAP)/2, TRUE);
*/
	OSD_MoveObject(item1,0, -(CON_H + CON_GAP), TRUE);
	OSD_MoveObject(item2,0, -(CON_H + CON_GAP), TRUE);
	OSD_MoveObject(item3,0, -(CON_H + CON_GAP), TRUE);
    OSD_MoveObject(ok_btn,0, -(CON_H + CON_GAP), TRUE);
    OSD_MoveObject(cancel_btn,0, -(CON_H + CON_GAP), TRUE); 
	ok_btn->head.bDownID = item1->head.bID;
	cancel_btn->head.bDownID = item1->head.bID;
#endif

}
Пример #7
0
static void win_tpe_load_setting(void)
{
	EDIT_FIELD	*edf;
	MULTISEL	*msel;
	T_NODE     t_node;

	edit_tp_ok = 0;
    edit_tp_exist = 0;
	if(edit_tp_mode == EDIT_TP_MODE_EDIT)
		get_tp_by_id(edit_tp_id, &t_node);
	else
	{
		t_node.frq = 3000;
		t_node.sym = 1000;
		t_node.pol = 0;
	}

	edf = &tpe_edt1;
	OSD_SetEditFieldSuffix(edf, STRING_ANSI, (UINT32)" MHz");
	OSD_SetEditFieldContent(edf, STRING_NUMBER, t_node.frq);
	OSD_SetEditFieldStyle(edf,NORMAL_EDIT_MODE | SELECT_STATUS);

	
	edf = &tpe_edt2;
	OSD_SetEditFieldSuffix(edf, STRING_ANSI, (UINT32)" KS/s");
	OSD_SetEditFieldContent(edf, STRING_NUMBER, t_node.sym);
	OSD_SetEditFieldStyle(edf,NORMAL_EDIT_MODE | SELECT_STATUS);

	msel = &tpe_msel3;
	OSD_SetMultiselSel(msel, t_node.pol);
	OSD_SetEditFieldStyle(edf,NORMAL_EDIT_MODE | SELECT_STATUS);
}
Пример #8
0
void win_check_rf_channel(SYSTEM_DATA* p_sys_data)
{
	if((p_sys_data->avset.rf_channel>rf_ch_range[p_sys_data->avset.rf_mode][1])||(p_sys_data->avset.rf_channel<rf_ch_range[p_sys_data->avset.rf_mode][0]))
	{
		p_sys_data->avset.rf_channel=rf_ch_range[p_sys_data->avset.rf_mode][0];
		OSD_SetMultiselSel(av_item_set[RFCHAN_ID - 1], p_sys_data->avset.rf_channel);
		OSD_DrawObject((POBJECT_HEAD)av_items[RFCHAN_ID - 1], C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
	}
}
Пример #9
0
static void load_settings(void)
{
	MULTISEL * msel;
	SYSTEM_DATA* sys_data;
	UINT32 sel;

	sys_data = sys_data_get();

	//country
	msel = &item_country_sel;
	OSD_SetMultiselCount(msel, COUNTRY_NCNT);
	sel = sys_data->country;
	OSD_SetMultiselSel(msel, sel);
    old_country_sel = sel;

	//network
	msel = &item_network_sel;

    if(sys_data->country == GERMANY)
    {
        OSD_SetMultiselCount(msel, GERM_SER_CNT);
        msel->bSelType = STRING_ID;
        msel->pSelTable = network_str;
        sel =  sys_data->germ_servs_type; //germ_network_setting_to_osd(&(sys_data->current_ft), sys_data->current_ft_count);
        old_germ_serv_sel = sel;
        old_network_sel = 0;
    }
    else
    {
	    OSD_SetMultiselCount(msel, NETWORK_NCNT);
        msel->bSelType = STRING_ID; //STRING_ANSI;
        msel->pSelTable = network_str+4;
	    sel = network_setting_to_osd(&(sys_data->current_ft[0]));
        old_germ_serv_sel = 0;
        old_network_sel = sel;
    }
    OSD_SetMultiselSel(msel, sel);

    if (from_auto_scan)
    	OSD_SetContainerFocus( (CONTAINER*)&win_country_net_con,NETWORK_ID);
    else
        OSD_SetContainerFocus( (CONTAINER*)&win_country_net_con,COUNTRY_ID);

}
Пример #10
0
static void nc_item_sel_DNSenable(UINT8 enable,BOOL update)
{
	UINT8 action = (  enable== 0) ? C_ATTR_INACTIVE : C_ATTR_ACTIVE;
	UINT8 i;

	OSD_SetMultiselSel(&nc_item_selt2,enable);
	
	if(update)
	{
		OSD_TrackObject( (POBJECT_HEAD)&nc_item_con8, C_UPDATE_ALL);
	}
}
Пример #11
0
void win_timerset_timerserviceinfo_change(BOOL update,UINT16 sel)
{
	MULTISEL	*msel;
	TIMER_SET_CONTENT* settimer;
	P_NODE p_node;
	UINT16 ch_idx,ch_cnt;

    
	settimer = &timer_set;
	msel = &timer_msel_serviceinfo;

    if(TIMER_SERVICE_TYPE == TIMER_SERVICE_MESSAGE)
    {
		OSD_SetMultiselSelType(msel,STRING_ID);
		OSD_SetMultiselCount(msel,3);
		OSD_SetMultiselSelTable(msel, (void*)WakeupMessageStr_id);
        if(sel >=3)
            sel = 0;
          settimer->wakeup_message = sel;            
		OSD_SetMultiselSel(msel,settimer->wakeup_message);		
    }
    else
    {
        if(get_prog_at(sel,&p_node) == DB_SUCCES)
            ch_idx = sel;
        else
        {
            ch_idx = sel = 0;
            get_prog_at(sel,&p_node);
        }
        settimer->wakeup_channel = p_node.prog_id; 
        
		ch_cnt = get_prog_num(VIEW_ALL | settimer->wakeup_chan_mode, 0);
		OSD_SetMultiselSelType(msel,STRING_PROC);
		OSD_SetMultiselCount(msel,ch_cnt);
		OSD_SetMultiselSel(msel, ch_idx);			
     }
	if(update)
		OSD_DrawObject((POBJECT_HEAD)&timer_con_serviceinfo, C_DRAW_SIGN_EVN_FLG |C_UPDATE_ALL);
}
Пример #12
0
void win_av_set_vcrloop_action(BOOL update)
{
	POBJECT_HEAD pObj;
	UINT8 action;
	SYSTEM_DATA* sys_data;

	/* Check VCR Loopthroup item exist or not*/
	pObj = OSD_GetContainerNextObj(&win_av_con);
	while(pObj != NULL && pObj != (POBJECT_HEAD)av_items[VCR_ID - 1] )
		pObj = OSD_GetObjpNext(pObj);
	if(pObj == NULL)
		return;

	sys_data = sys_data_get();
	if(sys_data->avset.scart_out == SCART_RGB)
		action = C_ATTR_INACTIVE;
	else
		action = C_ATTR_ACTIVE;

	if( ! OSD_CheckAttr(av_items[VCR_ID - 1], action))
	{
		if(action == C_ATTR_INACTIVE)
			OSD_SetMultiselSel(av_item_set[VCR_ID - 1], 1);
		else
			OSD_SetMultiselSel(av_item_set[VCR_ID - 1], sys_data->vcrloopmode);
		OSD_SetAttr(av_items[VCR_ID - 1], action);
		pObj = OSD_GetContainerNextObj(av_items[VCR_ID - 1]);
		while(pObj)
		{
			OSD_SetAttr(pObj , action);
			pObj = OSD_GetObjpNext(pObj);				
		}
		if(update)
			OSD_DrawObject( (POBJECT_HEAD)av_items[VCR_ID - 1],C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
	}
}
Пример #13
0
void win_dis_enter_key(UINT8 id)
{
    SYSTEM_DATA* p_sys_data=sys_data_get();
    UINT16 result;
    OSD_RECT rect;
    COM_POP_LIST_PARAM_T param;
    UINT16 sel = 0;
    POBJECT_HEAD pObj,pObjItem;
    MULTISEL* msel;

    msel = dis_item_set[id - 1];
    pObj = (POBJECT_HEAD)msel;
    pObjItem = (POBJECT_HEAD)dis_items[id - 1];

    rect.uLeft  = CON_L+SEL_L_OF;
    rect.uWidth = SEL_W;
    rect.uTop = pObj->frame.uTop;

    param.selecttype = POP_LIST_SINGLESELECT;

    switch(id)
    {
    case IDC_DIS_BRIGHT:
        sel = p_sys_data->avset.brightness;
        break;
    case IDC_DIS_CONTRAST:
        sel = p_sys_data->avset.contrast;
        break;
    case IDC_DIS_SATURATION:
        sel = p_sys_data->avset.saturation;
        break;
    case IDC_DIS_HUE:
        sel = p_sys_data->avset.hue;
        break;
    case IDC_DIS_SHARP:
        sel = p_sys_data->avset.sharpness;
        break;
    }

    rect.uHeight = 340;
    param.cur = sel - m_dis_set_range[id][0];
    sel = win_com_open_sub_list(POP_LIST_MENU_DISPLAY_SET,&rect,&param) + m_dis_set_range[id][0];

    OSD_SetMultiselSel(msel, sel);
    OSD_NotifyEvent(pObj,EVN_POST_CHANGE,(UINT32)sel, 0);
    OSD_TrackObject(pObjItem,C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);

}
Пример #14
0
static void localset_init()
{
	get_local_ip_cfg(&net_local_cfg);
//	libc_printf("start dhcp: %d\n", net_local_cfg.dhcp_on);
	OSD_SetMultiselSel(&localset_item_dhcp, net_local_cfg.dhcp_on);
	localset_hdcp_on(FALSE, net_local_cfg.dhcp_on);
	OSD_SetEditFieldContent(&localset_item_ip_addr, STRING_NUMBER, 
                            ntohl(net_local_cfg.ip_addr));
	OSD_SetEditFieldContent(&localset_item_subnet_mask, STRING_NUMBER,
                            ntohl(net_local_cfg.subnet_mask));
	OSD_SetEditFieldContent(&localset_item_gateway, STRING_NUMBER,
                            ntohl(net_local_cfg.gateway));
	OSD_SetEditFieldContent(&localset_item_dns1, STRING_NUMBER,
                            ntohl(net_local_cfg.dns));
	OSD_SetEditFieldContent(&localset_item_dns2, STRING_NUMBER,
                            ntohl(net_local_cfg.dns2));
}
Пример #15
0
static void nc_item_sel_autouser(UINT8 active,UINT8 bAuto,BOOL update)
{
	UINT8 action= (  bAuto== 1 ||active==0) ? C_ATTR_INACTIVE : C_ATTR_ACTIVE;

	OSD_SetMultiselSel(&nc_item_selt3,bAuto);

	set_container_active(&nc_item_con4, action);
	set_container_active(&nc_item_con5, action);

	if(update)
	{
		OSD_DrawObject( (POBJECT_HEAD)&nc_item_con4, C_UPDATE_ALL);
		OSD_DrawObject( (POBJECT_HEAD)&nc_item_con5, C_UPDATE_ALL);

		//OSD_TrackObject( (POBJECT_HEAD)&nc_item_con9, C_UPDATE_ALL);
	}

}
Пример #16
0
void win_otaset_load_FreqSymbPid_display(void)
{
	EDIT_FIELD* edf;
	MULTISEL*  msel;

	edf = &wota_num2;
	OSD_SetEditFieldContent(edf, STRING_NUMBER, (UINT32)ota_freq);

	
	edf = & wota_num3;
	OSD_SetEditFieldContent(edf, STRING_NUMBER, (UINT32)ota_symb);
	
	edf = &wota_num5;
	OSD_SetEditFieldContent(edf, STRING_NUMBER, (UINT32)ota_pid);

	msel = &wota_num4;
	OSD_SetMultiselSel(msel, ota_pol);
Пример #17
0
static void win_item_enter_key(UINT8 id)
{
	SYSTEM_DATA* p_sys_data=sys_data_get();
	//UINT16 result;
	OSD_RECT rect;
	COM_POP_LIST_PARAM_T param;
	UINT16 sel;
	POBJECT_HEAD pObj,pObjItem;
	MULTISEL* msel;

	msel = multisel_items[id - 1];
	pObj = (POBJECT_HEAD)msel;
	pObjItem = (POBJECT_HEAD)con_items[id - 1];

	rect.uLeft=CON_L+TXTS_L_OF;
	rect.uWidth=TXTS_W;
	rect.uTop = pObj->frame.uTop;
	param.selecttype = POP_LIST_SINGLESELECT;


	if(id == COUNTRY_ID)
	{
		param.cur = p_sys_data->country;
	}
	else if(id == NETWORK_ID)
	{
         if(GERMANY == OSD_GetMultiselSel(&item_country_sel))
            param.cur = p_sys_data->germ_servs_type; //germ_network_setting_to_osd(&(p_sys_data->current_ft), p_sys_data->current_ft_count);
         else
         {
		   param.cur = network_setting_to_osd(&(p_sys_data->current_ft[0]));
         }
	}

	rect.uHeight=300;
	sel  = win_com_open_sub_list(POP_LIST_MENU_COUNTRY_NETWORK,&rect,&param);
    if (sel == param.cur)
        return;
	OSD_SetMultiselSel(msel, sel);
	OSD_NotifyEvent(pObj,EVN_POST_CHANGE,(UINT32)sel, 0);
	OSD_TrackObject(pObjItem,C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);

}
Пример #18
0
static void nc_item_sel_active(UINT8 active,UINT8 bAuto,BOOL update)
{
    UINT8 action ;

    UINT8 i;

    OSD_SetMultiselSel(&nc_item_selt1,active);

    action = (  active== 0) ? C_ATTR_INACTIVE : C_ATTR_ACTIVE;
    set_container_active(&nc_item_con1, action);
    set_container_active(&nc_item_con2, action);
    set_container_active(&nc_item_con3, action);
    set_container_active(&nc_item_con6, action);
#if ((defined(ORDER_GZ1006005))||(defined(ORDER_GZ1006006)))
    set_container_active(&nc_item_con_type, action);
#endif
    //set_container_active(&nc_item_con9, action);//auto user sel

//	action =(  bAuto== 0 ||active==0) ? C_ATTR_INACTIVE : C_ATTR_ACTIVE;
//	set_container_active(&nc_item_con4, action);//user
//	set_container_active(&nc_item_con5, action);//pwd

    nc_item_sel_autouser(active,bAuto,FALSE);

    if(update)
    {
        OSD_DrawObject( (POBJECT_HEAD)&nc_item_con1, C_UPDATE_ALL);
        OSD_DrawObject( (POBJECT_HEAD)&nc_item_con2, C_UPDATE_ALL);
        OSD_DrawObject( (POBJECT_HEAD)&nc_item_con3, C_UPDATE_ALL);
        OSD_DrawObject( (POBJECT_HEAD)&nc_item_con4, C_UPDATE_ALL);
        OSD_DrawObject( (POBJECT_HEAD)&nc_item_con5, C_UPDATE_ALL);
        OSD_DrawObject( (POBJECT_HEAD)&nc_item_con6, C_UPDATE_ALL);
#if ((defined(ORDER_GZ1006005))||(defined(ORDER_GZ1006006)))
        OSD_DrawObject( (POBJECT_HEAD)&nc_item_con_type, C_UPDATE_ALL);
#endif
        //OSD_DrawObject( (POBJECT_HEAD)&nc_item_con9, C_UPDATE_ALL);

        OSD_TrackObject( (POBJECT_HEAD)&nc_item_con7, C_UPDATE_ALL);
    }


}
Пример #19
0
static void sp_item_sel_active(UINT8 active,UINT8 bAuto,BOOL update)
{
	UINT8 action ;

	UINT8 i;

	OSD_SetMultiselSel(&sp_item_selt1,active);

	action = (  active== 0) ? C_ATTR_INACTIVE : C_ATTR_ACTIVE;
	set_container_active(&sp_item_con6, action);


	if(update)
	{
		OSD_DrawObject( (POBJECT_HEAD)&sp_item_con6, C_UPDATE_ALL);
		
		OSD_TrackObject( (POBJECT_HEAD)&sp_item_con7, C_UPDATE_ALL);
	}


}
Пример #20
0
static PRESULT win_sys_backup_init(void)
{
	unsigned long block_id;
	RET_CODE block_ret,filelist_ret;
	MULTISEL *pMsel;
	
	block_ret = usbupg_block_init(&usbupg_blocks_cnt);
	if(block_ret == RET_FAILURE)
	{
		usbupg_block_free();
		return PROC_LEAVE;
	}
	
	pMsel = &sys_backup_sel_upgrade_type;
	OSD_SetMultiselSel(pMsel, 0);

	OSD_SetMultiselCount(pMsel, EM_BACKUP_MODE_NUM);

	sys_backup_txt_start.bX = TXTN_L_OF;

	return PROC_PASS;
}
Пример #21
0
void win_otaset_load_FreqSymbPid_display(void)
{
	EDIT_FIELD* edf;
	MULTISEL*  msel;
    UINT16 freq_def, symb_def;
    UINT8 dot_pos;
    int sel;

	/* FREQ */
	edf = &wota_num2;
	wincom_mbs_to_i_with_dot(otaset_display_strs[0], &freq_def, &dot_pos);
	if(freq_def==0)
		wincom_i_to_mbs_with_dot(otaset_display_strs[0],
	                         ota_freq, DVBC_OTA_EDIT_LEN - 1/*without dot*/, 0x02/*xxx.xx*/);
	OSD_SetEditFieldSuffix(edf, STRING_ANSI, (UINT32)" MHz");
	OSD_SetEditFieldStyle(edf,NORMAL_EDIT_MODE | SELECT_STATUS);
	//OSD_SetEditFieldContent(edf, STRING_NUMBER, (UINT32)ota_freq);

	/* SYMBOL */
	edf = & wota_num3;
	OSD_SetEditFieldSuffix(edf, STRING_ANSI, (UINT32)" KBps");
	wincom_i_to_mbs(otaset_display_strs[1],
	                ota_symb, DVBC_OTA_EDIT_LEN - 1);
	OSD_SetEditFieldStyle(edf,NORMAL_EDIT_MODE | SELECT_STATUS);
	//OSD_SetEditFieldContent(edf, STRING_NUMBER, (UINT32)ota_symb);

    /* QAM */
	msel = &wota_num4;
    sel = ota_modulation - QAM16;
    sel = sel > 0 ? sel : 0;
    OSD_SetMultiselSel(msel, sel);
	
    /* PID */
	edf = &wota_num5;
	OSD_SetEditFieldContent(edf, STRING_NUMBER, (UINT32)ota_pid);
Пример #22
0
static void dvbc_quickscan_set_def_val(void)
{
	INT8 rule[20];
	UINT32 freq, symbol, constellation;
	P_NODE p_node;
	T_NODE t_node;
	UINT32 prog_num;
	UINT16 cur_channel;

	/* FREQ */
	wincom_i_to_mbs_with_dot(display_strs[20],
	                         i_qs_freq, DVBC_QUICKSCAN_EDIT_LEN - 1/*without dot*/, 0x02/*xxx.xx*/);
	ComAscStr2Uni("MHz", display_strs[30]);
	/* SYMBOL */
	wincom_i_to_mbs(display_strs[21],
	                i_qs_symbol, DVBC_QUICKSCAN_EDIT_LEN - 1);
	ComAscStr2Uni("KBaud", display_strs[31]);

	OSD_SetMultiselSel(&txt_mf_item_value3, i_qs_mode - QAM16);
	#if(defined(MIS_AD) || defined(MIS_AD_NEW))
	wincom_i_to_mbs(display_strs[22],
	                i_qs_areacode, 2);
	#endif
}
Пример #23
0
void win_timer_load(TIMER_SET_CONTENT* settimer)
{
	MULTISEL	*msel;
	EDIT_FIELD	*edf;
	TEXT_FIELD	*txt;
	P_NODE   p_node;
	UINT16  ch_idx,ch_cnt;
	UINT32 value;
	UINT8 action;	

	win_timerset_set_currenttime(FALSE);

	/* TIMER_MODE*/
	msel = &timer_msel_mode;
	if(settimer->timer_mode >= OSD_GetMultiselCount(msel))
		settimer->timer_mode = TIMER_MODE_OFF;
	OSD_SetMultiselSel(msel, settimer->timer_mode);
	
	/* TIMER_WEEKDAY*/
	msel = &timer_msel_wakeupweekday;
	if(settimer->wakeup_weekday >= OSD_GetMultiselCount(msel))
		settimer->wakeup_weekday = SUNDAY;
	OSD_SetMultiselSel(msel, settimer->wakeup_weekday);

	/* TIMER_SERVICE */
	msel = &timer_msel_servicetype;
	if(settimer->timer_service >= OSD_GetMultiselCount(msel))
		settimer->timer_service = 0;
	OSD_SetMultiselSel(msel, settimer->timer_service);
	if(!pvr_info.hdd_valid)//guop add
	  OSD_SetMultiselSel(msel, 0);

	/* TIMER service information: message or channel */
	txt = &timer_txt_serviceinfo;
	OSD_SetTextFieldContent(txt, STRING_ID, (UINT32)TimerServiceTxtStr_id[settimer->timer_service]);


	win_timerset_timerservice_change(FALSE);		

	edf = &timer_edf_wakeupdate;
	value = settimer->wakeup_year*10000 + settimer->wakeup_month*100 + settimer->wakeup_day;
	OSD_SetEditFieldContent(edf, STRING_NUMBER, value);

	
	edf = &timer_edf_wakeuptime;
	value = settimer->wakeup_time/60 * 100 + settimer->wakeup_time%60;
	OSD_SetEditFieldContent(edf, STRING_NUMBER, value);


	edf = &timer_edf_duration;
 	if(settimer->timer_mode == TIMER_MODE_OFF) // set 2 hour as default!!
 		settimer->wakeup_duration_time = 120;
   	value = settimer->wakeup_duration_time/60 * 100 + settimer->wakeup_duration_time%60;
   	OSD_SetEditFieldContent(edf, STRING_NUMBER, value);
   
 	msel = &timer_msel_rec_type;
 	if(settimer->wakeup_message > 2)
 		settimer->wakeup_message = 0;
 	OSD_SetMultiselSel(&timer_msel_rec_type, settimer->wakeup_message);

	win_timerset_timermode_change(FALSE);


}
Пример #24
0
void win_av_load_setting(void)
{
	MULTISEL * msel;	
	SYSTEM_DATA* sys_data;
	UINT32 i,sel,cnt,rf_mode;
	
	sys_data = sys_data_get();
	

	/* TV MODE */
	msel = av_item_set[TVMODE_ID - 1];
	OSD_SetMultiselCount(msel, get_tv_mode_count());

	sel = tvmode_setting_to_osd(sys_data->avset.tv_mode);
	OSD_SetMultiselSel(msel, sel);

	/* TV Aspect */
	msel = av_item_set[TVASPECT_ID - 1];
	sel = win_av_get_index(sys_data);
	OSD_SetMultiselSel(msel, sel);

	/* Video Output */
	msel = av_item_set[VIDEOOUT_ID - 1];
#ifdef HDTV_SUPPORT
	if (sys_data_get_scart_out() == SCART_YUV)
		sel = 0;
	else
		sel = 1;
#else			
	sel = sys_data->avset.scart_out;
#endif
	OSD_SetMultiselSel(msel, sel);

	/* VCR loopthrough */
	msel = av_item_set[VCR_ID - 1];
	if(sys_data->avset.scart_out == SCART_RGB)
		sel = 1;
	else
		sel = sys_data->vcrloopmode;
	OSD_SetMultiselSel(msel, sel);
	
	/* RF Mode */
	msel = av_item_set[RFSYSTEM_ID - 1];
	cnt = OSD_GetMultiselCount(msel);
	sel = sys_data->avset.rf_mode;
	if(sel >= cnt)
	{
		sel = 0;
		sys_data->avset.rf_mode = sel;
	}
	OSD_SetMultiselSel(msel, sel);
	rf_mode = sel;

	/* RF Channel */
	msel = av_item_set[RFCHAN_ID - 1];
	sel = sys_data->avset.rf_channel;
	if(sel < rf_ch_range[rf_mode][0] || sel> rf_ch_range[rf_mode][1])
	{
		sel =  rf_ch_range[rf_mode][0];
		sys_data->avset.rf_channel = sel;
		sys_data_set_rf(sys_data->avset.rf_mode,sys_data->avset.rf_channel);
	}
	OSD_SetMultiselSel(msel, sel);
	OSD_SetMultiselSelTable(msel, rf_ch_range[rf_mode]);

#ifdef HDTV_SUPPORT
	/* HDMI Video Out */
	msel = av_item_set[HDMIOUT_ID - 1];

	sel = sys_data->avset.video_format;
	OSD_SetMultiselSel(msel, sel);

	/* Digital Audio Out */
	msel = av_item_set[AUDIOOUT_ID - 1];

	sel = sys_data->avset.audio_output;
	OSD_SetMultiselSel(msel, sel);
#endif

#if (SUPPORT_DUAL_OUTPUT_ONOFF)
	/* Dual Output */
	msel = av_item_set[DUALOUT_ID- 1];

	sel = sys_data->avset.dual_output;
	OSD_SetMultiselSel(msel, sel);
#endif

}
Пример #25
0
static PRESULT av_item_sel_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	UINT8 bID;
	UINT32 sel;
	UINT16* Uni_str;
	SYSTEM_DATA* sys_data;
	OSD_RECT rect;
	COM_POP_LIST_PARAM_T param;

	bID = OSD_GetObjID(pObj);
	sys_data = sys_data_get();
	switch(event)
	{
	case EVN_PRE_CHANGE://51
		sel = *((UINT32*)param1);
		break;
	case EVN_POST_CHANGE://52
		sel = param1;
		switch(bID)
		{
		case TVMODE_ID:
			sys_data->avset.tv_mode = tvmode_osd_to_setting(sel);
			api_video_set_tvout(sys_data->avset.tv_mode);	
			break;
		case TVASPECT_ID:
			win_av_set_ratio(sys_data,sel);
			sys_data_set_display_mode(&(sys_data->avset));			
			break;
		case VIDEOOUT_ID:
#ifdef HDTV_SUPPORT
            if (sel == 0)
				sys_data->avset.scart_out = SCART_YUV;
            else
				sys_data->avset.scart_out = SCART_RGB;
#else			
			sys_data->avset.scart_out = sel;
#endif
			if(sel == SCART_CVBS)
			{
				api_Scart_RGB_OnOff(0);
#ifdef VDAC_USE_SVIDEO_TYPE
				api_Svideo_OnOff(0);
#endif
			}
			else if(sel == SCART_RGB)
			{
				api_Scart_RGB_OnOff(1);
				//api_Svideo_OnOff(0);/*RGB output will cut off svideo output,ommit here*/
			}
			else
			{
				api_Scart_RGB_OnOff(0);
#ifdef VDAC_USE_SVIDEO_TYPE
				api_Svideo_OnOff(1);
#endif
			}
#if(SYS_MAIN_BOARD == BOARD_DB_M3602_04V01)
					system_config.avset.scart_out = sys_data->avset.scart_out;

					if(sel != 0) // RGB
					{		
						MULTISEL * msel;	
						if(TV_MODE_PAL != sys_data->avset.tv_mode || TV_MODE_NTSC358 != sys_data->avset.tv_mode)
						{
							sys_data->avset.tv_mode = TV_MODE_PAL;
							system_config.avset.tv_mode = TV_MODE_PAL;
						}
						msel = av_item_set[TVMODE_ID - 1];
						OSD_SetMultiselCount(msel, get_tv_mode_count());

						sel = tvmode_setting_to_osd(sys_data->avset.tv_mode);
						OSD_SetMultiselSel(msel, sel);
						msel->bSelType = STRING_ANSI;
						msel->pSelTable = tv_mode_sd;
						OSD_DrawObject((POBJECT_HEAD)&av_item_con1, C_UPDATE_ALL);
						msel->bSelType = STRING_PROC;
						g_rgb_yuv_changed = 1;
					}
					else // YUV
					{
						MULTISEL * msel;

						msel = av_item_set[TVMODE_ID - 1];
						OSD_SetMultiselCount(msel, get_tv_mode_count());

						sel = tvmode_setting_to_osd(sys_data->avset.tv_mode);
						OSD_SetMultiselSel(msel, sel);
						msel->bSelType = STRING_ANSI;
						msel->pSelTable = tv_mode;
						OSD_DrawObject((POBJECT_HEAD)&av_item_con1, C_UPDATE_ALL);
						msel->bSelType = STRING_PROC;
						g_rgb_yuv_changed = 1;
					}
					api_video_set_tvout(sys_data->avset.tv_mode);
					g_rgb_yuv_changed = 0;
#endif
			win_av_set_vcrloop_action(TRUE);
			if(sys_data->avset.scart_out == SCART_RGB)
				api_Scart_OutPut_Switch(1);
			else
				api_Scart_OutPut_Switch(sys_data->vcrloopmode);			
			break;
		case VCR_ID:
			sys_data->vcrloopmode = sel;
			api_Scart_OutPut_Switch(sys_data->vcrloopmode );
			break;
		case RFSYSTEM_ID:
			sys_data->avset.rf_mode = sel;
			win_check_rf_channel(sys_data);
			OSD_SetMultiselSelTable(av_item_set[RFCHAN_ID - 1], rf_ch_range[sel]);
			
			sys_data_set_rf(sys_data->avset.rf_mode, sys_data->avset.rf_channel);
			break;
		case RFCHAN_ID:
			sys_data->avset.rf_channel = sel;
			sys_data_set_rf(sys_data->avset.rf_mode, sys_data->avset.rf_channel);
			break;		
#ifdef HDTV_SUPPORT
		case HDMIOUT_ID:
			sys_data->avset.video_format = sel;
			sys_data_set_video_format(sys_data->avset.video_format);
			break;
		case AUDIOOUT_ID:
			sys_data->avset.audio_output = sel;
			sys_data_set_audio_output(sys_data->avset.audio_output);
			break;
#endif
#if (SUPPORT_DUAL_OUTPUT_ONOFF)
		case DUALOUT_ID:
			sys_data->avset.dual_output = sel;
			sys_data_set_dual_output(sys_data->avset.dual_output);
			break;
#endif
		}
 		
		break; 
	case EVN_REQUEST_STRING:
		sel = param1;
		Uni_str= (UINT16*)param2;
		switch(bID)
		{
		case TVMODE_ID:
			ComAscStr2Uni(get_tv_mode_string(sel), Uni_str);
			break;
		case TVASPECT_ID:
			ComAscStr2Uni(tv_ratio[sel], Uni_str);
			break;
#ifdef HDTV_SUPPORT
		case VIDEOOUT_ID:
			ComAscStr2Uni(video_output[sel], Uni_str);
			break;
#endif
//		case VCR_ID:			break;
		case RFSYSTEM_ID:
			ComAscStr2Uni(rf_mode_stings[sel], Uni_str);
			break;
//		case RFCHAN_ID:			break;		
		}
		break;
		
	case EVN_UNKNOWN_ACTION:
		win_av_enter_key(bID);
		
		break;
	}
 	return ret;
}
Пример #26
0
void win_av_enter_key(UINT8 id)
{
	SYSTEM_DATA* p_sys_data=sys_data_get();
	UINT16 result;
	OSD_RECT rect;
	COM_POP_LIST_PARAM_T param;
	UINT16 sel;
	POBJECT_HEAD pObj,pObjItem;
	MULTISEL* msel;
	

	msel = av_item_set[id - 1];
	pObj = (POBJECT_HEAD)msel;
	pObjItem = (POBJECT_HEAD)av_items[id - 1];
	
	rect.uLeft=CON_L+SEL_L_OF;
	rect.uWidth=SEL_W;
	rect.uTop = pObj->frame.uTop;

	param.selecttype = POP_LIST_SINGLESELECT;

    extern UINT8 g_rgb_yuv_changed;

	switch(id)
	{
	case TVMODE_ID:
		rect.uHeight=300;
		param.cur = tvmode_setting_to_osd(p_sys_data->avset.tv_mode);
		sel  = win_com_open_sub_list(POP_LIST_MENU_TVSYS,&rect,&param);
        if (g_rgb_yuv_changed)
            break;

		OSD_SetMultiselSel(msel, sel);
		OSD_NotifyEvent(pObj,EVN_POST_CHANGE,(UINT32)sel, 0);
		OSD_TrackObject(pObjItem,C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
		break;
	case TVASPECT_ID:
		rect.uHeight= 300;//26*4+20;
		param.cur=win_av_get_index(p_sys_data);
		sel = win_com_open_sub_list(POP_LIST_MENU_TVSYS,&rect,&param);
        if (g_rgb_yuv_changed)
            break;

		OSD_SetMultiselSel(msel, sel);
		OSD_NotifyEvent(pObj,EVN_POST_CHANGE,(UINT32)sel, 0);
		OSD_TrackObject(pObjItem,C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
		break;
	case RFSYSTEM_ID:
		rect.uTop = 240;
		rect.uHeight= 300;//26*4+20;
		param.cur = p_sys_data->avset.rf_mode;
		sel = win_com_open_sub_list(POP_LIST_MENU_TVSYS,&rect,&param);
        if (g_rgb_yuv_changed)
            break;

		OSD_SetMultiselSel(msel, sel);
		OSD_NotifyEvent(pObj,EVN_POST_CHANGE,(UINT32)sel, 0);
		OSD_TrackObject(pObjItem,C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
		break;
	case RFCHAN_ID:
		rect.uTop = 240;
		rect.uHeight = 300;//150;
		param.cur=p_sys_data->avset.rf_channel-rf_ch_range[p_sys_data->avset.rf_mode][0];
		sel = win_com_open_sub_list(POP_LIST_MENU_TVSYS,&rect,&param)+rf_ch_range[p_sys_data->avset.rf_mode][0];
        if (g_rgb_yuv_changed)
            break;

		OSD_SetMultiselSel(msel, sel);
		OSD_NotifyEvent(pObj,EVN_POST_CHANGE,(UINT32)sel, 0);		
		OSD_TrackObject(pObjItem,C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
		break;
#ifdef HDTV_SUPPORT
	case HDMIOUT_ID:
		rect.uTop = 240;
		rect.uHeight = 300;//26*5+20;
		param.cur = p_sys_data->avset.video_format;
		sel = win_com_open_sub_list(POP_LIST_MENU_TVSYS,&rect,&param);
        if (g_rgb_yuv_changed)
            break;

		OSD_SetMultiselSel(msel, sel);
		OSD_NotifyEvent(pObj,EVN_POST_CHANGE,(UINT32)sel, 0);
		OSD_TrackObject(pObjItem,C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
		break;
	case AUDIOOUT_ID:
		rect.uTop = 240;
		rect.uHeight = 260;//26*3+20;
		param.cur = p_sys_data->avset.audio_output;
		sel = win_com_open_sub_list(POP_LIST_MENU_TVSYS,&rect,&param);
        if (g_rgb_yuv_changed)
            break;

		OSD_SetMultiselSel(msel, sel);
		OSD_NotifyEvent(pObj,EVN_POST_CHANGE,(UINT32)sel, 0);
		OSD_TrackObject(pObjItem,C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
		break;
#endif
	}
	
}
Пример #27
0
static PRESULT timerset_mselinfo_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT32 sel;
	VACTION unact;
	P_NODE p_node;
	UINT16* Uni_str;	
	TIMER_SET_CONTENT* settimer;
	COM_POP_LIST_PARAM_T param;
	OSD_RECT rect;

	
	settimer = &timer_set;
	
	
	switch(event)
	{
	case EVN_PRE_CHANGE:
		sel = *((UINT32*)param1);
		break;
	case EVN_POST_CHANGE:
		sel = param1;
		break;
	case EVN_UNKNOWN_ACTION:
		unact  = (VACTION)(param1>>16);
		if(unact == VACT_ENTER) // select channel 
		{
			OSD_SetRect2(&rect,&pObj->frame);
			rect.uTop -= 80;
			rect.uLeft -= 40;
			rect.uWidth += 40;
			rect.uHeight = 300;

			param.selecttype = POP_LIST_SINGLESELECT;
			param.cur = TIMER_SERVICE_INFO;		
			sel = win_com_open_sub_list(POP_LIST_TYPE_CHANLIST,&rect,&param);
			if(sel < (UINT32)TIMER_SERVICE_INFO_CNT)
			{
				get_prog_at(sel,&p_node);
				settimer->wakeup_channel = p_node.prog_id;
				TIMER_SERVICE_INFO = sel;
			}

			OSD_TrackObject( (POBJECT_HEAD )&timer_con_serviceinfo, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
		}
		break;
	case EVN_REQUEST_STRING:
		sel = param1;	
		Uni_str= (UINT16*)param2;
		get_prog_at(sel,&p_node);
		if(p_node.ca_mode)
			ComAscStr2Uni("$", Uni_str);
		ComUniStrCopyChar((UINT8*)&Uni_str[p_node.ca_mode], p_node.service_name);			
 		if((TIMER_MODE == TIMER_MODE_OFF) || (TIMER_SERVICE_TYPE != TIMER_SERVICE_DVR_RECORD) || (p_node.ca_mode == 1))
 		{
 			set_container_active(&timer_con_rec_type, C_ATTR_INACTIVE);
 			settimer->wakeup_message = 0;
 		}
		else if((TIMER_SERVICE_TYPE == TIMER_SERVICE_DVR_RECORD) && (!pvr_info.hdd_valid))  //guop add
 			set_container_active(&timer_con_rec_type, C_ATTR_INACTIVE);
 		else
 		{
 			set_container_active(&timer_con_rec_type, C_ATTR_ACTIVE);
 			if(settimer->wakeup_message > 2)
 				settimer->wakeup_message = 0;
 		}
 		OSD_SetMultiselSel(&timer_msel_rec_type, settimer->wakeup_message);
 		OSD_DrawObject((POBJECT_HEAD)&timer_con_rec_type, C_UPDATE_ALL);

		break;
		
	}

	return ret;
}
Пример #28
0
void win_timerset_timermode_change(BOOL update)
{
	UINT8 action;
 	MULTISEL	*msel;
 	TIMER_SET_CONTENT* settimer;
 	P_NODE p_node;
       UINT8 ifpvr;
 	settimer = &timer_set;
	
	if(TIMER_MODE == TIMER_MODE_OFF)   //guop modify 20100629
		{
		 action = C_ATTR_INACTIVE;
                ifpvr = C_ATTR_INACTIVE;
		}
	else
		{
		 action = C_ATTR_ACTIVE;
             if(!pvr_info.hdd_valid) 
	               ifpvr = C_ATTR_INACTIVE;	
	      else 
	             	ifpvr = C_ATTR_ACTIVE;
		}
	
	//if(OSD_CheckAttr(&timer_con_servicetype, action))
	//	return;

	set_container_active(&timer_con_servicetype,ifpvr);
	set_container_active(&timer_con_serviceinfo,action);
	set_container_active(&timer_con_wakeupdate,action);
	set_container_active(&timer_con_wakeupweekday,action);
	set_container_active(&timer_con_wakeuptime,action);
	set_container_active(&timer_con_duration,ifpvr);	
 	set_container_active(&timer_con_rec_type,ifpvr);	

//	if(ifpvr == C_ATTR_ACTIVE && ((TIMER_SERVICE_TYPE == TIMER_SERVICE_MESSAGE) ||( TIMER_SERVICE_TYPE == TIMER_SERVICE_CHANNEL)))
//		ifpvr = C_ATTR_INACTIVE;
//	set_container_active(&timer_con_duration,ifpvr);	

 	msel = &timer_msel_rec_type;
 	get_prog_at(settimer->wakeup_channel, &p_node);
 	/*if((TIMER_MODE == TIMER_MODE_OFF) || (TIMER_SERVICE_TYPE != TIMER_SERVICE_DVR_RECORD) || (p_node.ca_mode == 1) )
 	{
 		ifpvr = C_ATTR_INACTIVE;
 		settimer->wakeup_message = 0;
 	}
	else if((TIMER_SERVICE_TYPE == TIMER_SERVICE_DVR_RECORD) && (!pvr_info.hdd_valid))
	          ifpvr = C_ATTR_INACTIVE;
 	else
 		  ifpvr = C_ATTR_ACTIVE;
	set_container_active(&timer_con_duration,ifpvr);	
 	set_container_active(&timer_con_rec_type,ifpvr);	*/
 	if(ifpvr == C_ATTR_ACTIVE)
 	{
 		if(settimer->wakeup_message > 2)
 			settimer->wakeup_message = 0;
 	}
 	OSD_SetMultiselSel(&timer_msel_rec_type, settimer->wakeup_message);

	if(update)
	{
		OSD_DrawObject((POBJECT_HEAD)&timer_con_servicetype, C_UPDATE_ALL);
		OSD_DrawObject((POBJECT_HEAD)&timer_con_serviceinfo, C_UPDATE_ALL);
		OSD_DrawObject((POBJECT_HEAD)&timer_con_wakeupdate, C_UPDATE_ALL);
		OSD_DrawObject((POBJECT_HEAD)&timer_con_wakeupweekday, C_UPDATE_ALL);
		OSD_DrawObject((POBJECT_HEAD)&timer_con_wakeuptime, C_UPDATE_ALL);
		OSD_DrawObject((POBJECT_HEAD)&timer_con_duration, C_UPDATE_ALL);
		OSD_DrawObject((POBJECT_HEAD)&timer_con_rec_type, C_UPDATE_ALL);
	}
}
Пример #29
0
static void cti_mat_display(BOOL update)
{
	char str[100];
	cas_sc_t cardinfo;
	UINT8 *uniStr=NULL;

	memset(&cardinfo,0,sizeof(cas_sc_t));
	cas_get_sc_info_req(&cardinfo);

	if(cardinfo.sc_status==0)
	{
		memset(str,0,sizeof(str));
		//sprintf(str,"%s","Maturity Level");
		uniStr = OSD_GetUnicodeString(RS_CTI_MATURITY_RATING);
		ComUniStrToAsc(uniStr,str);
		OSD_SetTextFieldContent(&cti_mat_item_txt1, STRING_ANSI, (UINT32)(str));

		memset(str,0,sizeof(str));
		//sprintf(str,"%s","Input PIN to modify");
		uniStr = OSD_GetUnicodeString(RS_CTI_INPUT_PIN);
		ComUniStrToAsc(uniStr,str);
		OSD_SetTextFieldContent(&cti_mat_item_txt2, STRING_ANSI, (UINT32)(str));

		OSD_SetMultiselSel(&cti_mat_item_select, cardinfo.parental_rating);

		memset(str,0,sizeof(str));
		sprintf(str,"%s","--------");
		input_pin_char_cnt=0;
		memset(input_pin_chars,0,sizeof(input_pin_chars));
		OSD_SetTextFieldContent(&cti_mat_item_pin, STRING_ANSI, (UINT32)(str));
		OSD_SetContainerFocus(&g_win_cti_set_maturity,1);

	}
	else
	{
		memset(str,0,sizeof(str));
		if(cardinfo.sc_insert==1)//card in ,reading card
			sprintf(str,"%s","Reading smart card.");
		else
			sprintf(str,"%s","Smart card error!");
		OSD_SetTextFieldContent(&cti_mat_item_txt1, STRING_ANSI, (UINT32)(str));

		memset(str,0,sizeof(str));
		sprintf(str,"%s","");
		OSD_SetTextFieldContent(&cti_mat_item_txt2, STRING_ANSI, (UINT32)(str));

		OSD_SetMultiselSel(&cti_mat_item_select, MATURITY_LEVEL_COUNT);

		memset(str,0,sizeof(str));
		sprintf(str,"%s","");
		input_pin_char_cnt=0;
		memset(input_pin_chars,0,sizeof(input_pin_chars));
		OSD_SetTextFieldContent(&cti_mat_item_pin, STRING_ANSI, (UINT32)(str));

		OSD_SetContainerFocus(&g_win_cti_set_maturity,0);

	}

	if(update)
	{
		OSD_DrawObject((POBJECT_HEAD )&cti_mat_item_con1,C_UPDATE_ALL);
		OSD_DrawObject((POBJECT_HEAD )&cti_mat_item_con2,C_UPDATE_ALL);
		if(cardinfo.sc_status==0)
		{
			OSD_TrackObject((POBJECT_HEAD )&cti_mat_item_con1,C_DRAW_SIGN_EVN_FLG| C_UPDATE_ALL);
		}
	}

}
Пример #30
0
static PRESULT satsrch_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	MULTISEL* msel;
	UINT16 title_id,sat_idx,sat_cnt;
	OSD_RECT rect;
	POBJECT_HEAD lastitem;
	SYSTEM_DATA* sys_data = sys_data_get();
	UINT16 i;
	UINT8 flag;
	S_NODE s_node;
	
	switch(event)
	{
	case EVN_PRE_OPEN:
		sat_idx = 0;
		if(!single_multi_srch_flag)
		{
			if(sys_data_get_cur_satidx() == (UINT16)(~0))
				sat_idx = win_load_default_satidx();
			else
				sat_idx = sys_data_get_cur_satidx();
		}
		
		recreate_sat_view(VIEW_ALL, 0);

#if (defined(SUPPORT_TWO_TUNER) || !defined(SELECT_SAT_ONLY))				
		for(i=0;i<get_sat_num(VIEW_ALL);i++)
		{
			get_sat_at((UINT16)i,VIEW_ALL,&s_node);

			flag = s_node.tuner1_valid | s_node.tuner2_valid;

			if(s_node.selected_flag != flag)
			{
				s_node.selected_flag = flag;
				modify_sat(s_node.sat_id, &s_node);
			}				
		}
#endif				
		
		msel = satsrch_sels[SAT_ID - 1];
		sat_cnt = get_tuner_sat_cnt(TUNER_EITHER_SELECT);
		OSD_SetMultiselCount(msel, sat_cnt);		
		if(sat_idx >= sat_cnt)
		{
			sat_idx = 0;
		}
		OSD_SetMultiselSel(msel,sat_idx);
		if(single_multi_srch_flag)
			title_id = RS_INSTALLATION_MULTI_SEARCH;
		else
			title_id = RS_INSTALLATION_SINGLE_SEARCH;
		wincom_open_subtitle(pObj,title_id,0);

		/*lastitem = (POBJECT_HEAD)&satsrch_item7;
		if(single_multi_srch_flag)
			OSD_SetObjpNext(lastitem, &satsrch_multisats_back);
			//OSD_SetObjpNext(lastitem, NULL);
		else
			OSD_SetObjpNext(lastitem, NULL);*/
		
		win_satsrch_set_nitactive(FALSE);
		set_container_active(&satsrch_item6, C_ATTR_INACTIVE);
		get_sat_at(sat_idx,SET_SELECTED,&s_node);
		if(sys_data->antenna_connect_type == ANTENNA_CONNECT_DUAL_DIFF)
		{
		#ifdef SUPPORT_SELECT_SAME_SAT
			OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, ((s_node.reserve_1 == 0)? RS_LNB1 : RS_LNB2));
		#else
			OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, (s_node.tuner1_valid ? RS_LNB1 : RS_LNB2));		
		#endif
		}
		else
		{
			OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, RS_LNB1);
		}
		OSD_DrawObject((POBJECT_HEAD)&satsrch_txt6_note, C_UPDATE_ALL);
#ifndef SUPPORT_TWO_TUNER
             remove_menu_item(&g_win_sat_srchset,(POBJECT_HEAD)&satsrch_item6,(CON_H + CON_GAP));     //guop add  
#endif
		break;
	case EVN_POST_OPEN:
	    if(single_multi_srch_flag == 1)
		{
			OSD_DrawObject((POBJECT_HEAD)&satsrch_split,C_UPDATE_ALL);
	    }
		win_satsrch_set_drawselectsats();
		break;
	case EVN_PRE_CLOSE:
		/* 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);
		break;			
			
	}

	return ret;
}