Ejemplo n.º 1
0
static PRESULT disk_operate_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	char temp[30];
	UINT8 *cur_select = NULL;
	
	switch(event)
	{
	case EVN_PRE_OPEN:
		switch(operate_type)
		{
			case OPERATE_TYPE_PART_FORMAT:
				STRCPY(temp, "Disk Mode");
				cur_select = &mode_select;
				break;
			case OPERATE_TYPE_DVR_SET:
				STRCPY(temp, "DVR Type");
				cur_select = &dvr_select_type;
				break;
			case OPERATE_TYPE_PART_COPY:
				STRCPY(temp, "Dest Partition");
				cur_select = &partition_select;
				break;
#ifdef DISK_MANAGER_SUPPORT
			case OPERATE_TYPE_DISK_REMOVE:
				STRCPY(temp, "Remove");
				cur_select = &disk_select;
				break;
#endif
			default:
				break;
		}
		ComAscStr2Uni(temp, display_strs[0]);
		win_disk_info_set_string(operate_type, *cur_select);
		break;
	case EVN_POST_OPEN:
		break;
	case EVN_PRE_CLOSE:
		/* Make OSD not flickering */
		*((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG;			
		break;
	case EVN_POST_CLOSE:
		if (menu_stack_get_top() == NULL)
			OSD_ClearObject((POBJECT_HEAD)&g_win_disk_operate, C_UPDATE_ALL);
		break;			
	}
	
	return ret;
}
Ejemplo n.º 2
0
static PRESULT disk_operate_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	char temp[30];
	UINT8 *cur_select = NULL;
	TEXT_FIELD* txt;
	txt = &disk_operate_txt1;

	switch(event)
	{
	case EVN_PRE_OPEN:
		switch(operate_type)
		{
			case 0:
				//sprintf(temp, "%s", "Disk Mode");
				OSD_SetTextFieldContent(txt, STRING_ID, RS_DISK_MODE);
				cur_select = &mode_select;
				break;
			case 1:
				//sprintf(temp, "%s", "DVR Type");
				OSD_SetTextFieldContent(txt, STRING_ID, RS_DVR_TYPE);
				cur_select = &dvr_select_type;
				break;
			case 2:
				//sprintf(temp, "%s", "Dest Partition");
				cur_select = &partition_select;
				break;
			default:
				break;
		}
		//ComAscStr2Uni(temp, display_strs[0]);
		win_disk_info_set_string(operate_type, *cur_select);
		break;
	case EVN_POST_OPEN:
		break;
	case EVN_PRE_CLOSE:
		/* Make OSD not flickering */
		*((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG;			
		break;
	case EVN_POST_CLOSE:
		break;			
	}
	
	return ret;
}
Ejemplo n.º 3
0
static PRESULT disk_operate_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	char temp[30];
	UINT8 *cur_select = NULL;
	
	switch(event)
	{
	case EVN_PRE_OPEN:
		switch(operate_type)
		{
			case 0:
				sprintf(temp, "%s", "Disk Mode");
				cur_select = &mode_select;
				break;
			case 1:
				sprintf(temp, "%s", "DVR Type");
				cur_select = &dvr_select_type;
				break;
			case 2:
				sprintf(temp, "%s", "Dest Partition");
				cur_select = &partition_select;
				break;
			default:
				break;
		}
		ComAscStr2Uni(temp, display_strs[0]);
		win_disk_info_set_string(operate_type, *cur_select);
		break;
	case EVN_POST_OPEN:
		break;
	case EVN_PRE_CLOSE:
		/* Make OSD not flickering */
		*((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG;			
		break;
	case EVN_POST_CLOSE:
		break;			
	}
	
	return ret;
}
Ejemplo n.º 4
0
static PRESULT disk_operate_item_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8	unact;
	UINT8	id = OSD_GetObjID(pObj);
	OSD_RECT rect;
	COM_POP_LIST_PARAM_T param;
	UINT8 *cur_select = NULL;
	UINT8 cur_mode_num;
	COM_POP_LIST_TYPE_T type;
		
	switch(event)
	{
		case EVN_PRE_CHANGE:
			break;
		case EVN_POST_CHANGE:
			break;
		case EVN_UNKNOWN_ACTION:
			unact = (VACTION)(param1>>16) ;
			if(id != MENU_DISK_FORMAT)
				break;
			switch(operate_type)
			{
				case 0:
					type = POP_LIST_DISK_MODE;
					cur_select = &mode_select;
					cur_mode_num = disk_format_mode_num;
					break;
				case 1:
					type = POP_LIST_DVR_TYPE;
					cur_select = &dvr_select_type;
					cur_mode_num = dvr_type_num;
					break;
				case 2:
					type = POP_LIST_PARTITION;
					cur_select = &partition_select;
					cur_mode_num = partition_num;
					break;
				default:
					break;
			}
			if(unact == VACT_ENTER)
			{
				rect.uLeft = CON_L + SEL_L_OF;
				rect.uWidth = SEL_W;
				rect.uHeight = 200;//150;
				param.selecttype = POP_LIST_SINGLESELECT;
				param.cur = *cur_select;
				rect.uTop=CON_T + SEL_T_OF + SEL_H;
				*cur_select = win_com_open_sub_list(type,&rect,&param);
				win_disk_info_set_string(operate_type, *cur_select);
				OSD_TrackObject(pObj,C_UPDATE_ALL);
			}
			else if((unact == VACT_DECREASE) || (unact == VACT_INCREASE))
			{
				if(unact == VACT_DECREASE)
					*cur_select = (*cur_select + cur_mode_num - 1) % cur_mode_num;
				else
					*cur_select = (*cur_select + 1) % cur_mode_num;
				win_disk_info_set_string(operate_type, *cur_select);
				OSD_TrackObject(pObj,C_UPDATE_ALL);
			}
			break;
		default:
			break;
	}

	return ret;
}