Ejemplo n.º 1
0
static PRESULT win_newcamd_input(POBJECT_HEAD pobj)
{
	EDIT_FIELD	*eft;
	UINT8* new_name;
	UINT16 uni_name[50];
	UINT32 value;


	eft = (EDIT_FIELD*)pobj;
	value =OSD_GetEditFieldContent(eft);
	ComUniStrCopy(uni_name, (UINT16 *)value);

#ifndef KEYBOARD_SUPPORT
	if(win_rename_open(uni_name,&new_name,NULL))
#else
	if(win_keyboard_rename_open(uni_name,&new_name,NULL))
#endif
	{
		ComUniStrCopy(uni_name,new_name);
		OSD_SetEditFieldContent(eft, STRING_UNICODE, (UINT32)uni_name);
	}

	OSD_TrackObject((POBJECT_HEAD)eft, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);

}
Ejemplo n.º 2
0
static PRESULT win_sat_edit_name(POBJECT_HEAD pobj)
{
	EDIT_FIELD	*eft;
	UINT32 sat_longitude;
	UINT8* new_name;
	UINT16 uni_name[50];
	UINT32 value;


	eft = &sate_edt2;
	sat_longitude = OSD_GetEditFieldContent(eft);//backup the content
	
	eft = &sate_edt1;
	value =OSD_GetEditFieldContent(eft);
	ComUniStrCopy(uni_name, (UINT16 *)value);

#ifndef KEYBOARD_SUPPORT
	if(win_rename_open(uni_name,&new_name,NULL))
#else
	if(win_keyboard_rename_open(uni_name,&new_name,NULL))
#endif
	{
		ComUniStrCopy(uni_name,new_name);
		OSD_SetEditFieldContent(eft, STRING_UNICODE, (UINT32)uni_name);
	}

	eft = &sate_edt2;
	OSD_SetEditFieldContent(eft, STRING_NUMBER, sat_longitude);//fill the backup content
	eft = &sate_edt1;
	OSD_TrackObject((POBJECT_HEAD)eft, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);

}
Ejemplo n.º 3
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:
		win_favgrplst_set_display();
		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(win_keyboard_rename_open(uni_name,&new_name,favgrp_check_input_name))
#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;
}
Ejemplo n.º 4
0
static PRESULT map_city_list_unact_proc(VACTION act)
{
	PRESULT ret = PROC_PASS;
	OBJLIST* ol;
	UINT16 curitem;
	UINT8 back_saved;
 	SYSTEM_DATA* p_sys_data = sys_data_get();
	UINT16 uni_name[30];
	UINT8* new_name;
	char strTmp[30];
	char strTmp1[30];
	char strTmp2[30];
	
	ol = &ol_map_city;
	curitem = OSD_GetObjListNewPoint(ol);
	
	switch (act)
	{
		case VACT_MAP_CITY_EDIT:
			//ComAscStr2Uni(p_sys_data->map_city_name[curitem], uni_name);
			MEMCPY(uni_name,(UINT16*)p_sys_data->map_city_name[curitem],(MAP_CITY_NAME_LEN + 1));
			wincom_close_help();
#ifndef KEYBOARD_SUPPORT
			if(win_rename_open(uni_name,&new_name,map_city_check_input_name))
#else
#if (defined(GZ1105002)||defined(GZ1105003)||defined(GZ1105004)||defined(GZ1105005)||defined(GZ1105006))	
			if(win_rename_open(uni_name,&new_name,map_city_check_input_name))
#else
			if(win_keyboard_rename_open(uni_name,&new_name,map_city_check_input_name))
#endif				
#endif
			{
				//ComUniStrToAsc(new_name,p_sys_data->map_city_name[curitem]);
				ComUniStrCopyChar(p_sys_data->map_city_name[curitem], new_name);
			}		
			wincom_open_help_OK_list_small((POBJECT_HEAD)&g_win_map_city, map_city_helpinfo, HELP_CNT);
			OSD_TrackObject(ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
			break;
		case VACT_MAP_CITY_ADD:
			if (OSD_GetObjListCount(ol) == MAP_CITY_MAX_NUM)
			{
				win_compopup_init(WIN_POPUP_TYPE_OK);
				ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_THE_LIST_IS_FULL),strTmp);
				win_compopup_set_msg((UINT8*)strTmp,NULL,0);
				win_compopup_open_ext(&back_saved);
				break;
			}
			
			memset(uni_name, 0x0, sizeof(uni_name));
			wincom_close_help();
#ifndef KEYBOARD_SUPPORT
			if(win_rename_open(uni_name,&new_name, map_city_check_input_name))
#else
#if (defined(GZ1105002)||defined(GZ1105003)||defined(GZ1105004)||defined(GZ1105005)||defined(GZ1105006))	
			if(win_rename_open(uni_name,&new_name, map_city_check_input_name))
#else
			if(win_keyboard_rename_open(uni_name,&new_name,map_city_check_input_name))
#endif
#endif
			{
				//ComUniStrToAsc(new_name, p_sys_data->map_city_name[OSD_GetObjListCount(ol)]);
				ComUniStrCopyChar(p_sys_data->map_city_name[OSD_GetObjListCount(ol)],new_name);
			}
			
			map_city_list_load();
			wincom_open_help_OK_list_small((POBJECT_HEAD)&g_win_map_city, map_city_helpinfo, HELP_CNT);
			OSD_TrackObject(ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
			break;
		case VACT_MAP_CITY_DEL:
			map_city_delete(curitem);
			map_city_list_load();
			OSD_TrackObject(ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
			break;			
		case VACT_MAP_CITY_DOWNLOAD:
			city_index = curitem;
			s_mapdl_handle = map_download(p_sys_data->map_city_name[curitem], 14);
			bMapDownloading = TRUE;
			win_compopup_init(WIN_POPUP_TYPE_SMSG);
			//ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_CONNECTINF_WAITE),strTmp1);
			win_compopup_set_msg(/*(UINT8*)strTmp1*/NULL,NULL,RS_CONNECTINF_WAITE);
			win_compopup_open_ext(&back_saved);
			break;
		case VACT_MAP_SEARCH:
			memset(search_string, 0x0, sizeof(search_string));
			wincom_close_help();
			if (win_map_search_input_menu_open(search_string))
			{
				s_mapdl_handle = map_download(search_string, 14);
				bMapDownloading = FALSE;
				win_compopup_init(WIN_POPUP_TYPE_SMSG);
				//ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_CONNECTINF_WAITE),strTmp2);
				win_compopup_set_msg(/*(UINT8*)strTmp2*/NULL,NULL,RS_CONNECTINF_WAITE);
				win_compopup_open_ext(&back_saved);
			}
			wincom_open_help_OK_list_small((POBJECT_HEAD)&g_win_map_city, map_city_helpinfo, HELP_CNT);
			break;

		default:
			break;
	}

	return ret;
}
Ejemplo n.º 5
0
static PRESULT map_city_list_unact_proc(VACTION act)
{
	PRESULT ret = PROC_PASS;
	OBJLIST* ol;
	UINT16 curitem;
	UINT8 back_saved;
 	SYSTEM_DATA* p_sys_data = sys_data_get();
	UINT16 uni_name[30];
	UINT8* new_name;
	
	ol = &ol_map_city;
	curitem = OSD_GetObjListNewPoint(ol);
	
	switch (act)
	{
		case VACT_MAP_CITY_EDIT:
	//		ComAscStr2Uni(p_sys_data->map_city_name[curitem], uni_name);
			MEMCPY(uni_name,(UINT16*)p_sys_data->map_city_name[curitem],(MAP_CITY_NAME_LEN + 1));
#ifndef KEYBOARD_SUPPORT
			if(win_rename_open(uni_name,&new_name,map_city_check_input_name))
#else
			if(win_keyboard_rename_open(uni_name,&new_name,map_city_check_input_name))
#endif
			{
		//		ComUniStrToAsc(new_name,p_sys_data->map_city_name[curitem]);
				ComUniStrCopyChar(p_sys_data->map_city_name[curitem], new_name);

			}
			
			OSD_TrackObject(ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
			break;
		case VACT_MAP_CITY_ADD:
			if (OSD_GetObjListCount(ol) == MAP_CITY_MAX_NUM)
			{
				win_compopup_init(WIN_POPUP_TYPE_OK);
				win_compopup_set_msg(NULL,NULL,RS_LIST_IS_FULL);
				win_compopup_open_ext(&back_saved);
				break;
			}
			
			memset(uni_name, 0x0, sizeof(uni_name));
#ifndef KEYBOARD_SUPPORT
			if(win_rename_open(uni_name,&new_name, map_city_check_input_name))
#else
			if(win_keyboard_rename_open(uni_name,&new_name,map_city_check_input_name))
#endif
			{
	//				ComUniStrToAsc(new_name, p_sys_data->map_city_name[OSD_GetObjListCount(ol)]);
				ComUniStrCopyChar(p_sys_data->map_city_name[OSD_GetObjListCount(ol)],new_name);
			}
			
			map_city_list_load();
			OSD_TrackObject(ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
			break;
		case VACT_MAP_CITY_DEL:
			map_city_delete(curitem);
			map_city_list_load();
			OSD_TrackObject(ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
			break;			
		case VACT_MAP_CITY_DOWNLOAD:
			city_index = curitem;
			map_download(p_sys_data->map_city_name[curitem], 14);
			bMapDownloading = TRUE;
			win_compopup_init(WIN_POPUP_TYPE_SMSG);
			win_compopup_set_msg(NULL,NULL,RS_CONNECTING_WAIT);
			win_compopup_open_ext(&back_saved);
			break;
		case VACT_MAP_SEARCH:
			memset(search_string, 0x0, sizeof(search_string));

			if (win_map_search_input_menu_open(search_string))
			{
				map_download(search_string, 14);
				bMapDownloading = FALSE;
				win_compopup_init(WIN_POPUP_TYPE_SMSG);
				win_compopup_set_msg(NULL,NULL,RS_CONNECTING_WAIT);
				win_compopup_open_ext(&back_saved);
			}
			break;

		default:
			break;
	}

	return ret;
}
Ejemplo n.º 6
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;
}
Ejemplo n.º 7
0
static PRESULT weathercitylst_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;
	UINT8 back_saved, i;
	char strTmp[30];
	char strTmp1[30];

   	SYSTEM_DATA* sys_data = sys_data_get();

	ol = &weather_city_olist;
	curitem = OSD_GetObjListNewPoint(ol);
	
	switch(event)
	{
	case EVN_PRE_DRAW:
		weathercitylst_set_display();
		break;
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);
		
		if(unact== VACT_CITY_EDIT)
		{
			//ComAscStr2Uni(sys_data->weather_city_name[curitem], uni_name);
			MEMCPY(uni_name,(UINT16*)sys_data->weather_city_name[curitem],(WEATHER_CITY_NAME_LEN + 1));
#ifndef KEYBOARD_SUPPORT
			if(win_rename_open(uni_name,&new_name,weathercity_check_input_name))
#else
			if(win_keyboard_rename_open(uni_name,&new_name,weathercity_check_input_name))
#endif
			{
				//ComUniStrToAsc(new_name,sys_data->weather_city_name[curitem]);
				ComUniStrCopyChar(sys_data->weather_city_name[curitem], new_name);
			}
			
			OSD_TrackObject(ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
		}
		else if(unact == VACT_CITY_DEL)
		{
			weathercitylst_delete(curitem);
			weathercitylst_load_list();
			OSD_TrackObject(ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
		}
		else if(unact== VACT_CITY_ADD)
		{
			if (OSD_GetObjListCount(ol) == WEATHER_CITY_MAX_NUM)
			{
				win_compopup_init(WIN_POPUP_TYPE_OK);
				//ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_THE_LIST_IS_FULL),strTmp);
				win_compopup_set_msg(/*(UINT8*)strTmp*/NULL,NULL,RS_THE_LIST_IS_FULL);
				win_compopup_open_ext(&back_saved);
				break;
			}
			
			memset(uni_name, 0x0, sizeof(uni_name));
#ifndef KEYBOARD_SUPPORT
			if(win_rename_open(uni_name,&new_name,weathercity_check_input_name))
#else
			if(win_keyboard_rename_open(uni_name,&new_name,weathercity_check_input_name))
#endif
			{
				//ComUniStrToAsc(new_name,sys_data->weather_city_name[OSD_GetObjListCount(ol)]);
				ComUniStrCopyChar(sys_data->weather_city_name[OSD_GetObjListCount(ol)],new_name);
			}
			
			weathercitylst_load_list();
			OSD_TrackObject(ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
		}
		else if(unact == VACT_CITY_ENTER)
		{
		if(weath==0)
			{
			weath = weather_download(sys_data->weather_city_name[curitem]);	
			win_compopup_init(WIN_POPUP_TYPE_SMSG);
			//ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_CONNECTINF_WAITE),strTmp1);
			win_compopup_set_msg(/*(UINT8*)strTmp1*/NULL,NULL,RS_CONNECTINF_WAITE);
			win_compopup_open_ext(&back_saved);
			ret=weath;
			}
		}
		
		break;
	}

	return ret;
}