📄 fu_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/fu_m.c 1.3 2001/06/06 06:15:07 dingming Exp $ */
/* $Log: fu_m.c $ */
/* Revision 1.3 2001/06/06 06:15:07 dingming */
/* font 32X24 complile */
/* Revision 1.2 2000/12/15 00:36:45 tia */
/* Improve display layout. */
/***********************************************************************/
#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"
#ifdef FONT32X24
#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"
#include "..\..\..\playcore\scpad\scmgr.h"
#include "../../../kernel/ker_api.h"
// REMINDER This is not needed if we don't use oHWLimit
#include "..\..\..\Decoder\decoder.h"
#define BUTTON_COLOR I_COLOR
#define OPTION_HEIGHT MS_LINE_HEIGHT
static void fupgrade_cancel_action(void);
static void fupgrade_partial_action(void);
static void fupgrade_total_action(void);
// Static text positions
// Widget positions
static const MS_POS screen_pos = {104, MS_LINE_2, 496, MS_MAX_LINES_SMALLMM};
//static const MS_POS fu_cver_pos = {10, MS_LINE_1, 200, MS_LINE_HEIGHT};
//static const MS_POS fu_nver_pos = {210, MS_LINE_1, 200, MS_LINE_HEIGHT};
static const MS_STATIC mssFupgrade = {
{
0,
ALIGN_LEFT,
I_COLOR,
{120, MS_LINE_0, 200, MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(void *)S_FUPGRADE
};
const MS_STATIC mssVersion = {
{
MS_ASCII | MS_STRING_ON_SC,
ALIGN_LEFT,
I_COLOR,
{10, MS_LINE_1, 200, MS_LINE_HEIGHT},
NO_PARENT,
static_user_op,
},
(char *)SC_VERSION_MSG_ADDR
};
static const MS_STATIC mssPrograming = {
{
0,
ALIGN_LEFT,
I_COLOR,
#ifdef FONT32X24
{100, MS_LINE_2, 200, MS_LINE_HEIGHT},
#else
{110, MS_LINE_2, 200, MS_LINE_HEIGHT},
#endif
NO_PARENT,
static_user_op,
},
(void *)S_ERASE_AND_PROGRAM
};
static const MS_BUTTON cancel_btn = {
{
{MS_HOT_SPOT,
ALIGN_CENTER,
BUTTON_COLOR,
#ifdef FONT32X24
{100, MS_LINE_3, 100, OPTION_HEIGHT},
#else
{60, MS_LINE_3, 100, OPTION_HEIGHT},
#endif
NO_PARENT,
button_user_op},
(void *)S_CANCEL},
fupgrade_cancel_action
};
const MS_BUTTON partial_btn = {
{
{MS_HOT_SPOT,
ALIGN_CENTER,
BUTTON_COLOR,
#ifdef FONT32X24
{220, MS_LINE_3, 100, OPTION_HEIGHT},
#else
{200, MS_LINE_3, 100, OPTION_HEIGHT},
#endif
NO_PARENT,
button_user_op},
(void *)S_PARTIAL},
fupgrade_partial_action
};
const MS_BUTTON total_btn = {
{
{MS_HOT_SPOT,
ALIGN_CENTER,
BUTTON_COLOR,
#ifdef FONT32X24
{360, MS_LINE_3, 100, OPTION_HEIGHT},
#else
{340, MS_LINE_3, 100, OPTION_HEIGHT},
#endif
NO_PARENT,
button_user_op},
(void *)S_TOTAL},
fupgrade_total_action
};
static void layout (void)
{
go_CurrentLayout.m_bBigMemMap = FALSE;
go_CurrentLayout.m_cPixRes = 0;
go_CurrentLayout.m_wOriginX = 0;
#ifdef FONT32X24
go_CurrentLayout.m_wOriginY = MS_LINE_2;
#else
go_CurrentLayout.m_wOriginY = 60;
#endif
go_CurrentLayout.m_wWidth = 720;
#ifdef FONT32X24
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("FUPGRADE SCREEN LAYOUT\n");
}
void open_fupgrade()
{
printf("ENTERING FUPGRADE MENU\n");
screen = MS_create_screen((MS_POS *)&screen_pos, screen_color, 0, fupgrade_cancel_action, layout);
if (!screen){
printf("ERROR creating FUPGRADE SCREEN!\n");
}
MS_add_item((MS_DIALOG*)screen,(MS_WIDGET*)&mssFupgrade,0);
MS_add_item((MS_DIALOG*)screen,(MS_WIDGET*)&mssVersion,0);
MS_add_item((MS_DIALOG*)screen,(MS_WIDGET*)&cancel_btn,1);
MS_add_item((MS_DIALOG*)screen,(MS_WIDGET*)&partial_btn,0);
MS_add_item((MS_DIALOG*)screen,(MS_WIDGET*)&total_btn,0);
MS_dialog_display((MS_DIALOG*)screen);
}
static void fupgrade_cancel_action(void)
{
#ifdef NO_C_STDLIB
printf("Cancel Button Pressed\n");
#endif
g_ms_bMustClose = TRUE;
g_dl_state = CD_CANCEL_DOWNLOAD;
}
static void fupgrade_partial_action(void)
{
#ifdef NO_C_STDLIB
rtouts("Partial Button Pressed\n");
#endif
MS_add_item((MS_DIALOG*)screen,(MS_WIDGET*)&mssPrograming,0);
MS_dialog_display((MS_DIALOG*)screen);
g_dl_state = CD_PARTIAL_DOWNLOAD;
sleep (30*60);
}
static void fupgrade_total_action(void)
{
#ifdef NO_C_STDLIB
rtouts("Total Button Pressed\n");
#endif
MS_add_item((MS_DIALOG*)screen,(MS_WIDGET*)&mssPrograming,0);
MS_dialog_display((MS_DIALOG*)screen);
g_dl_state = CD_TOTAL_DOWNLOAD;
sleep (30*60);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -