📄 o_brightness_edge_controller.c
字号:
/* **************************************************************************************
* Copyright (c) 2005 ZORAN Corporation, All Rights Reserved
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
*
* File: $Workfile: o_display_versions.c$
*
* Description:
* ========
* Project definition of the following:
* 1. MSO_BRIGHTNESS_EDGE_COTROLLER
*
*
****************************************************************************************/
#include "Config.h" // Global Configuration - do not remove!
#ifdef D_GUI_COMPONENT_BRIGHTNESS_EDGE_CONTROLLER
#ifdef DEBUG_UI_TRACE
#undef IFTRACE
#define IFTRACE if (gTraceUI)
#include "Debug\DbgMain.h"
#endif //DEBUG_UI_TRACE
#include "Include\SysDefs.h"
/***************************************************************************************
* Include files
****************************************************************************************/
#include "include\math-macro.h"
#include "Playcore\ps\ps.h"
#include "GUI\Menu_system\ms_screen.h"
#include "GUI\Menu_system\ms_menu.h"
#include "GUI\Menu_system\ms_container.h"
#include "GUI\Menu_system\ms_display.h"
#include "GUI\Menu_system\ms_component.h"
#include "Menu_config\menu_config_common.h"
#include "CoreAPI\CoreAPI.h"
#include "Strings\Strings.h"
#include "Library\Container_misc.h"
#include "Library\String_generate.h"
#include "GUI\Object_class\Text\mso_text.h"
#include "GUI\Object_class\Hslider\mso_hslider.h"
#include "Components\Message\o_message_handler.h"
#include "Components\Brightness_edge_controller\o_brightness_edge_controller.h"
#include "GUI\Resource\Bitmap\bitmap.h"
#include "Menu\menu_operation_def.h"
#ifdef D_GINGER_I86
#include "decoder\osdlayou.h"
#endif //D_GINGER_I86
#ifdef D_GINGER_I96
#include "Osdlayou.h"
#endif //D_GINGER_I96
// Include configuration header file: named constants, macros and typedefs.
#include "Components\Brightness_edge_controller\o_brightness_edge_controller_config.h"
// Include custom header file: customer specific definitions, over-writing common ones.
#include "Components\Brightness_edge_controller\o_brightness_edge_controller_custom.h"
#ifndef DEBUG_UI_TRACE
#undef dbg_printf(sMsg)
#define dbg_printf(sMsg)
#undef dbgm_printf(sMsg, mode)
#define dbgm_printf(sMsg, mode)
#endif
/***************************************************************************************
* Operation functions
****************************************************************************************/
/***************************************************************************************
* Operation functions of brightness_edge_controller Component.
****************************************************************************************/
static MS_OP _BrightnessEdgeControllerComponentOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp,UINT32 lParam);
STATIC UINT16 _BrightCtrlSliderAction(HSLIDER_ACTION eType, UINT16 wValue);
STATIC UINT16 _EdgeCtrlSliderAction(HSLIDER_ACTION eType, UINT16 wValue);
/***************************************************************************************
* Display functions
****************************************************************************************/
/***************************************************************************************
* Display functions of brightness_edge_controller Component
****************************************************************************************/
static BOOL _BrightnessEdgeControllerComponentFillOSDSeg(MSO_OBJECT __NEAR* pThis, MS_AREA __NEAR* pAbsArea);
/***************************************************************************************
* Include customization file.
****************************************************************************************/
// Include custom code file: customer specific code, over-writing common one.
#include "Components\Brightness_edge_controller\o_brightness_edge_controller_custom.c"
// Include configuration file: constants.
#include "Components\Brightness_edge_controller\o_brightness_edge_controller_config.c"
/***************************************************************************************
* The Component objects
****************************************************************************************/
/***************************************************************************************
* Descriptor : oBrightnessTitleDescriptor
*
* Purpose : Descriptor of brightness title.
****************************************************************************************/
static CONST OSD_TEXT oBrightnessTitleText =
{ OSDR_GetFormUniStr_OsdMessage, S_BRIGHTNESS};
static CONST MS_DESCRIPTOR_TEXT oBrightnessTitleDescriptor =
{ // MS_DESCRIPTOR_TEXT
{ // MS_DESCRIPTOR
sizeof(MSO_TEXT),
MS_NAV_NULL,
MS_ATTR_OSD_LAYER_0,
{
TEXT_START_X,
TEXT_START_Y,
TEXT_WIDTH,
TEXT_HEIGHT
},
OTEXT_Operation,
OTEXT_FillOSDSeg,
(UINT8*)NULL
},
(MS_X_Y_ALIGN *)&oTextAlignToContainer,
(MS_COLOR_SET *)&oDefaultTextColorSet,
NULL,
(OSD_TEXT*)&oBrightnessTitleText,
FONT_0,
NULL,
NULL
};
/***************************************************************************************
* Descriptor : oEdgesTitleDescriptor
*
* Purpose : Descriptor of edges title.
****************************************************************************************/
static CONST OSD_TEXT oEdgesTitleText =
{ OSDR_GetFormUniStr_OsdMessage, S_EDGES};
static CONST MS_DESCRIPTOR_TEXT oEdgesTitleDescriptor =
{ // MS_DESCRIPTOR_TEXT
{ // MS_DESCRIPTOR
sizeof(MSO_TEXT),
MS_NAV_NULL,
MS_ATTR_OSD_LAYER_0,
{
TEXT_START_X,
TEXT_START_Y+TEXT_HEIGHT,
TEXT_WIDTH,
TEXT_HEIGHT
},
OTEXT_Operation,
OTEXT_FillOSDSeg,
(UINT8*)NULL
},
(MS_X_Y_ALIGN *)&oTextAlignToContainer,
(MS_COLOR_SET *)&oDefaultTextColorSet,
NULL,
(OSD_TEXT*)&oEdgesTitleText,
FONT_0,
NULL,
NULL
};
/***************************************************************************************
* Descriptor : oBrightCtrlSliderDescriptor
*
* Purpose : The Brightness control Horizontal slider control descriptor.
****************************************************************************************/
STATIC CONST MS_PARAM_HSLIDER oBrightCtrlSliderParams =
{
BRIGHT_SLIDER_MIN_VALUE,
BRIGHT_SLIDER_MAX_VALUE,
BRIGHT_SLIDER_CURRENT_VALUE,
BRIGHT_SLIDER_STEP_INDEX
};
STATIC CONST MS_DESCRIPTOR_HSLIDER oBrightCtrlSliderDescriptor =
{
{
sizeof(MSO_HSLIDER),
MS_NAV_DISABLE_LR,
MS_ATTR_FOCUSABLE | MS_ATTR_OSD_LAYER_0,
{
AREA_SLIDER_X, AREA_SLIDER_Y, AREA_SLIDER_W, AREA_SLIDER_H
},
HSliderOperation,
HSliderFillOSDSeg,
(UINT8*)&oBrightCtrlSliderParams
},
RUNTIME_HSLIDER_BAR_HEIGHT,
RUNTIME_HSLIDER_BAR_WIDTH,
RUNTIME_HTAB_HEIGHT,
RUNTIME_HTAB_WIDTH,
HS_HIGHLIGHT_ON_OBJECT,
FALSE, // bDisplayCurrentValue
TRUE,//FALSE, // bDisplayMinAndMaxValues
_BrightCtrlSliderAction
};
/***************************************************************************************
* Descriptor : oEdgeCtrlSliderDescriptor
*
* Purpose : The Edge control Horizontal slider control descriptor.
****************************************************************************************/
STATIC CONST MS_PARAM_HSLIDER oEdgeCtrlSliderParams =
{
EDGE_SLIDER_MIN_VALUE,
EDGE_SLIDER_MAX_VALUE,
EDGE_SLIDER_CURRENT_VALUE,
EDGE_SLIDER_STEP_INDEX
};
STATIC CONST MS_DESCRIPTOR_HSLIDER oEdgeCtrlSliderDescriptor =
{
{
sizeof(MSO_HSLIDER),
MS_NAV_DISABLE_LR,
MS_ATTR_FOCUSABLE | MS_ATTR_OSD_LAYER_0,
{
AREA_SLIDER_X, AREA_SLIDER_Y+AREA_SLIDER_H, AREA_SLIDER_W, AREA_SLIDER_H
},
HSliderOperation,
HSliderFillOSDSeg,
(UINT8*)&oEdgeCtrlSliderParams
},
RUNTIME_HSLIDER_BAR_HEIGHT,
RUNTIME_HSLIDER_BAR_WIDTH,
RUNTIME_HTAB_HEIGHT,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -