📄 time_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 $
/* $Header: v:/dsg/rcs/dsg/vp2k/Customer/MENU/newzoran/TIME_M.C 1.5 2001/08/03 09:30:28 dingming Exp $
/* $Header: v:/dsg/rcs/dsg/vp2k/Customer/MENU/newzoran/TIME_M.C 1.5 2001/08/03 09:30:28 dingming Exp $
/* $Log: TIME_M.C $
/* Revision 1.5 2001/08/03 09:30:28 dingming
/* Revision 1.4 2001/07/24 06:16:32Z tonnyg
/* Revision 1.3 2001/07/16 13:07:15 victorwu
/* Revision 1.2 2001/06/27 08:58:30 dingming
/* Revision 1.22 2001/04/19 03:19:56 adamw
/* Revision 1.21 2001/04/02 01:45:08 adamw
/* Revision 1.20 2001/03/15 08:56:50 adamw
/* Revision 1.19 2001/03/09 07:59:23 adamw
/* Check in the changes in Nintaus at Mar 7
/* Revision 1.18 2001/03/01 01:45:19 adamw
/* Revision 1.17 2001/02/27 07:09:17 adamw
/* Revision 1.16 2001/02/23 09:33:15 adamw
/* Revision 1.15 2001/02/23 07:08:35 adamw
/* Revision 1.14 2001/02/13 03:42:55 adamw
/* Revision 1.13 2001/01/30 02:50:57 adamw
/* Revision 1.12 2001/01/19 03:58:48 adamw
/* Revision 1.11 2001/01/17 09:16:24 adamw
/* Revision 1.10 2001/01/04 07:43:44 adamw
/* Revision 1.9 2001/01/03 10:16:35 adamw
/* let send GOTO_TIME event when disc is dvd
/* Revision 1.8 2001/01/03 05:22:29 adamw
/* AW0103:fix menu flashing problem by change screen's Y pos
/* Revision 1.7 2001/01/02 11:28:19 adamw
/* Revision 1.6 2000/12/30 12:36:23 leslie
/* Revision 1.5 2000/12/23 02:35:10 adamw
/* Revision 1.4 2000/12/20 02:35:00 adamw
/* Revision 1.3 2000/12/08 06:07:50 adamw
/* Revision 1.6 2000/11/17 10:25:41 leslie
/* Revision 1.17 2000/11/09 04:07:35 cliff
/***********************************************************************/
#include <stdio.h>
#include <string.h>
#include <sysdefs.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"
#include "..\..\dragon\strings\strings.h"
//AW0116:add for total time display
#include "..\..\..\playcore\scpad\scmgr.h"
#include "..\..\..\playcore\playmode\playmode.h"
//AW0116:end
#include "menu_var.h"
#include "zmenu.h"
#include "..\..\..\playcore\ps\ps.h"
#ifdef D_NO_KARAOKE_DEFAULT
#else
#include "..\..\playcore\coremain\coregdef.h"
#endif // D_NO_KARAOKE_DEFAULT
#include "..\..\playcore\coremain\coremain.h"
#include "..\..\..\kernel\eventdef.h"
#include "..\..\..\Decoder\decoder.h"
// Screen and item positions
static const MS_POS screen_pos = {60, 60, 600, MS_MAX_LINES_SMALLMM};
static const MS_POS time_pos = {244, MS_LINE_1, 112, MS_LINE_HEIGHT};
static const MS_POS title_pos = {244, MS_LINE_3, 40, MS_LINE_HEIGHT};
//AW0116:move the chapter edit to the forth lines
static const MS_POS chapter_pos = {244, MS_LINE_2, 40, MS_LINE_HEIGHT};
//Aw0116:end
static const MS_POS track_pos = {264+44, MS_LINE_2, 40, MS_LINE_HEIGHT};
#ifdef D_MOVE_TO_BOOKMARK_MENU
static const MS_POS bookmark_1_pos = {200, MS_LINE_3, 88, MS_LINE_HEIGHT};
static const MS_POS bookmark_2_pos = {300, MS_LINE_3, 88, MS_LINE_HEIGHT};
static const MS_POS bookmark_3_pos = {400, MS_LINE_3, 88, MS_LINE_HEIGHT};
char sz_bookmark_1[4];
char sz_bookmark_2[4];
char sz_bookmark_3[4];
MS_EDIT *bookmark_1_edit = NULL;
MS_EDIT *bookmark_2_edit = NULL;
MS_EDIT *bookmark_3_edit = NULL;
const MS_STATIC mssBookmark = {
{
0,
ALIGN_LEFT,
I_COLOR,
{16, MS_LINE_3, 200, MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(void *)S_BOOKMARK
};
#endif // D_MOVE_TO_BOOKMARK_MENU
char sz_time[9];
char sz_title[3];
char sz_chapter[3];
char sz_track[4];
MS_TIME *time_edit = NULL;
MS_EDIT *title_edit = NULL;
MS_EDIT *chapter_edit = NULL;
MS_EDIT *track_edit = NULL;
const MS_STATIC mssMenuTitle = {
{
0,
ALIGN_LEFT,
I_COLOR,
{60, MS_LINE_0, 200, MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(void *)S_SEARCH
};
const MS_STATIC mssTimeChapterTitle={
{
0,
ALIGN_LEFT_PAD,
I_COLOR,
{300, MS_LINE_0, 200, MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(void *)S_TIME_CHAPTER_TITLE
};
const MS_STATIC mssTotalTime={
{
MS_ASCII | MS_STRING_ON_SC,
ALIGN_LEFT,
I_COLOR,
{470,MS_LINE_0,140,MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(char *)SC_TOTAL_TIME_MSG_ADDR
};
const MS_STATIC mssTitle_Num_Stat = {
{
MS_ASCII | MS_STRING_ON_SC,
ALIGN_LEFT,
SCREEN_COLOR,
//AW0115:move title to the second place
{450,MS_LINE_3,48,MS_LINE_HEIGHT},
// {80, MS_LINE_1, 80, MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(char *)SC_TITLE_MSG_ADDR
};
const MS_STATIC mssChapter_Num_Stat = {
{
MS_ASCII | MS_STRING_ON_SC,
ALIGN_LEFT,
SCREEN_COLOR,
{450,MS_LINE_2,48,MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(char *)SC_CHAPTER_MSG_ADDR
};
const MS_STATIC mssTrack_Num_Stat = {
{
MS_ASCII | MS_STRING_ON_SC,
ALIGN_LEFT,
SCREEN_COLOR,
//AW0115:move title to the second place
{450,MS_LINE_2,48,MS_LINE_HEIGHT},
// {80, MS_LINE_1, 80, MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(char *)SC_TITLE_MSG_ADDR
};
const MS_STATIC mssTRACKSEARCHMenuTitle = {
{
0,
ALIGN_LEFT,
I_COLOR,
{60, MS_LINE_0, 200, MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(void *)S_TRACK_SEARCH
};
const MS_STATIC mssDISCSEARCHMenuTitle = {
{
0,
ALIGN_LEFT,
I_COLOR,
{60, MS_LINE_0, 200, MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(void *)S_DISC_SEARCH
};
const MS_STATIC mssTime = {
{
0,
ALIGN_LEFT,
I_COLOR,
{60, MS_LINE_1, 200,MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(void *)S_TIME
};
//AW0116:delete the static osd
/*const MS_STATIC mssTitleChapter = {
{
0,
ALIGN_LEFT,
I_COLOR,
{16, MS_LINE_2, 200, MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(void *)S_TITLE_CHAPTER
};*/
//AW0116:end
const MS_STATIC mssChapter ={
{
0,
ALIGN_LEFT,
I_COLOR,
{60, MS_LINE_2, 200, MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(void *)S_CHAPTER
};
const MS_STATIC mssTitle ={
{
0,
ALIGN_LEFT,
I_COLOR,
{60, MS_LINE_3, 200, MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(void *)S_TITLE
};
const MS_STATIC mssTrack = {
{
0,
ALIGN_LEFT,
I_COLOR,
{60, MS_LINE_2, 200, MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(void *)S_TRACK
};
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 = 60;
#else
go_CurrentLayout.m_wOriginY = 60;
#endif
go_CurrentLayout.m_wWidth = 720;
#ifdef FONT32X24 //DM0605
go_CurrentLayout.m_wHeight = MS_MAX_LINES_SMALLMM;
#else
go_CurrentLayout.m_wHeight = 120;
#endif
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);
printf("TIME MENU LAYOUT\n");
}
static void on_time_close(void)
{
printf("Time menu closed\n");
if ( g_disc_type != DEC_DISC_TYPE_MP3 )
{
SAFELY_DELETE(time_edit)
}
if ( g_disc_type == DEC_DISC_TYPE_DVD_VIDEO )
{
SAFELY_DELETE(title_edit)
SAFELY_DELETE(chapter_edit)
}
else
{
SAFELY_DELETE(track_edit)
}
}
void time_action(char *s)
{
EVENT evt = 0;
//AW0330:if the string is "--:--:--"then send invalid action
long seconds =0;
unsigned char valid=1;
rtouts("\nTime is "); rtouts(s);
if(strcmp((char*)s,"------")==0) valid=0;
if(g_ui_active_menu_id==TRACK_SEARCH_MENU_ID)
{
//AW0103:let dvd disc time search send GOTO_TIME event
if(g_disc_type==DEC_DISC_TYPE_DVD_VIDEO||g_disc_type==DEC_DISC_TYPE_DVD_AUDIO)
evt= IE_CORE_GOTO_TIME;
else{
evt=IE_CORE_GOTO_TRACK_TIME;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -