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

📄 mrt_m.c

📁 Zoran VP2K731 DVD源代码,极具参考价值!
💻 C
字号:
/***********************************************************************/
/* File:															   */
/*	  Copyright (c) 2000 ZORAN Corporation, All Rights Reserved		   */
/*	  THIS IS PROPRIETARY SOURCE CODE OF ZORAN CORPORATION             */
/*																	   */
/* ===========                                                         */
/* Descripton:                                                         */
/* ===========                                                         */
/*                                                                     */
/* Log:                                                                */
/* ===                                                                 */
/* $Name: V_1_1A V_1_19 V_1_16 V_1_15 V_1_14 V_1_13 V_1_12 NV_1_00 $                                                            
/* $Header: v:/dsg/rcs/dsg/vp2k/Customer/MENU/newzoran/MRT_M.C 1.1 2001/06/26 08:04:55 dingming Exp $                                                          
/* $Log: MRT_M.C $										                       
/* Revision 1.1  2001/06/26 08:04:55  dingming										                       
/* Initial revision										                       
/* Revision 1.1  2001/03/20 08:40:39  fwang										                       
/* Initial revision										                       
/* Revision 1.1  2001/03/14 04:12:00  cliff										                       
/* Initial revision										                       
/* Revision 1.13  2000/12/28 00:48:27  charlie										                       
/* Renamed D_MODEM_EXCLUSIVE_MODE_AND_REPEAT										                       
/* Revision 1.12  2000/12/16 02:09:59  charlie										                       
/* Added D_ORION_LINK_MODE_AND_REPEAT to clear										                       
/* Mode/Repeat when Repeat/Mode is pressed.										                       
/* Revision 1.11  2000/11/17 18:54:17  charlie										                       
/* Use C_FOCUSED										                       
/* Revision 1.10  2000/11/09 04:07:33  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 "..\..\..\customer\dragon\strings\strings.h"
#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 "mode.h"

#ifdef D_MODEM_EXCLUSIVE_MODE_AND_REPEAT

#define FORCE_CHOICE(_action_, _itemNum_, _choice_)					\
	if ( _choice_->current_choice != _itemNum_ )					\
	{																\
	  _action_( _itemNum_ );										\
	  _choice_->current_choice = _itemNum_;							\
	  OSD_SetOrigin( (MS_WIDGET *) screen );						\
	  _choice_->widget.user_op(&_choice_->widget,MS_UOP_DISPLAY,0);	\
	}

void (*gmrtm_mode_action)(int iNum) = NULL;
void (*gmrtm_repeat_action)(int iNum) = NULL;

void mrtm_mode_action(int iNum)
{
  gmrtm_mode_action(iNum);
  if ( (iNum != ITEMNUM_ANY_MODE_OFF) )
  {
	FORCE_CHOICE( gmrtm_repeat_action, ITEMNUM_REPEAT_OFF, choice2 );
  }
}

void mrtm_repeat_action(int iNum)
{
  gmrtm_repeat_action(iNum);
  if ( iNum != ITEMNUM_REPEAT_OFF )
  {
	FORCE_CHOICE( gmrtm_mode_action, ITEMNUM_ANY_MODE_OFF, choice1 );
  }
}
#endif // D_MODEM_EXCLUSIVE_MODE_AND_REPEAT

// Static text positions
// Widget positions
static const MS_POS	screen_pos = {104, MS_LINE_2, 504, MS_MAX_LINES_SMALLMM};

static const MS_POS	mode_choice_pos = {200, MS_LINE_1 ,296, MS_LINE_HEIGHT};
static const MS_POS	repeat_choice_pos = {200, MS_LINE_2, 296, MS_LINE_HEIGHT};
static 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_PLAY_MODE
};

const MS_STATIC mssMode = {
	{
	0,
	ALIGN_LEFT,
	I_COLOR,
	{16, MS_LINE_1, 200, MS_LINE_HEIGHT},
	NO_PARENT,
	static_user_op,
	},
	(void *)S_MODE
};

const MS_STATIC mssRepeat = {
	{
	0,
	ALIGN_LEFT,
	I_COLOR,
	{16, MS_LINE_2, 200, MS_LINE_HEIGHT},
	NO_PARENT,
	static_user_op,
	},
	(void *)S_REPEAT
};


static void layout (void)
{

	go_CurrentLayout.m_bBigMemMap =FALSE;// USE_BIGMEMMAP_WHEN_REQUIRED;
	go_CurrentLayout.m_cPixRes = 0;
	go_CurrentLayout.m_wOriginX = 0;
	go_CurrentLayout.m_wOriginY = MS_LINE_2;
	go_CurrentLayout.m_wWidth = 720;
	go_CurrentLayout.m_wHeight = 144;
	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("MODE RUNTIME MENU LAYOUT\n");
}

static void on_mode_runtime_close(void)
 {
#ifdef NO_C_STDLIB
  dbouts("\nMode runtime menu screen closed");
#endif
	SAFELY_DELETE(choice1)
	SAFELY_DELETE(choice2)
}

void open_mode_runtime(void)
{
	screen = MS_create_screen((MS_POS *)&screen_pos,screen_color,0,on_mode_runtime_close,layout);

	choice1 = open_mode_choice(&mode_choice_pos, i_color, &dont_care_pos);

#ifdef D_MODEM_EXCLUSIVE_MODE_AND_REPEAT
	gmrtm_mode_action = choice1->action;
	choice1->action = mrtm_mode_action;
#endif // D_MODEM_EXCLUSIVE_MODE_AND_REPEAT
	
	if ( g_disc_type == DEC_DISC_TYPE_DVD_VIDEO )
	{
	  choice2 = MS_create_choice(&repeat_choice_pos,i_color,&repeat_list_dvd,&dont_care_pos,repeat_action,MS_HOT_SPOT);
	}
#ifdef D_PICTURE_CD_ENABLED	//DM1114 disable repeat one for jpg
	else if ( g_disc_type == DEC_DISC_TYPE_JPG )
	{
	  choice2 = MS_create_choice(&repeat_choice_pos,i_color,&repeat_list_jpg,&dont_care_pos,repeat_action_jpg,MS_HOT_SPOT);
	}
#endif
	else
	{
	  choice2 = MS_create_choice(&repeat_choice_pos,i_color,&repeat_list,&dont_care_pos,repeat_action,MS_HOT_SPOT);
	}
	repeat_choice(choice2);

#ifdef D_MODEM_EXCLUSIVE_MODE_AND_REPEAT
	gmrtm_repeat_action = choice2->action;
	choice2->action = mrtm_repeat_action;
#endif // D_MODEM_EXCLUSIVE_MODE_AND_REPEAT

	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*)&mssMode, !C_FOCUSED);
	MS_add_item((MS_DIALOG*)screen,(MS_WIDGET*)&mssRepeat, !C_FOCUSED);

	MS_dialog_display((MS_DIALOG*)screen);
}

⌨️ 快捷键说明

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