⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 guidisplay.cpp.svn-base

📁 sigmadesign smp8623 gui source code ,bingo
💻 SVN-BASE
📖 第 1 页 / 共 3 页
字号:
	return (m_bPasswordOk ? RM_OK : RM_ERROR);}RMstatus RMcuracaoGui::RestorePreviousResolution(){	ShowPopup(m_pnav->SelectedObjectId(), FALSE);	if (m_previousVideoOut)	{		if (m_previousTVStandard)		{			SetTVStandard(m_previousTVStandard, 0, NULL);			m_settings.tvStandard = m_previousTVStandard;			m_pnav->SetMenuItemText(m_settings.tvStandard);		}		SetTVOut(m_previousVideoOut);		m_previousTVStandard = 0;		m_previousVideoOut = 0;		return RM_OK;	}	return RM_ERROR;}void RMcuracaoGui::CheckForSecretCode(RMremoteKey key){	if (m_pnav->ActivePageId() == m_pnav->MainPageId() && !ISPOPUP(m_pnav->SelectedObjectId()))	{		RMuint8 i;		for (i = 0; i < 6; i++)		{			if (m_secretcodeinput[i] == (RMremoteKey) 0)			{				m_secretcodeinput[i] = key;				break;			}		}		if (i == 6)		{			for (i = 0; i < 6; i++)				m_secretcodeinput[i] = (RMremoteKey) 0;			m_secretcodeinput[0] = key;			return;		}		if (RMMemcmp(g_secretmenuCode, m_secretcodeinput, sizeof(g_secretmenuCode)) == 0)		{#ifdef WITH_CSS_MENU			DisplaySecretMenu();#endif		}	}}#ifdef WITH_CSS_MENUvoid RMcuracaoGui::DisplaySecretMenu(){	if(!m_initialized)	{		RMDBGLOG((GUIDBG, "GUI not initialised !!\n"));		return;	}	RMstatus status;	RMuint32 objectId;	guiPopupType popup;	status = m_pnav->GetObjectIdByName(SECRET_MENU_POPUP_NAME, &objectId);	if(RMFAILED(status))	return;	status = m_pnav->GetPopup(objectId, &popup);	if(RMFAILED(status))	return/* status*/;	RMascii *commandName = NULL;	RMbool found = FALSE;	ShowPopup(objectId, TRUE);	// apply current settings by selecting macrovision and then region#ifndef GUI_REFID_2	if(m_settings.macrovisionOn)	commandName = RFREE("SET_MACROVISION_ON_COMMAND");	else	commandName = RFREE("SET_MACROVISION_OFF_COMMAND");#endif	for(RMuint8 j = 0; j < popup.nbButtons; j++)	{		for(RMuint8 k = 0; k < popup.buttons[j]->nbEvents; k++)		{			if(RMCompareAscii(commandName, popup.buttons[j]->events[k]->command))			{				m_pnav->SelectObject(popup.buttons[j]->id);				found = TRUE;				break;			}		}		if(found)		break;	}	if(commandName != (RMascii*)NULL)	{		RFREE(commandName);		commandName = NULL;	}	if(m_settings.dvdRegion == 0)	commandName = RFREE("SET_REGION_0_COMMAND");	else if(m_settings.dvdRegion == 1)	commandName = RFREE("SET_REGION_1_COMMAND");	else if(m_settings.dvdRegion == 2)	commandName = RFREE("SET_REGION_2_COMMAND");	else if(m_settings.dvdRegion == 3)	commandName = RFREE("SET_REGION_3_COMMAND");	else if(m_settings.dvdRegion == 4)	commandName = RFREE("SET_REGION_4_COMMAND");	else if(m_settings.dvdRegion == 5)	commandName = RFREE("SET_REGION_5_COMMAND");	else if(m_settings.dvdRegion == 6)	commandName = RFREE("SET_REGION_6_COMMAND");	if(commandName != (RMascii*)NULL)	{		found = FALSE;		for(RMuint8 j = 0; j < popup.nbButtons; j++)		{			for(RMuint8 k = 0; k < popup.buttons[j]->nbEvents; k++)			{				if(RMCompareAscii(commandName, popup.buttons[j]->events[k]->command))				{					m_pnav->SelectObject(popup.buttons[j]->id);					found = TRUE;					break;				}			}			if(found)			break;		}	}	if(commandName != (RMascii*)NULL)	{		RFREE(commandName);	}	// clear out secret code input	for(RMuint8 i = 0; i < sizeof(m_secretcodeinput) / sizeof(m_secretcodeinput[0]); i++)	m_secretcodeinput[i] = (RMremoteKey)0;	return;}#endif	// WITH_CSS_MENURMstatus RMcuracaoGui::ShowFileLoadingMessage(RMuint32 objectId){	typeIsoPath name;	RMuint16 findex;	RMstatus status = RM_OK;	guiTextTableType table;	if (!ISTEXTTABLE(objectId))		return RM_ERROR;	findex = m_shuffleOn ? m_isoPlayList.shuffled[m_isoPlayList.numCurrentItem] : m_isoPlayList.numCurrentItem;	if (findex >= m_isoPlayList.numItems)		return RM_ERROR;	RMMemset(name, 0, sizeof(typeIsoPath));	if (RMFAILED(GetFileNameFromPath(findex, name)))		return RM_ERROR;	status = m_pnav->GetTextTable(objectId, &table);	if (RMFAILED(status))		return status;	// Here we assume text item 1 is to contain the file name!!!!!!!!!!!!!!!!!!!!!	// Don't know yet how to generalize!!!!!!!!!!!!!!!!!!!!!!!!!!!	if (table.nbItems > 1)		RMCopyAscii(table.items[1]->object.text, name);	status = m_pnav->DisplayTextTable(&table, TRUE, TRUE);	if (RMSUCCEEDED(status))	{		// no clearing needed when loading pictures		if (m_isoPlayList.filetype != FILETYPE_PICTURE)		{			// TODO: (for large jpeg) best to be able to stay on the screen until picture's loaded			Wait(LOADINGFILE_DELAY);			if (m_isoPlayList.filetype == FILETYPE_JPEG)			{				m_pnav->ResetDisplay(TRUE);			}			else			{				status = m_pnav->DisplayTextTable(&table, FALSE, FALSE);			}		}	}	return status;}RMstatus RMcuracaoGui::DisplayFileInfo(RMuint32 objectId, RMbool bShow){	//	typeIsoPath name;	//	RMuint16 findex;	RMstatus status;	//	guiTextTableType table;	guiSliderType* slider = NULL;	//	if(!ISTEXTTABLE(objectId))	//		return RM_ERROR;	//	findex = m_isoPlayList.numCurrentItem;	//	//	if(findex >= m_isoPlayList.numItems)	//		return RM_ERROR;	//	//	RMMemset(name, 0, sizeof(typeIsoPath));	//	if(RMFAILED(GetFileNameFromPath(findex, name)))	//		return RM_ERROR;	//	status = m_pnav->GetSlider(objectId, &slider);	//	if(RMFAILED(status))	//		return status;	for (RMuint8 i = 0; i < 3; i++)	{		if (m_pnav->m_mediaControls->panels[i]->slider && m_pnav->m_mediaControls->panels[i]->slider->id == m_pnav->InfoId())		{			slider = m_pnav->m_mediaControls->panels[i]->slider;		}	}	//	status = m_pnav->GetTextTable(objectId, &table);	//	if(RMFAILED(status))	//		return status;	// Here we assume the location of the respective fields	// Don't know yet how to generalize!!!!!!!!!!!!!!!!!!!!!!!!!!!	//	if(table.nbItems >= 9){	//		typeTextValue value;	//		RMCopyAscii(table.items[1]->object.text, name);	//		if(RMSUCCEEDED(m_pnav->GetFileSize(findex, value)))	//			RMCopyAscii(table.items[3]->object.text, value);	//		else	//			RMCopyAscii(table.items[3]->object.text, NOT_AVAILABLE_TXT);	//	if (m_context->player && !m_bTV)	{		// place file length		RMuint64 length;		//			RMuint32 sec, min, hour;		status = m_context->player->GetInfo(CURACAO_MESSAGE_FILE_DURATION, (void*) (&length));		if (RMSUCCEEDED(status) && length != 0)		{			m_fileInfo.length = (RMuint32) length;			//				ConvertToTime((RMuint32*)&(length), &hour, &min, &sec);			//				printf("%02lu:%02lu:%02lu\n", hour, min, sec);			//		                sprintf(table.items[7]->object.text, "%02lu:%02lu:%02lu", hour, min, sec);			//		}		//			else		//				RMCopyAscii(table.items[7]->object.text, NOT_AVAILABLE_TXT);		//	}	// repeat mode	//		RMCopyAscii(table.items[9]->object.text, m_repeatModeStr);	//	}	//	status = m_pnav->DisplaySlider(slider->id, 50);	//	if(bShow) {	//	RMuint16 index;	//		RMstatus status;	//		if(!m_initialized){	//			RMDBGLOG((GUIDBG, "GUI not initialised !!\n"));	//			return RM_ERROR;	//		}	//	// find slider to draw	//	status = GetObjectIndex(objectId, &index);	//	if(RMFAILED(status))	//		return status;	//		if(slider->min >= slider->max)	//			return RM_ERROR;	//	//		slider->object.stepnumber = 0;//GetSliderStep(objectId, index, value);	//		slider->object.redraw = (m_pnav->m_selectedObjectId != objectId);	//	//	//		status = gfxDrawSlider(m_pRua, 0, 0, &slider->object);	//		if(RMSUCCEEDED(status)){	//			if(m_pnav->m_selectedObjectId != objectId){	//				if(!ISSLIDER(m_pnav->m_selectedObjectId))	//					m_pnav->m_parentObjectId = m_pnav->m_selectedObjectId;	// another slider cannot be parent	//				m_pnav->m_selectedObjectId = objectId;	//			}	////			m_gui.gui->SetTimer(TIMER_SLIDER);	//		}	//	}	if (!bShow)	{		printf("eto tuka sme\n");		m_fileInfo.length = m_fileInfo.time = 0;		//	RMMemset(slider->object.thumbTextTime, 0, sizeof(RMascii) * 10);		//	RMMemset(slider->object.thumbTextLength, 0, sizeof(RMascii) * 10);		//	RMMemset(slider->object.thumbText, 0, 20);		slider->object.stepnumber = 0;		status = m_pnav->RemoveSlider(objectId);	}	//	status = m_pnav->DisplayTextTable(&table, bShow, TRUE);	else	{		// keep object id		m_pnav->SetInfoId(objectId);		status = UpdateFileInfo(&m_fileInfo);	}	return status;}RMstatus RMcuracaoGui::DisplayDvdInfo(RMuint32 objectId, RMbool bShow){	return RM_ERROR;}RMstatus RMcuracaoGui::DisplayVcdInfo(RMuint32 objectId, RMbool bShow){	return RM_ERROR;}RMstatus RMcuracaoGui::DisplayCddaInfo(RMuint32 objectId, RMbool bShow){	return RM_ERROR;}RMstatus RMcuracaoGui::DisplayDvdTimeSearch(RMuint32 objectId){	return RM_ERROR;}RMstatus RMcuracaoGui::DisplayFileTimeSearch(RMuint32 objectId){	RMstatus status;	guiPopupType popup;	if (m_context->player == NULL)		return RM_ERROR;	if (!ISPOPUP(objectId))		return RM_ERROR;	if (m_pnav->SelectedObjectId() == objectId)		return ShowPopup(objectId, FALSE);	status = m_pnav->GetPopup(objectId, &popup);	if (RMFAILED(status))		return status;	// input to popup	// TODO: generalize	if (popup.nbStrings > 2)	{		sprintf(popup.strings[2]->object.text, "%02u:%02u:%02u", 0, 0, 0);	}	return ShowPopup(objectId, TRUE, &popup);}RMstatus RMcuracaoGui::DisplayVcdTimeSearch(RMuint32 objectId){	return RM_ERROR;}void RMcuracaoGui::SetfipPlayMode(){}void RMcuracaoGui::SetfipVideoOut(){}void RMcuracaoGui::SetfipStopMode(){}RMstatus RMcuracaoGui::fipWriteScrollText(RMascii *text){	return RM_OK;}RMstatus RMcuracaoGui::updateScroll(){	return RM_OK;}void RMcuracaoGui::PatchfipText(RMascii *input){}#ifdef WITH_WMVHD_SUPPORTRMstatus RMcuracaoGui::DisplayWMVHDTimeSearch(RMuint32 objectId){	RMstatus status;	guiPopupType popup;	if (m_context->player == NULL)		return RM_ERROR;	if (!ISPOPUP(objectId))		return RM_ERROR;	if (m_MediaList.active == TRUE)	{		RMASSERT(m_MediaList.numCurrentItem> 0);		if (m_pnav->CanSkipMedia(m_MediaList.id[m_MediaList.numCurrentItem]) == FALSE || m_pnav->IsPictureMedia(				m_MediaList.id[m_MediaList.numCurrentItem]) == TRUE)		{			return RM_ERROR;		}	}	if (m_pnav->SelectedObjectId() == objectId)	{		return ShowPopup(objectId, FALSE);	}	status = m_pnav->GetPopup(objectId, &popup);	if (RMFAILED(status))		return status;	// input to popup	// TODO: generalize	if (popup.nbStrings > 4)	{		sprintf(popup.strings[2]->object.text, "%02u:%02u:%02u", 0, 0, 0);		// place chapter		sprintf(popup.strings[4]->object.text, "%03u", 0);	}	return ShowPopup(objectId, TRUE, &popup);}RMstatus RMcuracaoGui::DisplayWMVHDInfo(RMuint32 objectId, RMbool bShow){	RMstatus status;	RMascii text[MAX_FIXED_TEXT_LENGTH];	guiTextTableType table;	RMuint32 mediaId = m_MediaList.id[m_MediaList.numCurrentItem];	if (!ISTEXTTABLE(objectId) || !m_pnav->WMVHDOn())		return RM_ERROR;	if (m_pnav->IsPictureMedia(mediaId))		return RM_ERROR;	status = m_pnav->GetTextTable(objectId, &table);	if (RMFAILED(status))		return status;	// Here we assume the location of the respective fields	// Don't know yet how to generalize!!!!!!!!!!!!!!!!!!!!!!!!!!!	if (table.nbItems >= 13)	{		guiWmvHDMetadataType metadata;		RMMemset(&metadata, 0, sizeof(guiWmvHDMetadataType));		m_pnav->GetMetadata(&metadata);		// set feature title		RMMemset(text, 0, sizeof(text));		if (metadata.title != (RMascii*) NULL)			RMCopyAscii(table.items[1]->object.text, metadata.title);		else			RMCopyAscii(table.items[1]->object.text, NOT_AVAILABLE_TXT);		// set feature's director		RMMemset(text, 0, sizeof(text));		if (metadata.director != (RMascii*) NULL)			RMCopyAscii(table.items[3]->object.text, metadata.director);		else			RMCopyAscii(table.items[3]->object.text, NOT_AVAILABLE_TXT);		// audio stream -- ok here because there if changed on-the-fly info needs to be reloaded		RMuint8 stream;		status = m_pnav->GetMediaAudioStream(mediaId, &stream);		if (RMSUCCEEDED(status))		{			if (RMFAILED(m_context->player->GetAudioStreamID(stream, text)))			{				RMCopyAscii(text, "1");			}			RMCopyAscii(table.items[9]->object.text, text);		}		else			RMCopyAscii(table.items[9]->object.text, NOT_AVAILABLE_TXT);		// set feature's support info		RMMemset(text, 0, sizeof(text));		if (metadata.supportText != (RMascii*) NULL)			RMCopyAscii(table.items[13]->object.text, metadata.supportText);		else			RMCopyAscii(table.items[13]->object.text, NOT_AVAILABLE_TXT);	}	status = m_pnav->DisplayTextTable(&table, bShow, TRUE);	if (RMSUCCEEDED(status) && bShow)	{		// keep object id		m_pnav->SetInfoId(objectId);		status = UpdateWMVHDInfo();	}	return status;}#endif // WITH_WMVHD_SUPPORT

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -