📄 vsrt_m.c
字号:
/***********************************************************************/
/* File: */
/* Copyright (c) 2000 ZORAN Corporation, All Rights Reserved */
/* THIS IS PROPRIETARY SOURCE CODE OF ZORAN CORPORATION */
/* */
/* =========== */
/* Descripton: */
/* =========== */
/* */
/* Log: */
/* === */
/* $Name: V_1_16 V_1_15 V_1_14 V_1_13 V_1_12 NV_1_00 V_1_11 $
/* $Header: v:/dsg/rcs/dsg/vp2k/Customer/menu/zoran/vsrt_m.c 1.15 2001/06/06 06:15:12 dingming Exp $
/* $Log: vsrt_m.c $
/* Revision 1.15 2001/06/06 06:15:12 dingming
/* font 32X24 complile
/* Revision 1.14 2000/11/17 18:54:21 charlie
/* Use C_FOCUSED
/* Revision 1.13 2000/11/09 04:07:35 cliff
/***********************************************************************/
#include <stdio.h>
#include <string.h>
#include "sysdefs.h"
#include "menu_var.h"
#include "..\..\..\ui\menu_sys\ms_wdgt.h"
#include "..\..\..\ui\menu_sys\ms_lib.h"
#include "..\..\..\ui\menu_sys\osd_drv.h"
#include "..\..\..\decoder\osdrendr.h"
#include "..\..\..\decoder\osdlayou.h"
#ifdef FONT32X24 //DM0605
#include "..\..\..\customer\dragon\strings\strings.h"
#else
#include "..\..\..\ui\strings\strings.h"
#endif
#include "menu_var.h"
#include "..\..\..\playcore\ps\ps.h"
#include "..\..\..\playcore\coremain\coregdef.h"
#include "..\..\..\kernel\eventdef.h"
// REMINDER This is not needed if we don't use oHWLimit
#include "..\..\..\Decoder\decoder.h"
#include "vs.h"
// Static text positions
// Widget positions
static const MS_POS screen_pos = {104, MS_LINE_2, 504, MS_MAX_LINES_SMALLMM};
const MS_POS brightness_choice_pos = {200, MS_LINE_1 ,296, MS_LINE_HEIGHT};
const MS_POS edges_choice_pos = {200, MS_LINE_2, 296, MS_LINE_HEIGHT};
const MS_POS dont_care_pos = {200, MS_LINE_3, 0, 0};
static const MS_STATIC mssTitle = {
{
0,
ALIGN_LEFT,
I_COLOR,
{16, MS_LINE_0, 200, MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(void *)S_VIDEO_ENHANCEMENT
};
const MS_STATIC mssBrightness = {
{
0,
ALIGN_LEFT,
I_COLOR,
{16, MS_LINE_1, 200, MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(void *)S_BRIGHTNESS
};
const MS_STATIC mssEdges = {
{
0,
ALIGN_LEFT,
I_COLOR,
{16, MS_LINE_2, 200, MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(void *)S_EDGES
};
#ifdef D_NO_VS_LIB
#define ITEMNUM_BRIGHTNESS_OFF 0
#define ITEMNUM_BRIGHTNESS_ON 1
const OSD_MESSAGES brightness_list_c[] = {
S_OFF,
S_ON
};
const MS_TEXT_LIST brightness_list = {
2,(int *)brightness_list_c
};
#define ITEMNUM_EDGES_OFF 0
#define ITEMNUM_EDGES_SHARPEN 1
#define ITEMNUM_EDGES_SOFTEN 2
const OSD_MESSAGES edges_list_c[] = {
S_OFF,
S_SHARPEN,
S_SOFTEN
};
const MS_TEXT_LIST edges_list = {
3,(int *)edges_list_c
};
void brightness_choice(MS_CHOICE *msChoice)
{
int iChoice;
switch (gps->be_ctrl)
{
case BE_CTRL_ENABLED:
iChoice = ITEMNUM_BRIGHTNESS_ON;
break;
case BE_CTRL_DISABLED:
// Fall through
default:
iChoice = ITEMNUM_BRIGHTNESS_OFF;
break;
}
msChoice->current_choice = iChoice;
}
void brightness_action(int num)
{
DWORD d_Cmd;
int iBrightness[] = { BE_CTRL_DISABLED, BE_CTRL_ENABLED };
dbouts("\nBrightness is ");
dbouti( num );
num = iBrightness[ num ];
d_Cmd = (((DWORD)PS_UPDATE_BE_CTRL_SETTING)<<16) + (DWORD) num;
ie_send_ex(IE_CORE_UPDATE_PS, (void *)d_Cmd);
}
void edges_choice(MS_CHOICE *msChoice)
{
int iChoice;
switch (gps->ee_ctrl)
{
case EE_CTRL_SHARPEN:
iChoice = ITEMNUM_EDGES_SHARPEN;
break;
case EE_CTRL_SOFTEN:
iChoice = ITEMNUM_EDGES_SOFTEN;
break;
case EE_CTRL_DISABLED:
// Fall through
default:
iChoice = ITEMNUM_EDGES_OFF;
break;
}
msChoice->current_choice = iChoice;
}
void edges_action(int num)
{
DWORD d_Cmd;
int iEdges[] = { EE_CTRL_DISABLED, EE_CTRL_SHARPEN, EE_CTRL_SOFTEN };
dbouts("\nEdges is ");
dbouti( num );
num = iEdges[ num ];
d_Cmd = (((DWORD)PS_UPDATE_EE_CTRL_SETTING)<<16) + (DWORD) num;
ie_send_ex(IE_CORE_UPDATE_PS, (void *)d_Cmd);
}
#endif D_NO_VS_LIB
static void layout (void)
{
go_CurrentLayout.m_bBigMemMap = FALSE;//USE_BIGMEMMAP_WHEN_REQUIRED;
go_CurrentLayout.m_cPixRes = 0;
go_CurrentLayout.m_wOriginX = 0;
#ifdef FONT32X24 //DM0605
go_CurrentLayout.m_wOriginY = MS_LINE_2;
#else
go_CurrentLayout.m_wOriginY = 60;
#endif
go_CurrentLayout.m_wWidth = 720;
go_CurrentLayout.m_wHeight = 120;
go_CurrentLayout.m_cNbrHole = 0;
go_CurrentLayout.m_cInitColor = 0;
go_CurrentLayout.m_cNbrColor = 16;
go_CurrentLayout.m_pColorPalette = (OSD_Palette *)MenuBitmapColor;
OSDSetLayout();
OSDSetFont(0);
#ifdef NO_C_STDLIB
dbouts("\nVIDEO ENHANCEMENT LAYOUT");
#endif
}
static void on_vid_enhance_close(void)
{
#ifdef NO_C_STDLIB
printf("Video Enhancement screen closed\n");
#endif
SAFELY_DELETE(choice1)
SAFELY_DELETE(choice2)
}
void open_vid_enhance(void)
{
screen = MS_create_screen((MS_POS *)&screen_pos,screen_color,0,on_vid_enhance_close,layout);
choice1 = MS_create_choice(&brightness_choice_pos,i_color,&brightness_list,&dont_care_pos,brightness_action,MS_HOT_SPOT);
#ifdef D_NO_BRIGHTNESS_DEFAULT
#else
brightness_choice(choice1);
#endif // D_NO_BRIGHTNESS_DEFAULT
choice2 = MS_create_choice(&edges_choice_pos,i_color,&edges_list,&dont_care_pos,edges_action,MS_HOT_SPOT);
#ifdef D_NO_BRIGHTNESS_DEFAULT
#else
edges_choice(choice2);
#endif // D_NO_BRIGHTNESS_DEFAULT
MS_add_item((MS_DIALOG*)screen,(MS_WIDGET*)choice1, C_FOCUSED);
MS_add_item((MS_DIALOG*)screen,(MS_WIDGET*)choice2, !C_FOCUSED);
MS_add_item((MS_DIALOG*)screen,(MS_WIDGET*)&mssTitle, !C_FOCUSED);
MS_add_item((MS_DIALOG*)screen,(MS_WIDGET*)&mssBrightness, !C_FOCUSED);
MS_add_item((MS_DIALOG*)screen,(MS_WIDGET*)&mssEdges, !C_FOCUSED);
MS_dialog_display((MS_DIALOG*)screen);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -