?? o_message_handler.c
字號:
/****************************************************************************************************
* Copyright (c) 2005 ZORAN Corporation, All Rights Reserved
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
*
* File: o_message_handler.c
*
* Description:
* =========
*
****************************************************************************************************/
#include "Config.h" // Global Configuration - do not remove!
#include "include\sysdefs.h" // Global definition - do not remove!
/****************************************************************************************************
* INCLUDE FILES
****************************************************************************************************/
// Include C Standard
#include <stdio.h>
#include <string.h>
#include "CoreAPI\CoreAPI.h"
#include "Playcore\playmode\playmode.h"
#include "Playcore\Coremain\coredefs.h"
#include "Playcore\Ps\Ps.h"
#include "Playcore\Nav_DVD\Header\NAV_ERR.h"
#include "Playcore\Nav_VR\Nav_VR_gDef.h"
#include "Osdlayou.h"
#include "Dec_Err.h"
#ifdef D_GINGER_I86
#include "Decoder\Dec_Defs.h"
#include "Playcore\Nav_CDDA\CDNAV_ERR.h"
#else
#include "Dec_Common.h"
#include "Playcore\Nav_SVCD\nav_svcd.h"
#endif //D_GINGER_I96
// Include project specific
#include "GUI\Menu_system\ms_operation_def.h"
#include "GUI\Menu_system\ms_object.h"
#include "GUI\Menu_system\ms_container.h"
#include "GUI\Menu_system\ms_component.h"
#include "GUI\Menu_system\ms_screen.h"
#include "GUI\Menu_system\ms_display.h"
#include "GUI\Menu_system\osd_rendering.h"
#include "GUI\Object_class\Message\mso_message.h"
#include "Resource\Bitmap\bitmap.h"
#include "GUI\Resource\Strings\strings.h"
#include "Menu\menu_operation_def.h"
#include "Menu_config\menu_config_common.h"
#include "Library\String_generate.h"
#include "Library\String_generate.h"
// Include the module header file
#include "Components\Message\o_message_handler.h"
// Include custom header file: customer specific definitions, over-writing common ones.
#include "Components\Message\o_message_handler_config.h"
// Include configuration header file: named constants, macros and typedefs.
#include "Components\Custom\Message\o_message_handler_custom.h"
//
// Includes message modules
//
#include "Components\Message\o_message_device_defs.h"
#include "Components\Message\o_message_playstate_defs.h"
#include "Components\Message\o_message_mute_defs.h"
#include "Components\Message\o_message_playmode_defs.h"
#include "Components\Message\o_message_setting_defs.h"
#ifdef D_GUI_MESSAGE_BATTERY_STATE
#include "Components\Message\o_message_battery_state_defs.h"
#endif//D_GUI_MESSAGE_BATTERY_STATE
/****************************************************************************************************
* DECLARATION: Private (static) functions
****************************************************************************************************/
STATIC MS_OP MessageHandlerOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);
STATIC void _DisplayMessageOnTick(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);
#include "Components\Message\o_message_device.c"
#include "Components\Message\o_message_mute.c"
#include "Components\Message\o_message_playmode.c"
#include "Components\Message\o_message_playstate.c"
#include "Components\Message\o_message_setting.c"
#ifdef D_GUI_MESSAGE_BATTERY_STATE
#include "Components\Message\o_message_battery_state.c"
#endif//D_GUI_MESSAGE_BATTERY_STATE
/***************************************************************************************
* Include customization file.
****************************************************************************************/
// Include custom code file: customer specific code, over-writing common one.
#include "Components\Custom\Message\o_message_handler_custom.c"
// Include configuration file: constants.
#include "Components\Message\o_message_handler_config.c"
/****************************************************************************************************
* Function : MessageHandlerOperation
*
* Input : Parameter_1 - description
* Parameter_2 - description
*
* Output : Parameter_3 - description
* Parameter_4 - description
*
* Return : Describe_possible_returned_values_and_their_meaning
*
* Description : Describe_what_the_function_does_in_English
*
****************************************************************************************************/
STATIC MS_OP MessageHandlerOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
MSO_OBJECT __NEAR *pObject;
MSO_OBJECT __NEAR *pProcessor;
if(MS_IS_MSG_OP(MsOp))
{
// We need to know which object (if any) processes the message, so that
// we can set that object to the higher OSD layer. Other objects are set to the lower layer.
pObject = MS_GetObjectListPtr(pThis);
while((NULL != pObject) && (MsOp != MS_OP_NONE))
{
MsOp = MS_SendOperation(pObject, MsOp, lParam);
if (MsOp != MS_OP_NONE)
{
pObject = pObject->mpNext;
}
}
if(pObject != NULL)
{
// The message was processed.
pProcessor = pObject;
pObject = MS_GetObjectListPtr(pThis);
while(pObject != NULL)
{
if(pObject == pProcessor)
{
MS_ChangeOsdLayer(pProcessor, MS_ATTR_OSD_LAYER_MAX);
}
else if(MS_GetOsdLayer(pObject) != MS_ATTR_OSD_LAYER_MIN)
{
MS_ChangeOsdLayer(pObject, MS_ATTR_OSD_LAYER_MIN);
}
pObject = pObject->mpNext;
}
// This is the only place where the message is displayed when should appear on screen
// It is removed from screen on TICK by the message itself.
MS_DisplayObject(pProcessor);
}
return MS_OP_NONE;
}
MsOp = MS_ComponentBasicOperation(pThis, MsOp, lParam);
return MsOp;
}
/****************************************************************************************************
* Function : _DisplayMessageOnTick
*
* Input : Parameter_1 - description
* Parameter_2 - description
*
* Output : Parameter_3 - description
* Parameter_4 - description
*
* Return : Describe_possible_returned_values_and_their_meaning
*
* Description : This function displays the message passed in MsOp/lParam.
* It is called in the message objects in the MS_OP_TICK handling
* The message is displayed right away, but the OSD LAYER is unchanged.
*
****************************************************************************************************/
STATIC void _DisplayMessageOnTick(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
if (MS_OP_NONE == pThis->mpDescriptor->mpfOperation(pThis, MsOp, lParam))
MS_DisplayObject(pThis);
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -