Esempio n. 1
0
static PRESULT win_an_set_unkown_act_proc(VACTION act)   //guop edit 20101014
{

    switch(act)
	{

           case VACT_SINGLE_SEARCH:
		   	single_multi_srch_flag = 0;
		  	//if(check_node_modified(TYPE_SAT_NODE) )
		   {
			UINT8	back_saved;
			win_compopup_init(WIN_POPUP_TYPE_SMSG);
			win_compopup_set_msg(NULL, NULL, RS_MSG_SAVING_DATA);
			win_compopup_open_ext(&back_saved);
			update_data(TYPE_SAT_NODE);
			osal_task_sleep(200);
			win_compopup_smsg_restoreback();
		   }
			if(OSD_ObjOpen((POBJECT_HEAD)&g_win_sat_srchset, 0xFFFFFFFF) != PROC_LEAVE)
				menu_stack_push((POBJECT_HEAD)&g_win_sat_srchset);
			wincom_close_help();
	             break;
	      case VACT_MULTI_SEARCH:
		   	single_multi_srch_flag = 1;
		  //	if(check_node_modified(TYPE_SAT_NODE) )
		   {
			UINT8	back_saved;
			win_compopup_init(WIN_POPUP_TYPE_SMSG);
			win_compopup_set_msg(NULL, NULL, RS_MSG_SAVING_DATA);
			win_compopup_open_ext(&back_saved);
			update_data(TYPE_SAT_NODE);
			osal_task_sleep(200);
			win_compopup_smsg_restoreback();
		   }
			if(OSD_ObjOpen((POBJECT_HEAD)&g_win_sat_srchset, 0xFFFFFFFF) != PROC_LEAVE)
				menu_stack_push((POBJECT_HEAD)&g_win_sat_srchset);
			wincom_close_help();
	             break;
				 
	      case VACT_TP_SEARCH:
		 // 	if(check_node_modified(TYPE_SAT_NODE) )
		   {
			UINT8	back_saved;
			win_compopup_init(WIN_POPUP_TYPE_SMSG);
			win_compopup_set_msg(NULL, NULL, RS_MSG_SAVING_DATA);
			win_compopup_open_ext(&back_saved);
			update_data(TYPE_SAT_NODE);
			osal_task_sleep(200);
			win_compopup_smsg_restoreback();
		   }

			if(OSD_ObjOpen((POBJECT_HEAD)&g_win_tplist, 0xFFFFFFFF) != PROC_LEAVE)
				menu_stack_push((POBJECT_HEAD)&g_win_tplist);
	             break;
		

    }
}
Esempio n. 2
0
UINT32 win_movefile_open(FileListHandle move_dirlist, char *move_device)
{
	UINT32 hkey;
	CONTAINER	*pop_win;
	TEXT_FIELD *pTxt;
	PRESULT ret = PROC_LOOP;

    BOOL old_value = ap_enable_key_task_get_key(TRUE);

	win_move_dirlist = move_dirlist;
	STRCPY(movefile_cur_device, move_device);
	move_file_flag = 0;

	pop_win = &g_win_mp_move;
	OSD_SetContainerFocus(pop_win, 1);
	wincom_backup_region(&pop_win->head.frame);
	OSD_ObjOpen((POBJECT_HEAD)pop_win, 0);
	while(ret != PROC_LEAVE)
	{
		hkey = ap_get_key_msg();
		if(hkey == INVALID_HK || hkey == INVALID_MSG)
			continue;

		ret = OSD_ObjProc((POBJECT_HEAD)pop_win, (MSG_TYPE_KEY<<16),hkey, 0);
	}
	wincom_restore_region();
    ap_enable_key_task_get_key(old_value);

	return move_file_flag;
}
Esempio n. 3
0
static PRESULT Containerca_set2_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8 id = 0;
	VACTION act;

	switch (event)
	{
		case EVN_UNKNOWN_ACTION:
			act = (VACTION)(param1 >> 16);
			switch (act)
			{
			case VACT_ITEM_SELECT:
				id = OSD_GetFocusID(pObj);
				if (NULL != ca_set_windows_list[id - 1])
				{
					if (OSD_ObjOpen(ca_set_windows_list[id - 1], 0xFFFFFFFF) != PROC_LEAVE)
						menu_stack_push(ca_set_windows_list[id - 1]);
				}
				break;
			default:
				break;
			}
			ret = PROC_LOOP;
			break;
		default:
			break;
	}
	return ret;
}
Esempio n. 4
0
UINT32 win_youtube_open()
{

	CONTAINER* win;
	PRESULT ret = PROC_LOOP;
	UINT32 hkey;
	TEXT_FIELD* txt;
	UINT16 strID;

    BOOL old_value = ap_enable_key_task_get_key(TRUE);
 	txt = &youtube_opts_title;
	
	strID = RS_YOUTUBE_OPTION;
	OSD_SetTextFieldContent(txt, STRING_ID,(UINT32)strID);

	win = &win_youtube_opts_con;
	OSD_SetContainerFocus(win, MENU_YT_OPTS);

	OSD_ObjOpen((POBJECT_HEAD)win, 0);
	 
	while(ret != PROC_LEAVE)
	{
	    hkey = ap_get_popup_msg(C_POPUP_MSG_PASS_CI);
        if(hkey == INVALID_HK || hkey == INVALID_MSG)
            continue;

		ret = OSD_ObjProc((POBJECT_HEAD)win, (MSG_TYPE_KEY<<16),hkey, 0);
	}
    ap_enable_key_task_get_key(old_value);

	return youtube_search_ok;	
}
Esempio n. 5
0
void win_playlist_open(WIN_PLAYLIST_TYPE playlist_type)
{
	UINT32 hkey;
	VSCR vscr;
	CONTAINER	*pop_win;
	TEXT_FIELD *pTxt;
	PRESULT ret = PROC_LOOP;

    BOOL old_value = ap_enable_key_task_get_key(TRUE);

	cur_playlist_type = playlist_type;
	cur_display_playlist = win_play_list[playlist_type];
		
	pop_win = &g_win_usb_playlist;
	OSD_SetContainerFocus(pop_win, 1);
	wincom_backup_region(&pop_win->head.frame);
	OSD_ObjOpen((POBJECT_HEAD)pop_win, 0);
	while(ret != PROC_LEAVE)
	{
		hkey = ap_get_key_msg();
		if(hkey == INVALID_HK || hkey == INVALID_MSG)
			continue;

		ret = OSD_ObjProc((POBJECT_HEAD)pop_win, (MSG_TYPE_KEY<<16),hkey, 0);
	}
	wincom_restore_region();
    ap_enable_key_task_get_key(old_value);
}
Esempio n. 6
0
UINT32 win_tpe_open(UINT32 mode,UINT32 sat_id,UINT32 tp_id)
{

	CONTAINER* win;
	PRESULT ret = PROC_LOOP;
	UINT32 hkey;
	TEXT_FIELD* txt;
	UINT16 strID;

    BOOL old_value = ap_enable_key_task_get_key(TRUE);
 	txt = &tpe_title;
	if(mode == 0)
		strID = RS_INFO_EDIT_TP;
	else
		strID = RS_INFO_ADD_TP;
	OSD_SetTextFieldContent(txt, STRING_ID,(UINT32)strID);

	win = &g_win_tp_edit;
	OSD_SetContainerFocus(win, TP_FREQ_ID);
	win_tpe_set_mode(mode,sat_id,tp_id);

	OSD_ObjOpen((POBJECT_HEAD)win, 0);
	 
	while(ret != PROC_LEAVE)
	{
	    hkey = ap_get_popup_msg(C_POPUP_MSG_PASS_CI);
        if(hkey == INVALID_HK || hkey == INVALID_MSG)
            continue;

		ret = OSD_ObjProc((POBJECT_HEAD)win, (MSG_TYPE_KEY<<16),hkey, 0);
	}
    ap_enable_key_task_get_key(old_value);

	return edit_tp_ok;	
}
Esempio n. 7
0
static PRESULT camail_list_item_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	POBJECT_HEAD pmenu;
	OBJLIST* ol;
	TEXT_FIELD* txt;
	UINT16 curitem;
	
	switch(event)
	{
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);		
		if(unact ==  VACT_ENTER)
		{
			pmenu = OSD_GetContainerNextObj((CONTAINER*)pObj);
			txt = (TEXT_FIELD*)OSD_GetObjpNext(pmenu);
			if(ComUniStrLen(txt->pString)>0)
			{
				ol = &mail_olist;
				curitem = OSD_GetObjListNewPoint(ol);
			 	
				pmenu = (POBJECT_HEAD)&g_win_camsg_detail;
				if(OSD_ObjOpen(pmenu, MENU_OPEN_TYPE_MENU + curitem) != PROC_LEAVE)
					menu_stack_push(pmenu);
			}
			ret = PROC_LOOP;
		}
		break;
	}
	return ret;
}
Esempio n. 8
0
static PRESULT purse_list_item_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	UINT8	bID ;
	UINT16  icon_id, top;
	POBJECT_HEAD submenu;	
	
 	bID = OSD_GetObjID(pObj);
	top = OSD_GetObjListTop(&purse_olist);	
	cur_purse = bID + top;

	switch(event)
	{
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);
		if(unact == VACT_ENTER)
		{
			if(0 != purse_cnt)
			{
			submenu = (POBJECT_HEAD)&win_token_con;
			if(OSD_ObjOpen(submenu, MENU_OPEN_TYPE_MENU) != PROC_LEAVE)
				menu_stack_push(submenu);					
		        }
		}
		break;
	}
	return ret;
}
Esempio n. 9
0
static PRESULT newcamd_unknowact_proc(POBJECT_HEAD pObj,UINT32 vact)
{
	PRESULT ret = PROC_PASS;
			
	switch(vact)
	{
		case VACT_SETLAN:
			//if(OSD_ObjOpen((POBJECT_HEAD)&g_win_localsetting, 0 ) != PROC_LEAVE)
	 		//	menu_stack_push((POBJECT_HEAD)&g_win_localsetting);
			break;
			
		case VACT_RESTART:
			//newcamd_display_info2(TRUE,newcamd_serinfo[g_newcamd_curidx-1].cas_sys_type);
			break;
			
		case VACT_EDIT_SERVER:
			if(OSD_ObjOpen((POBJECT_HEAD)&g_win_newcamd_setting, 0 ) != PROC_LEAVE)
	 			menu_stack_push((POBJECT_HEAD)&g_win_newcamd_setting);
			break;
			
		case VACT_SPECIAL:
#ifdef NEWCAMD_SUPPORT_EXT16_SERVER
			newcamd_modify_proc();
#endif			
			break;
	
		case VACT_CHANNEL_UP: //channel up
			break;
		case VACT_CHANNEL_DOWN: //channel down
			break;

	}

	return ret;
}
Esempio n. 10
0
static PRESULT  otaset_btn_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	POBJECT_HEAD pmenu;
	
	switch(event)
	{
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);
		if(unact == VACT_ENTER)
		{
			win_otaset_get_FreqSymbPid_display();

			pmenu = (POBJECT_HEAD)&g_win_otaupg ;
			if(OSD_ObjOpen(pmenu, MENU_OPEN_TYPE_MENU + EDIT_TP_START_ID) != PROC_LEAVE)
				menu_stack_push(pmenu);

			ret = PROC_LOOP;
		}
		break;
	}

	return ret;
}
Esempio n. 11
0
UINT8 win_map_search_input_menu_open(char *string)
{
	CONTAINER	*win;
	PRESULT ret = PROC_LOOP;
	UINT32 hkey;
	TEXT_FIELD	*txt;
	EDIT_FIELD	*eft;
	UINT16 strID;
	UINT32 value = 0;
	UINT8 input_string[MAP_SEARCH_INPUT_LEN];

	BOOL old_value = ap_enable_key_task_get_key(TRUE);
	
	bMapSearchInputOK = FALSE;
	
 	txt = &txt_map_search_input_title;
 	
	strID = RS_HELP_SEARCH;
		
	OSD_SetTextFieldContent(txt, STRING_ID,(UINT32)strID);

	eft = &edt_map_search_input_item;
	OSD_SetEditFieldContent(eft, STRING_ANSI, "");

	win = &g_win_map_search_input;
	OSD_SetContainerFocus(win, 1);

	OSD_SetTextFieldContent(&txt_map_search_input_caps,STRING_ANSI,(UINT32)btn_txt_strs[0]);
	OSD_SetTextFieldContent(&txt_map_search_input_del,STRING_ANSI,(UINT32)btn_txt_strs[1]);
	OSD_SetTextFieldContent(&txt_map_search_input_ok,STRING_ANSI,(UINT32)btn_txt_strs[2]);	
	OSD_SetTextFieldContent(&txt_map_search_input_cancel,STRING_ANSI,(UINT32)btn_txt_strs[3]);

	wincom_backup_region(&(win->head.frame));

	OSD_ObjOpen((POBJECT_HEAD)win, 0);
	
	while(ret != PROC_LEAVE)
	{
	    hkey = ap_get_key_msg();
        if(hkey == INVALID_HK || hkey == INVALID_MSG)
            continue;

		ret = OSD_ObjProc((POBJECT_HEAD)win, (MSG_TYPE_KEY<<16),hkey, 0);
	}

	if (bMapSearchInputOK)
	{
		eft = &edt_map_search_input_item;
		value = OSD_GetEditFieldContent(eft);
		ComUniStrToAsc((UINT8 *)value, input_string);
		map_search_input_get_string(string, input_string);
	}

	wincom_restore_region();

    	ap_enable_key_task_get_key(old_value);
    	
	return bMapSearchInputOK;
}
Esempio n. 12
0
static void win_mpegYTplayer_set_video_vol(UINT32 key)
{
	UINT32 hkey;
	OSD_ObjOpen((POBJECT_HEAD)&g_win_volume, MENU_OPEN_TYPE_KEY + key);
	menu_stack_push((POBJECT_HEAD) &g_win_volume);
	ap_vk_to_hk(0, key, &hkey);
	ap_send_msg(CTRL_MSG_SUBTYPE_KEY, hkey, FALSE);
}
Esempio n. 13
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;
}
Esempio n. 14
0
static void callback(UINT8 type, INT32 wparam, UINT32 lparam)
{
	UINT8 row, col, back_saved;
	UINT8 winner;
	win_popup_choice_t popResult;

	switch (type)
	{
		case TRANCHESS:
			row = wparam / 10-1;
			col = wparam % 10-1;
			draw_chess(row, col, (UINT8)lparam);
			break;

		case USER_NO_STEP:
			break;

		case COMPUTER_NO_STEP:
			break;

		case GAME_OVER:
			winner = (UINT8)wparam;
			update_status(Class, BlackPoint, WhitePoint);

			win_compopup_init(WIN_POPUP_TYPE_OK);
			win_compopup_set_frame(GAME_MSG_LEFT, GAME_MSG_TOP, GAME_MSG_WIDTH, GAME_MSG_HEIGHT);

			if (winner == COMPUTER_WIN)
			{
				//"Sorry! You lost!"
				win_compopup_set_msg_ext(NULL, NULL, RS_GAME_SORRY_YOU_LOST);
			}
			else if (winner == USER_WIN)
			{
				//"You Win!"
				win_compopup_set_msg_ext(NULL, NULL, RS_GAME_YOU_WIN);
			}
			else
			{
				//"DOGFALL!"
				win_compopup_set_msg_ext(NULL, NULL, RS_GAME_DOGFALL);
			}
			win_compopup_open_ext(&back_saved);

			othello_init();
            OSD_ObjOpen((POBJECT_HEAD)&game_con, 0xFFFFFFFF) ;    
			/*
			othello_draw_background();
			update_status(Class, BlackPoint, WhitePoint,TRUE);

			OSD_SetAttr((POBJECT_HEAD) &txt_start, C_ATTR_ACTIVE);
			OSD_ChangeFocus((POBJECT_HEAD) &game_con, 1,  \
				C_UPDATE_FOCUS | C_DRAW_SIGN_EVN_FLG);
            */
			break;
	}
}
Esempio n. 15
0
BOOL win_keyboard_rename_open(UINT16* set_name,UINT8** ret_name,check_name_func check_func )
{
	UINT16 strID;
	UINT32 hkey;
	PRESULT ret;
	TEXT_FIELD	*txt;
	EDIT_FIELD *edf;
	CONTAINER	*win;

	win = &g_win_find;
	wincom_backup_region(&win->head.frame);
    set_color_style();
    BOOL old_value = ap_enable_key_task_get_key(TRUE);

	strID = RS_HELP_RENAME;
	win_keyboard_set_title(strID);
	name_valid_func = check_func;
	check_ok = FALSE;
#ifndef KEYBOARD_SUPPORT
	edf = &find_edt1;
	MEMSET(input_name_str,0,sizeof(input_name_str));
	OSD_SetEditFieldContent(edf, STRING_UNICODE, (UINT32)set_name);
#else
	txt = &find_input;
	MEMSET(input_name_str,0,sizeof(input_name_str));
	OSD_SetTextFieldContent(txt, STRING_UNICODE,(UINT32)set_name);
#endif
   
	win = &g_win_find;
	set_keyboard_flag(TRUE);

    find_init_keys();
	find_set_key_display();
    
	ret = OSD_ObjOpen((POBJECT_HEAD)win, 0);	
	while(ret != PROC_LEAVE)
	{
		hkey = ap_get_key_msg();
		if(hkey == INVALID_HK || hkey == INVALID_MSG)
		    continue;

		ret = OSD_ObjProc((POBJECT_HEAD)win, (MSG_TYPE_KEY<<16),hkey, 0);
	}
	if(check_ok)
	{
		*ret_name = (UINT8*)input_name_str;
	}
	else
	{
		*ret_name = NULL;
	}
	set_keyboard_flag(FALSE);
	wincom_restore_region();
    ap_enable_key_task_get_key(old_value);

	return (check_ok);
}
static void operator_info_enter_detail(ID id)
{
	POBJECT_HEAD temp = NULL;
	UINT8 a=1;
	switch(id)
	{
		case OPINFO_SERVICE_ENTITLE:
			temp = (POBJECT_HEAD)&g_win_service_entitle;
			break;
		case OPINFO_WALLET_INFO:
			temp = (POBJECT_HEAD)&g_win_walletinfo;
			break;
		case OPINFO_IPPV_INFO:
			temp = (POBJECT_HEAD)&g_win_IPPVinfo;
			break;
		case OPINFO_CHILD_PARENT_CARD:
//			From_op_info_menu = 1;
			temp = (POBJECT_HEAD)&g_win_feedcard;
			break;
		case OPINFO_DETITLE:
			temp = (POBJECT_HEAD)&g_win_detitle;
			break;
		case OPINFO_AREA_CODE:
			temp = (POBJECT_HEAD)&g_win_eigenvalue_info;
			break;
		default:
			break;
	}

	if(temp != NULL)
	{
		//OSD_ObjClose((POBJECT_HEAD)&g_win_operator_info_detail, C_CLOSE_CLRBACK_FLG);
		//wincom_close_help(1);
		if (OSD_ObjOpen(temp, 0xFFFFFFFF)!= PROC_LEAVE)
		{
			menu_stack_push(temp);
		}
		else
		{
			OSD_ObjOpen((POBJECT_HEAD)&g_win_operator_info_detail, 0xFFFFFFFF);
		}
	}
}
Esempio n. 17
0
static void cti_PPID_detail_info_display()
{
	POBJECT_HEAD submenu;
	UINT8 PPID_id[3];
	char pin[9];
	cas_pin_t casPIN;
	int ret=0;
	UINT32 PPID=0;
	UINT8 back_saved;

	//check PIN
	if(!win_pin_open(NULL,0))
	{
		return;
	}

	win_compopup_init(WIN_POPUP_TYPE_SMSG);
	//win_compopup_set_msg("Reading PPID detail info.",NULL, 0);
	win_compopup_set_msg(NULL,NULL, RS_CTI_READING_PPID_DETAIL);
	win_compopup_open_ext(&back_saved);
	
	memcpy(PPID_id,cti_PPID_list.info[g_PPID_itemIdx-1].id,3);
	win_pin_get_input(pin, sizeof(pin));
	memcpy(casPIN.pin_code,pin,8);
	casPIN.pin_len = STRLEN(casPIN.pin_code);

	memset(&cti_PPID_detInfo,0,sizeof(cas_PPID_detailed_info_t));
	ret=cas_get_sc_PPID_detailed(PPID_id, &casPIN, &cti_PPID_detInfo);
	//osal_task_sleep(1000);
	win_compopup_smsg_restoreback();
	//soc_printf("qjzheng---PPID.id = %02x%02x%02x,pin=%s,len=%d\n",PPID_id[0],PPID_id[1],PPID_id[2],casPIN.pin_code,casPIN.pin_len);
	if(ret!=0)
	{

		//soc_printf("qjzheng--to get PPID detail info error =%d\n",ret);
		
		osal_task_sleep(500);
		win_compopup_init(WIN_POPUP_TYPE_SMSG);
		//win_compopup_set_msg("Read PPID detail info error!",NULL, 0);
		win_compopup_set_msg(NULL,NULL, RS_CTI_READ_PPID_DETAIL_ERROR);
		win_compopup_open_ext(&back_saved);
		osal_task_sleep(1000);
		win_compopup_smsg_restoreback();
		return;
	}
	
	//to enter PPID_info detail
	submenu = (POBJECT_HEAD)&g_win_cti_PPID_info;

	if(OSD_ObjOpen(submenu, MENU_OPEN_TYPE_MENU|g_PPID_curID) != PROC_LEAVE)
	{
		menu_stack_push(submenu);					
	}
}
Esempio n. 18
0
static void enter_sub_menu(POBJECT_HEAD* menus, UINT32 idx)
{
	POBJECT_HEAD sub_menu_win;

	sub_menu_win = menus[idx];
	if(sub_menu_win != NULL)
	{
		if(OSD_ObjOpen(sub_menu_win,MENU_OPEN_TYPE_MENU + idx + C_SUBMENU_ID_BASE) != PROC_LEAVE)
 			menu_stack_push(sub_menu_win);
 	}
}
Esempio n. 19
0
static PRESULT cti_item_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	UINT8 bID;
	POBJECT_HEAD submenu;	

	bID = OSD_GetObjID(pObj);

	switch(event)
	{
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);
		if(unact == VACT_ENTER )//&&Correct_card==1)
		{
			switch(bID)
			{
			case CTI_CARD_INFO_ID:
				submenu = (POBJECT_HEAD)&g_win_cti_cardinfo;
				if(OSD_ObjOpen(submenu, MENU_OPEN_TYPE_MENU | bID) != PROC_LEAVE)
					menu_stack_push(submenu);					
				break;
			case CTI_PPID_INFO_ID:
				submenu = (POBJECT_HEAD)&g_win_cti_PPID;
				if(OSD_ObjOpen(submenu, MENU_OPEN_TYPE_MENU | bID) != PROC_LEAVE)
					menu_stack_push(submenu);					
				break;
			case CTI_MATURITY_RATING_ID:
				submenu = (POBJECT_HEAD)&g_win_cti_set_maturity;
				if(OSD_ObjOpen(submenu, MENU_OPEN_TYPE_MENU | bID) != PROC_LEAVE)
					menu_stack_push(submenu);					
				break;
			case CTI_CARD_PIN_ID:
				submenu = (POBJECT_HEAD)&g_win_cti_pin;
				if(OSD_ObjOpen(submenu, MENU_OPEN_TYPE_MENU | bID) != PROC_LEAVE)
					menu_stack_push(submenu);					
				break;
			case CTI_BMAIL_ID:
				submenu = (POBJECT_HEAD)&g_win_cti_mail;
				if(OSD_ObjOpen(submenu, MENU_OPEN_TYPE_MENU | bID) != PROC_LEAVE)
					menu_stack_push(submenu);					
				break;
	///*		
			case CTI_USER_VIEW:
				submenu = (POBJECT_HEAD)&g_win_cti_userview;
				if(OSD_ObjOpen(submenu, MENU_OPEN_TYPE_MENU | bID) != PROC_LEAVE)
					menu_stack_push(submenu);					
				break;
			//*/
			}
		}
		break;
	default:
		;
	}
	return ret;
}
Esempio n. 20
0
void BackToFullScrPlay()
{
	OSD_RECT rect;
	UINT16 cur_channel;
	UINT8 no_channel = 0, back_saved;

	ap_clear_all_menus();
	menu_stack_pop_all();

	cur_channel = sys_data_get_cur_group_cur_mode_channel();
	recreate_prog_view(VIEW_ALL | PROG_TVRADIO_MODE , 0);
	if (get_prog_num(VIEW_ALL | PROG_TV_MODE, 0) == 0)
	{
		no_channel = 1;
	}
	if (get_prog_num(VIEW_ALL | PROG_RADIO_MODE, 0) > 0)
	{
		if (no_channel)
			sys_data_set_cur_chan_mode(RADIO_CHAN);
		no_channel = 0;
	}

	if (no_channel)
	{
		if (OSD_ObjOpen((POBJECT_HEAD) &g_win_mainmenu, MENU_OPEN_TYPE_STACK) != PROC_LEAVE)
			menu_stack_push((POBJECT_HEAD) &g_win_mainmenu);
	}
	else
	{
		hde_set_mode(VIEW_MODE_FULL);
		vpo_ioctl(g_vpo_dev, VPO_IO_DIRECT_ZOOM, 0);
		/* Clear OSD */
		OSD_GetRectOnScreen(&rect);
		OSDDrv_RegionFill((HANDLE)g_osd_dev, 0, &rect, OSD_TRANSPARENT_COLOR);
		/* show mute & pause status*/
		ShowMuteOnOff();
		ShowPauseOnOff();
//		ap_cas_message_show();
		/* show channel index */
		key_pan_display_channel(cur_channel);

		if(GetChannelParrentLock())
		{
			api_play_channel(cur_channel,TRUE,TRUE,FALSE);
		}
		//--{{{退到全屏播放的时候,弹出INFO BAR
		ap_send_msg(CTRL_MSG_SUBTYPE_CMD_ENTER_ROOT, (UINT32)CHANNEL_BAR_HANDLE, TRUE);	
	}
}
Esempio n. 21
0
void win_playlist_setup_open(void)
{
	UINT32 hkey;
	CONTAINER	*pop_win;
	PRESULT ret = PROC_LOOP;

    BOOL old_value = ap_enable_key_task_get_key(TRUE);
	pop_win = &g_win_slidesetup;
	OSD_SetContainerFocus(pop_win, 1);
	wincom_backup_region(&pop_win->head.frame);
	OSD_ObjOpen((POBJECT_HEAD)pop_win, 0);
	while(ret != PROC_LEAVE)
	{
		hkey = ap_get_key_msg();
		if(hkey == INVALID_HK || hkey == INVALID_MSG)
			continue;

		ret = OSD_ObjProc((POBJECT_HEAD)pop_win, (MSG_TYPE_KEY<<16),hkey, 0);
	}
	wincom_restore_region();
    ap_enable_key_task_get_key(old_value);
}
Esempio n. 22
0
static PRESULT satsrch_item_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8 bID;
	VACTION unact;
	POBJECT_HEAD submenu;
	UINT8 back_saved;
		
	bID = OSD_GetObjID(pObj);

	switch(event)
	{
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);
		if(unact == VACT_ENTER && bID == START_ID)
		{
			
			if(single_multi_srch_flag && get_tuner_sat_cnt(TUNER_EITHER_SELECT) == 0)
			{
				win_compopup_init(WIN_POPUP_TYPE_OK);
				win_compopup_set_msg(NULL, NULL, RS_DISPLAY_NO_SATELLITE);
				win_compopup_open_ext(&back_saved);
				ret = PROC_LOOP;
				break;					
			}
			win_satsrch_set_search_param();
			submenu = (POBJECT_HEAD)&g_win_search;
			if(OSD_ObjOpen(submenu, 0xFFFFFFFF) != PROC_LEAVE)
				menu_stack_push(submenu);
				
			ret = PROC_LOOP;
		}
		
		break;
	}

	return ret;
}
Esempio n. 23
0
PRESULT ap_cas_IPPV_proc()
{
	static UINT8 flag = 0;
	POBJECT_HEAD p_top_menu = menu_stack_get_top();
	
	if ((MAIN_MENU_HANDLE == menu_stack_get(0)) \
		||(EPG_HANDLE == menu_stack_get_top()) \
		||(LIT_CHAN_LIST_HANDLE == menu_stack_get_top()) \
		||(CHAN_LIST_HANDLE == menu_stack_get_top()) \
		||(SEARCHN_HANDLE == menu_stack_get_top()) \
		)
	{
		//current_ippv_ecm = ecmpid;
		return;
	}
	

	//avoid to open the same window frequently, i see this scenario on site
//	if (0 ==win_ippv_check_request())
//		return;
	
	if((p_top_menu == CHANNEL_BAR_HANDLE)
		||(p_top_menu == AUDIO_HANDLE)
		||(p_top_menu == VOLUMEBAR_HANDLE))
	{
		OSD_ObjClose ( p_top_menu, C_CLOSE_CLRBACK_FLG );
		menu_stack_pop();
	}
			
	if (OSD_ObjOpen((POBJECT_HEAD)&g_win_ippv_popup, 0xFFFFFFFF) != PROC_LEAVE)
	{
    	if ((POBJECT_HEAD)&g_win_ippv_popup != menu_stack_get_top())
    		menu_stack_push((POBJECT_HEAD)&g_win_ippv_popup);
	}

	return;
}
Esempio n. 24
0
static PRESULT map_city_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8 back_saved;
	INT32 news_list_num = 0;
	UINT8 focusID = OSD_GetFocusID( pObj);
	char strTmp[30];

	switch(event)
	{
		case EVN_PRE_OPEN:
#ifdef EXIT_KEY_EXIT_ALL_MENU
	         exit_key_flag =  FALSE;
#endif	
			bMapDownloading = FALSE;
			map_city_list_load();
			break;
		case EVN_POST_OPEN:
			wincom_open_subtitle(pObj,RS_MAP,0);
			//wincom_open_commen_help(pObj);
			wincom_open_help_OK_list_small(pObj, map_city_helpinfo, HELP_CNT);
			memset(search_string, 0x0, sizeof(search_string));
			break;
		case EVN_PRE_CLOSE:
			map_download_abort(s_mapdl_handle);
			s_mapdl_handle = 0;
			sys_data_save(1);
			break;
		case EVN_POST_CLOSE:
			SetReplayHintState(0);
			ShowReplayHintOSDOnOff(0);
			wincom_close_subtitle();
			wincom_close_help();
#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:
			if (param1 == CTRL_MSG_SUBTYPE_STATUS_DOWNLOAD_FINISH)
			{
				bMapDownloading = FALSE;
				s_mapdl_handle = 0;
				if ((int)param2 >= 0)
				{
					win_compopup_smsg_restoreback();
					wincom_close_subtitle();
					wincom_close_help();
					OSD_ClearObject((POBJECT_HEAD)&g_win_map_display,0);
					if(OSD_ObjOpen(&g_win_map_display, param2) != PROC_LEAVE)
					{
						menu_stack_push(&g_win_map_display);
					}
						
				}
				else
				{
					win_compopup_smsg_restoreback();
					win_compopup_init(WIN_POPUP_TYPE_OK);
					//ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_ERROR),strTmp);
					win_compopup_set_msg(NULL,NULL,RS_ERROR);
					win_compopup_open_ext(&back_saved);
					ret = PROC_LOOP;
				}
			}
			break;
		default:
			break;
	}

	return ret;
}
Esempio n. 25
0
static PRESULT win_imageslide_unkown_act_proc(VACTION act)
{
	PRESULT ret = PROC_PASS;
	UINT8 rotate_mode, display_mode;
	POBJECT_HEAD win,mplayer_menu;
	int next_image;
	UINT16 slide_interval;
	FileInfo file_node;
	char image_name[FULL_PATH_SIZE];
	
	switch(act)
	{
	case VACT_ROTATEL:
	case VACT_ROTATER:
		if(FALSE == decode_finish_flag)
			break;
		
		if(imageslide_pause_state == IMG_UNPAUSE_STATE)
		{
			api_stop_timer(&imageslide_timer_id);
			imageslide_pause_state = IMG_PAUSE_STATE;
		}
		if(act == VACT_ROTATER)
		{
			image_rot_ang = (image_rot_ang + 1)%IMAGE_ANGLE_CNT;
		}
		else
		{
			image_rot_ang = (image_rot_ang+IMAGE_ANGLE_CNT - 1)%IMAGE_ANGLE_CNT;
		}
		
		image_rotate(image_rot_ang);
		
		if(image_rot_ang == ANG_ORI)
		{
			win_imageslide_showrotate(FALSE);
			win_imageslide_showpause();
		}
		else
		{
			OSD_ClearObject((POBJECT_HEAD)&imageslide_pause, 0);
			win_imageslide_showrotate(TRUE);
		}
		slideidx_display(TRUE);
		break;
	case VACT_INCREASE:
	case VACT_DECREASE:
		if(imageslide_pause_state == IMG_UNPAUSE_STATE)
		{
			api_stop_timer(&imageslide_timer_id);
			imageslide_pause_state = IMG_PAUSE_STATE;
			win_imageslide_showpause();
		}
		if(act == VACT_INCREASE)
		{
			next_image = get_next_index_from_play_list(cur_playlist_image);
		}
		else
		{
			next_image = get_previous_index_from_play_list(cur_playlist_image);
		}
		if(next_image != -1)
		{
			cur_image_idx = next_image;
			api_stop_timer(&imageslide_timer_id);
			image_abort();
			if(image_rot_ang!= ANG_ORI)
			{
				image_rot_ang = ANG_ORI;
				win_imageslide_showrotate(FALSE);
				win_imageslide_showpause();
			}
			osal_task_sleep(20);
			set_play_list_info(cur_playlist_image,&cur_image_idx,NULL);
			get_file_from_play_list(cur_playlist_image, cur_image_idx, &file_node);
			win_get_fullname(image_name, file_node.path, file_node.name);
			win_image_file_play(image_name, image_rot_ang);
			decode_finish_flag = FALSE;
			osal_task_sleep(20);
			slideidx_display(TRUE);
		}
		break;
	case VACT_PAUSE:
		if(imageslide_pause_state == IMG_UNPAUSE_STATE)
		{
			imageslide_pause_state = IMG_PAUSE_STATE;
			win_imageslide_showpause();
			api_stop_timer(&imageslide_timer_id);
		}
	    else
	    {
			if(image_rot_ang == ANG_ORI)
			{
				imageslide_pause_state = IMG_UNPAUSE_STATE;
				slide_interval = (image_slide_setting.uTime_gap * 1000);
				win_imageslide_showpause();
				if(0 != image_slide_setting.uTime_gap)
					imageslide_timer_id = api_start_timer("IMAGESLIDE",slide_interval,win_imageslide_handler);
			}
	    }
		ret = PROC_LOOP;
		break;
	case VACT_PLAY:
		if(IMG_PAUSE_STATE == imageslide_pause_state)
		{
			if(image_rot_ang == ANG_ORI)
			{
				imageslide_pause_state = IMG_UNPAUSE_STATE;
				win_imageslide_showpause();
				slide_interval = (image_slide_setting.uTime_gap * 1000);
				if(0 != image_slide_setting.uTime_gap)
					imageslide_timer_id = api_start_timer("IMAGESLIDE",slide_interval,win_imageslide_handler);
			}
		}
		ret = PROC_LOOP;
		break;
	case VACT_ZOOM:
		if(decode_finish_flag)
		{
			if(imageslide_pause_state == IMG_UNPAUSE_STATE)
			{
				imageslide_pause_state = IMG_PAUSE_STATE;
				win_imageslide_showpause();
				api_stop_timer(&imageslide_timer_id);
			}

			win_mpzoom_open();

			if(image_rot_ang == ANG_ORI)
			{
				imageslide_pause_state = IMG_UNPAUSE_STATE;
				slide_interval = (image_slide_setting.uTime_gap * 1000);
				win_imageslide_showpause();
				imageslide_timer_id = api_start_timer("IMAGESLIDE",slide_interval,win_imageslide_handler);
			}
		}
		break;
	case VACT_MP:
		win = (POBJECT_HEAD)(&g_win_imageslide);
		OSD_ObjClose(win,C_CLOSE_CLRBACK_FLG);

		while((POBJECT_HEAD)&g_win_usb_filelist != menu_stack_get_top())
		{
			menu_stack_pop();
		}
		
		image_abort();
		win_set_image_multiview_firstidx();
		mplayer_menu = (POBJECT_HEAD)(&g_win_imagepreview);

		if(OSD_ObjOpen(mplayer_menu,(UINT32)(~0)) != PROC_LEAVE)
			menu_stack_push(mplayer_menu);
		break;
	default:
		break;
	}

	return ret;
}
Esempio n. 26
0
static PRESULT atnsetm_item_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	UINT8 bID;
	UINT8 back_saved;
	win_popup_choice_t choice;
	UINT32 i,n;
	S_NODE s_node;
	POBJECT_HEAD submenu;
	BOOL b;
	
	bID = OSD_GetObjID(pObj);
	
	switch(event)
	{
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);
		if(unact == VACT_ENTER)
		{
			if(bID == MOTORSET_ID || bID == LIMIT_SETUP)
			{
				b = win_atnsetm_check_save_motor_antenna_setting();
				if(!b)
				{
					win_compopup_init(WIN_POPUP_TYPE_OK);
					win_compopup_set_msg(NULL, NULL, RS_MSG_OUT_RANGE);
					win_compopup_open_ext(&back_saved);
					ret = PROC_LOOP;
					break;
				}
			}
			
				
			if(bID == RESETPOS_ID)
			{
				win_compopup_init(WIN_POPUP_TYPE_OKNO);
				win_compopup_set_msg(NULL, NULL, RS_ARE_YOU_SURE_CLEAR_SET_SATE_POSITON);
				//choice = win_compopup_open_ext(&back_saved);
				choice = win_compopup_open_enh((POBJECT_HEAD)&g_win_antenna_set_motor, 1, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);

				if(choice != WIN_POP_CHOICE_YES)
					break;

				/* Reset all satellite's position of current tuner to 0*/				
				n = get_sat_num(VIEW_ALL);
				recreate_sat_view(VIEW_ALL,0);
				for(i=0;i<n;i++)
				{ 
					get_sat_at(i,VIEW_ALL,&s_node);

					if( (antset_cur_tuner == 0 && s_node.position!= 0)
						|| (antset_cur_tuner == 10 && s_node.tuner2_antena.position!= 0) )
					{
						if(antset_cur_tuner == 0)
							s_node.position = 0;
						else
							s_node.tuner2_antena.position = 0;	
						modify_sat(s_node.sat_id,&s_node);							
					}
				}
				update_data();
			}
			else if(bID == MOTORSET_ID)
			{
				submenu = (POBJECT_HEAD)&g_win_motorset;
				if(OSD_ObjOpen(submenu, MENU_OPEN_TYPE_MENU | bID) != PROC_LEAVE)
					menu_stack_push(submenu);					
					
			}
			else if(bID == LIMIT_SETUP)
			{
				submenu = (POBJECT_HEAD)&g_win_motor_limitsetup;
				if(OSD_ObjOpen(submenu, MENU_OPEN_TYPE_MENU | bID) != PROC_LEAVE)
					menu_stack_push(submenu);					
			}
		}
	}

	return ret;
}
Esempio n. 27
0
static PRESULT atnsetm_item_sel_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT32 sel;
	UINT8 bID;
 	char str[10];
    UINT16 * Uni_str;
    UINT8* pstr;
	SYSTEM_DATA* sys_data;
	POBJECT_HEAD other_antset_menu;
	VACTION unact;
	COM_POP_LIST_TYPE_T list_type;
	OSD_RECT rect;
	COM_POP_LIST_PARAM_T param;
	UINT16 cur_idx;
	BOOL b;
	UINT8 back_saved;

	sys_data = sys_data_get();

	bID = OSD_GetObjID(pObj);

	switch(event)
	{
	case EVN_PRE_CHANGE:
		sel = *((UINT32*)param1);
		if(bID == TUNER_ID)
		{
			if(TUNER_CNT < 2)
			{
				ret = PROC_LOOP;
				break;
			}

			b = win_atnsetm_check_save_motor_antenna_setting();
			if(!b)
			{
				win_compopup_init(WIN_POPUP_TYPE_OK);
				win_compopup_set_msg(NULL, NULL, RS_MSG_OUT_RANGE);
				win_compopup_open_ext(&back_saved);
				ret = PROC_LOOP;
				break;
			}

			/* Check tuner : sel has selected satellite or not.*/
			if(get_tuner_sat_cnt(sel)  == 0)
			{
				UINT8 back_saved;
				win_compopup_init(WIN_POPUP_TYPE_OK);
				win_compopup_set_msg(NULL,NULL, RS_TUNER_HAS_NO_SATE_SEL);
				win_compopup_open_ext(&back_saved);
				antset_cur_tuner = (sel == 0)? 1: 0;
				ret = PROC_LOOP;
			}
			else
				cur_tuner_idx = antset_cur_tuner = sel;
			
		}
		break;
	case EVN_POST_CHANGE:
		sel = param1;
		if(bID == TUNER_ID)
		{
			
			if(sys_data->tuner_lnb_type[sel] != LNB_MOTOR)
			{
				/* Need to change : Fixed antenna setting menu. */
				other_antset_menu = (POBJECT_HEAD)&g_win_antenna_set_fixed;
				if(OSD_ObjOpen(other_antset_menu, MENU_OPEN_TYPE_MENU + bID) != PROC_LEAVE)
				{
					menu_stack_pop();
					menu_stack_push(other_antset_menu);
				}
				ret  = PROC_LOOP;
			}
			else
			{
				//win_atnsetm_load_sat_cnt(TRUE);
				win_atnsetm_load_motor_antenna_setting(TRUE);
			}
		}
		else if(bID == MOTOR_ID)
		{
			win_atnsetm_load_local_action(TRUE);		
		}
#ifdef SUPPORT_UNICABLE
		else if(bID == LNB_ID)
		{
			if(win_unicable_setting_open(LNB_IDX))
				OSD_TrackObject((POBJECT_HEAD)&g_win_antenna_set_motor, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
		}
#endif
		break;		
	case EVN_REQUEST_STRING:
		sel = param1;
		Uni_str= (UINT16*)param2;
		get_lnb_name(sel,Uni_str);
		break;
		
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);
		if(unact == VACT_ENTER)
		{
			OSD_SetRect2(&rect,&pObj->frame);
			/*Patch: For solve pop-up windows show bugs,for example: Universal(5150-10600) can not be all show*/
			OSD_SetRect(&rect, rect.uLeft, rect.uTop, (rect.uWidth + 10), rect.uHeight);
			param.selecttype = POP_LIST_SINGLESELECT;
			switch(bID)
			{
			case LNB_ID:
				list_type = POP_LIST_TYPE_LNB;
				rect.uHeight = 330;
				param.cur = LNB_IDX;
				break;
			default:
				list_type = 0xFF;
				break;
			}

			if(list_type == 0xFF)
				break;

			cur_idx = win_com_open_sub_list(list_type,&rect,&param);
			if(cur_idx == LIST_INVALID_SEL_IDX || cur_idx == param.cur)
				break;		

			if(bID == LNB_ID)
			{
				LNB_IDX = cur_idx;
				OSD_TrackObject((POBJECT_HEAD)anesetm_items[LNB_ID - 1], C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);	
#ifdef SUPPORT_UNICABLE
				if(win_unicable_setting_open(LNB_IDX))
					OSD_TrackObject((POBJECT_HEAD)&g_win_antenna_set_motor, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
#endif
			}
			
		}		
		break;
	}

	return ret;
}
Esempio n. 28
0
BOOL win_timerset_open(TIMER_SET_CONTENT* settimer,TIMER_SET_CONTENT* rettimer,BOOL check_starttime)
{
	POBJECT_HEAD pObj = (POBJECT_HEAD)&g_win_timerset;
	PRESULT bResult = PROC_LOOP;
	UINT32 hkey;
	UINT8 cur_mode,mode;
	UINT8 group_idx;
	date_time dt,dt1;

    BOOL old_value = ap_enable_key_task_get_key(TRUE);
	sys_data_check_channel_groups();
	cur_mode  = sys_data_get_cur_chan_mode();
	group_idx = sys_data_get_cur_group_index();
	
	
	timer_set_ok_cancel_flag = 0;

	MEMSET(&timer_set,0,sizeof(TIMER_SET_CONTENT));

	if(settimer != NULL)
		MEMCPY(&timer_set,settimer,sizeof(TIMER_SET_CONTENT));
	
	if(timer_set.timer_mode != TIMER_MODE_OFF 
		&& timer_set.timer_service !=TIMER_SERVICE_MESSAGE) 
	{
		if(timer_set.wakeup_chan_mode>1)
			timer_set.wakeup_chan_mode = 1;
		
		mode = timer_set.wakeup_chan_mode;
	}
	else
	{
		mode = cur_mode;
		timer_set.wakeup_chan_mode = cur_mode;
	}
	if(timer_set.timer_mode == TIMER_MODE_OFF)
	{
		timer_set_modify_add_flag = TIMER_ADD;
		timer_set_check_starttime_flag = 1;
	}
	else
	{
		timer_set_modify_add_flag = TIMER_MODIFY;
		timer_set_check_starttime_flag = 1;
	}
	
	get_local_time(&dt1);

	dt1.min = dt1.min/10*10;
	dt1.sec = 0;
	convert_time_by_offset(&dt,&dt1,0,10);	
	
	if(timer_set_modify_add_flag ==  TIMER_ADD)
	{
		timer_set.wakeup_year 	= dt.year;
		timer_set.wakeup_month	= dt.month;
		timer_set.wakeup_day	= dt.day;
		timer_set.wakeup_time  = dt.hour * 60 + dt.min;
		timer_set.wakeup_state = TIMER_STATE_READY;
	}
	if(timer_set.timer_service == TIMER_SERVICE_MESSAGE)
		timer_set.wakeup_duration_time = 0;
		

	sys_data_set_cur_chan_mode(mode);
	sys_data_change_group(0);  
	
	OSD_SetContainerFocus(&g_win_timerset, TIMER_MODE_ID);
	OSD_ObjOpen(pObj, MENU_OPEN_TYPE_OTHER);

	while(bResult != PROC_LEAVE)
	{

		hkey = ap_get_key_msg();
	    if(hkey == INVALID_HK || hkey == INVALID_MSG)
	    {
	    	win_timerset_set_currenttime(TRUE);
	        continue;
	    }
		
		bResult = OSD_ObjProc(pObj, (MSG_TYPE_KEY<<16),hkey, 0);		
	}

	if(timer_set_ok_cancel_flag)
		MEMCPY(rettimer,&timer_set,sizeof(TIMER_SET_CONTENT));
	
	sys_data_set_cur_chan_mode(cur_mode);
	sys_data_change_group(group_idx);  
	sys_data_save(1);
    ap_enable_key_task_get_key(old_value);
	return timer_set_ok_cancel_flag;

}
Esempio n. 29
0
static PRESULT sys_item_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8 id = 0;
	VACTION act;
	OSD_RECT rct;
	SYSTEM_DATA *psys = NULL;
	psys = sys_data_get();
	struct smc_device *smc_dev;
	smc_dev = (struct smc_device *)dev_get_by_id(HLD_DEV_TYPE_SMC, 0);

	rct.uHeight = 130;
	rct.uWidth = 200;
	rct.uLeft = PREVIEW_L + (PREVIEW_W - rct.uWidth) / 2;
	rct.uTop = PREVIEW_T + PREVIEW_H;

	switch (event)
	{
		case EVN_UNKNOWN_ACTION:
			act = (VACTION)(param1 >> 16);
			switch (act)
			{
			case VACT_ITEM_SELECT:
				id = OSD_GetFocusID(pObj);
#ifdef MULTI_CAS
#if(CAS_TYPE== CAS_DVN)
				if(id==WIN_CA_ID&&(!getIsCardIn()))
				{
					win_popup_msg(NULL, NULL, RS_CAERR_NOSMC);
					break;
				}
#elif(CAS_TYPE== CAS_CONAX)
				if((id == WIN_CA_ID) && (smc_card_exist(smc_dev) != SUCCESS))
				{
					break;
				}
#elif(CAS_TYPE== CAS_ABEL)
				if((id == WIN_CA_ID) && (!api_abel_cas_check_card_inited()))
				{
					win_popup_msg(NULL, NULL, RS_CAERR_NOSMC);
					break;
				}				
#endif
#endif
                    if((id == WIN_PWD_ID)||
                        (psys->menu_lock&&(id == WIN_CA_ID || id == WIN_FACT_ID || id == WIN_OTA_ID)))
				{
					if (!win_pwd_open(NULL, 0, &rct))
						break;
				}
				if ((NULL !=items_list[id - 1]) && (OSD_ObjOpen(items_list[id - 1], 0xFFFFFFFF) != PROC_LEAVE))
					menu_stack_push(items_list[id - 1]);
				break;
			default:
				break;
			}
			ret = PROC_LOOP;
			break;
		default:
			break;
	}
	return ret;
}
Esempio n. 30
0
static PRESULT lan_item_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8	unact,input;
	UINT8	id = OSD_GetObjID(pObj);
	POBJECT_HEAD submenu;
	SYSTEM_DATA* p_sys_data=sys_data_get();
	UINT8 lang_code[8];

	switch(event)
	{		
	case EVN_FOCUS_PRE_GET:
		break;
		
	case EVN_FOCUS_PRE_LOSE:
		break;

	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16) ;
#ifdef SHOW_WELCOME_SCREEN
		if(id != ITEM_NEXT_ID)
		{
#endif
			if(unact == VACT_ENTER)
		{
			win_language_enter_key(pObj,id);
		}
		else if(unact == VACT_DECREASE)
		{
			win_language_left_key(pObj,id);
		}
		else if(unact == VACT_INCREASE)
		{
			win_language_right_key(pObj,id);
		}
#ifdef SHOW_WELCOME_SCREEN
		}
		else if(unact == VACT_ENTER)
		{
    #ifdef EPG_MULTI_LANG
			/*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

    #ifndef NEW_DEMO_FRAME
			UIChChgApplyAudLanguage();
    #endif
			sys_data_save(1);
       	 	TTXEng_set_g0_set();
			//show_win_as_welcome = FALSE;

			submenu = (POBJECT_HEAD) & win_country_net_con;
			if (OSD_ObjOpen(submenu, 0xFFFFFFFF) != PROC_LEAVE)
			{
				menu_stack_pop();
				menu_stack_push(submenu);
			}
		}
#endif
		ret = PROC_LOOP;
		break;
	}
	return ret;

}