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

📄 o_ge.c

📁 Zoran V966 DVD 解码 Soc芯片的源程序
💻 C
📖 第 1 页 / 共 2 页
字号:
/* **************************************************************************************
*  Copyright (c) 2004 ZORAN Corporation, All Rights Reserved
*  THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
*
*  File: $Workfile: o_ge.c $
*
* Description:
* ============
* Project definition of the MSO_EQ
*
****************************************************************************************/
#include "Config.h"				// Global Configuration - do not remove!
#include "Include\SysDefs.h"	// Global definition - do not remove!

#ifdef DEBUG_UI_TRACE
#undef IFTRACE
#define IFTRACE if (gTraceUI)
#include "Debug\DbgMain.h"
#endif //DEBUG_UI_TRACE


#ifdef D_GRAPHIC_EQUALIZER_MENU

/***************************************************************************************
* Include files
****************************************************************************************/
#include <stdio.h>
#include <string.h>
#include "Kernel\eventdef.h"
#include "include\math-macro.h"
#include "Playcore\ScPad\SCMGR.h"
#include "Playcore\Coremain\Coremain.h"
#include "Playcore\Coremain\CoreGDef.h"

// Included UI LOW LEVEL files
#include "GUI\Menu_system\ms_container.h"
#include "GUI\Menu_system\ms_object.h"
#include "GUI\menu_system\osd_rendering.h"
#include "GUI\menu_system\ms_display.h"
#include "GUI\Menu_system\ms_screen.h"
#include "GUI\Object_class\Choice\mso_choice.h"
#include "GUI\Object_class\Hslider\mso_hslider.h"
#include "GUI\Object_class\Vlist\mso_vlist.h"
#include "GUI\Object_class\Button\mso_button.h"
#include "GUI\Object_class\Page\mso_page.h"

// Included UI CUSTOMER files
#include "Resource\Bitmap\bitmap.h"
#include "Menu\menu_operation_def.h"

// Included string related files
#include "Library\String_generate.h"
#include "Library\Number.h"
#include "Library\Container_Misc.h"

#ifndef DEBUG_UI_TRACE
#undef dbg_printf(sMsg)
#define dbg_printf(sMsg)
#undef	dbgm_printf(sMsg, mode)
#define dbgm_printf(sMsg, mode)
#endif

// Include the module header file
#include "Components\Graphic_equalizer\o_ge.h"
// Include custom header file: customer specific definitions, over-writing common ones.
#include "Components\Graphic_equalizer\o_ge_config.h"
// Include configuration header file: named constants, macros and typedefs.
#include "Components\Custom\Graphic_equalizer\o_ge_custom.h"


/**************************************************************************
* 	Utility functions
***************************************************************************/
static void _UpdateSlidersForUserMode(void);

/**************************************************************************
* 	Operation functions
***************************************************************************/
// The function to handle MODE CHOICE operations:
static UINT16 _ModeChoiceOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);
static void _ModeChoiceAction(MSO_OBJECT __NEAR* pThis, enMutatorType eType, UINT16 wValue);


/**************************************************************************
* 	Display functions
***************************************************************************/
// Local function to add the values to the VLIST object:
static void _AddValuesToVList(MSO_VLIST __NEAR* pList, MSO_CHOICE __NEAR* pChoice);
static UINT16  _EqOKButtonOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);
static UINT16  _BtnAdvEqButtonOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);
static UINT16 _EQSlider1Action(HSLIDER_ACTION eType, UINT16 wValue);
static UINT16 _EQSlider2Action(HSLIDER_ACTION eType, UINT16 wValue);
static UINT16 _EQSlider3Action(HSLIDER_ACTION eType, UINT16 wValue);
static UINT16 _EQSlider4Action(HSLIDER_ACTION eType, UINT16 wValue);
static UINT16 _EQSlider5Action(HSLIDER_ACTION eType, UINT16 wValue);
static UINT16 _EQSlider6Action(HSLIDER_ACTION eType, UINT16 wValue);
static void _UpdateEQSliders(void);
static void _ChangeEQModeToUser(void);

/***************************************************************************************
* 	Include customization file.
****************************************************************************************/

// Include custom code file: customer specific code, over-writing common one.
#include "Components\Custom\Graphic_equalizer\o_ge_custom.c"
// Include configuration file: constants.
#include "Components\Graphic_equalizer\o_ge_config.c"

/**************************************************************************
* 	Utility functions
***************************************************************************/
/**************************************************************************
*	Name	:	_UpdateSlidersForUserMode
*	In		:
*	Out 	:
*	Desc	:
***************************************************************************/
static void _UpdateSlidersForUserMode(void)
{
	UINT8 index;

	for (index = 0; index<EQUALIZER_BANDGAIN_SZ; index++)
	{
		EQUALIZER_BANDGAIN_USER[index] = eq_slider_value[index];
	}
}

/**************************************************************************
*	Name	:	_ChangeEQModeToUser
*	In		:
*	Out 	:
*	Desc	:
***************************************************************************/
static void _ChangeEQModeToUser(void)
{
	MSO_CHOICE __NEAR* gpEQModeChoice;

	gpEQModeChoice = MS_FindObjectFromDescriptor((MSO_CONTAINER __NEAR*)gpScreen, (MS_DESCRIPTOR*)&oEQModeChoiceDescriptor);
	gpEQModeChoice->moParam.mwCurrValIndex = GRAPHIC_EQUALIZER_USER;
	MS_DisplayAddObject(gpEQModeChoice);
	UI_Core_API_UpdatePlayerSetting(PS_UPDATE_GRAPHIC_EQUALIZER_MODE, GRAPHIC_EQUALIZER_USER);

}
/**************************************************************************
*	Name	:	_EQSlider1Action
*	In		:
*	Out 	:
*	Desc	:
***************************************************************************/
static UINT16 _EQSlider1Action(HSLIDER_ACTION eType, UINT16 wValue)
{

	if(eType == HS_ACTION_SET)
    	{
		eq_slider_value[EQ_SLIDER1] = wValue;
		if ( PS_Get_EQ_Mode() != GRAPHIC_EQUALIZER_USER)
		{
			_ChangeEQModeToUser();
		}
		_UpdateSlidersForUserMode();
	}
    	else
    	{
    		wValue = eq_slider_value[EQ_SLIDER1];
	}

    	return(wValue);
}

/**************************************************************************
*	Name	:	_EQSlider2Action
*	In		:
*	Out 	:
*	Desc	:
***************************************************************************/
static UINT16 _EQSlider2Action(HSLIDER_ACTION eType, UINT16 wValue)
{
	if(eType == HS_ACTION_SET)
    	{
		eq_slider_value[EQ_SLIDER2] = wValue;
		if ( PS_Get_EQ_Mode()!= GRAPHIC_EQUALIZER_USER)
		{
			_ChangeEQModeToUser();
		}
		_UpdateSlidersForUserMode();
	}
    	else
    	{
    		wValue = eq_slider_value[EQ_SLIDER2];
    	}

    	return(wValue);
}

/**************************************************************************
*	Name	:	_EQSlider3Action
*	In		:
*	Out 	:
*	Desc	:
***************************************************************************/
static UINT16 _EQSlider3Action(HSLIDER_ACTION eType, UINT16 wValue)
{
	if(eType == HS_ACTION_SET)
    	{
		eq_slider_value[EQ_SLIDER3] = wValue;
		if ( PS_Get_EQ_Mode() != GRAPHIC_EQUALIZER_USER)
		{
			_ChangeEQModeToUser();
		}
		_UpdateSlidersForUserMode();
	}
    	else
    	{
    		wValue = eq_slider_value[EQ_SLIDER3];

    	}

    	return(wValue);
}

/**************************************************************************
*	Name	:	_EQSlider4Action
*	In		:
*	Out 	:
*	Desc	:
***************************************************************************/
static UINT16 _EQSlider4Action(HSLIDER_ACTION eType, UINT16 wValue)
{
	if(eType == HS_ACTION_SET)
    	{
		eq_slider_value[EQ_SLIDER4] = wValue;
		if ( PS_Get_EQ_Mode()!= GRAPHIC_EQUALIZER_USER)
		{
			_ChangeEQModeToUser();
		}
		_UpdateSlidersForUserMode();
	}
    	else
    	{
    		wValue = eq_slider_value[EQ_SLIDER4];

    	}

    	return(wValue);
}

/**************************************************************************
*	Name	:	_EQSlider5Action
*	In		:
*	Out 	:
*	Desc	:
***************************************************************************/
static UINT16 _EQSlider5Action(HSLIDER_ACTION eType, UINT16 wValue)
{
	if(eType == HS_ACTION_SET)
    	{
		eq_slider_value[EQ_SLIDER5] = wValue;
		if ( PS_Get_EQ_Mode()!= GRAPHIC_EQUALIZER_USER)
		{
			_ChangeEQModeToUser();
		}
		_UpdateSlidersForUserMode();
	}
    	else
    	{
    		wValue = eq_slider_value[EQ_SLIDER5];
    	}

    	return(wValue);
}

/**************************************************************************
*	Name	:	_EQSlider6Action
*	In		:
*	Out 	:
*	Desc	:
***************************************************************************/
static UINT16 _EQSlider6Action(HSLIDER_ACTION eType, UINT16 wValue)
{
	if(eType == HS_ACTION_SET)
    	{
		eq_slider_value[EQ_SLIDER6] = wValue;
		if ( PS_Get_EQ_Mode() != GRAPHIC_EQUALIZER_USER)
		{
			_ChangeEQModeToUser();
		}
		_UpdateSlidersForUserMode();
	}
    	else
    	{
    		wValue = eq_slider_value[EQ_SLIDER6];
    	}

    	return(wValue);
}

/**************************************************************************
*	Function 	: 	TIMESEARCH_Close
*
*	In		:
*
*	Out		:
*
*	Desc 	:
 ***************************************************************************/
void Eq_Close(MSO_EQ __NEAR* pEq)

⌨️ 快捷键说明

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