📄 osddraw.h
字号:
//---------------------------------------------------------------------------
// Terawins Inc. Company Confidential Strictly Private
//
// $Archive: OSDDraw.h $
// $Revision: 0.01 $
// $Author: jwang $
// $Date: 2002/06/31 $
//
// --------------------------------------------------------------------------
// >>>>>>>>>>>>>>>>>>>>>>>>> COPYRIGHT NOTICE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// --------------------------------------------------------------------------
// Copyright 2002(c) Terawins Inc.
// --------------------------------------------------------------------------
#if !defined(__OSDDRAW_H__)
#define __OSDDRAW_H__
//Background only in even
#define PWBLUE_GREY 0xc3 //0xef
#define BLUE_GREY 0xce //0xef
#define BLUE_WHITE 0xEF
#define BLUE_RED 0xE6
#define BLUE_OLIVE 0xe7
#define BLUE_YELLOW 0xEC
#define BLUE_BLACK 0xe2
#define DBLUE_WHITE 0x4F
#define DBLUE_YELLOW 0x4C
#define YELLOW_RED 0xC6
#define YELLOW_DBLUE 0xC4
#define YELLOW_BLUE 0xCE
#define YELLOW_WHITE 0xcf
#define GREEN_WHITE 0x8F
#define DBLUE_RED 0x46
#define RED_YELLOW 0x6C
#define LBLUE_WHITE 0xAF
#define LBLUE_GREEN 0xA5
#define LBLUE_RED 0xA6
#define BLACK_WHITE 0x2F
#define GREEN_YELLOW 0x8C
#define WHITE_YELLOW 0xFC
#define BLACK_GREY 0xc2 //0xe2
#define WHITE_PURPLE 0x4f
#define WHITE_GREY 0x8f
//sary
#define COL_TITLE 0x77 //YELLOW_BLUE
#define COL_NORMAL BLUE_YELLOW
#define COL_VALIDE BLUE_RED //BLUE_OLIVE
#define COL_INVALIDE BLUE_BLACK
#define COL_ALERTE YELLOW_RED
//#define COL_CURSOR BLUE_RED
#define COL_CURSOR BLUE_WHITE
#define COL_CURSOR2 YELLOW_WHITE //YELLOW_BLUE
//#define COL_NORMAL BLACK_WHITE
#define COL_FOCUS BLUE_WHITE
//#define COL_GAUGE GREEN_WHITE
#define COL_GAUGE BLUE_YELLOW
#define COL_SELECT BLACK_GREY
#define COL_ICON PWBLUE_GREY
#define COL_RED DBLUE_RED
#define COL_GREEN DBLUE_RED
#define COL_BLUE DBLUE_RED
#define COL_CLEAR 0x00
#define COL_NOSUPPORT RED_YELLOW
#define COL_NOSIGNAL YELLOW_DBLUE
#define COL_FRTYMENU LBLUE_WHITE
#define COL_FRAME LBLUE_GREEN
#define COL_PROCESS LBLUE_RED
#define LINE_LENGTH 27
#define GAUGE_LENGTH 20
#define FONT_SIZE10W16H 0x00
#define FONT_SIZE12W16H 0x01
#define FONT_SIZE14W16H 0x02
#define FONT_SIZE16W16H 0x03
#define FONT_SIZE10W18H 0x08
#define FONT_SIZE12W18H 0x09
#define FONT_SIZE14W18H 0x0a
#define FONT_SIZE16W18H 0x0b
#define WIDTH10 10
#define WIDTH12 12
#define WIDTH14 14
#define WIDTH16 16
#define HEIGHT16 16
#define HEIGHT18 18
#define HEIGHT20 20
#define HEIGHT24 24
#define COL_9300 0
#define COL_6500 1
#define COL_USER 2
#define COL_BRIGHT 3
#define CENTER 1
#define BOTTOM 2
#define TOP 3
#define RIGHT_TOP 4
//////sary
#define MAIN_P 5
#define SOURCE_P 6
#define AUDIO_P 7
#define VIDEO_P 8
#define SCREEN_P 9
#define SYSTEM_P 10
//////////////////////////
//#define NEW_OSD
#ifdef NEW_OSD
#define FONT_SIZE FONT_SIZE12W16H
#define FONT_WIDTH WIDTH12
#define FONT_HEIGHT HEIGHT16
enum{BAR_S_MIN=36, BAR_S_1, BAR_S_2, BAR_S_MAX}; //36, 37, 38, 39
enum{BAR_MIN=40, BAR1, BAR2, BAR_MAX}; //40 41 42 43
enum{BAR__E_MIN=44,BAR_E_1, BAR_E_2, BAR_E_MAX}; //44 45 46 47
#else
#define FONT_SIZE FONT_SIZE12W18H
#define FONT_WIDTH WIDTH12
#define FONT_HEIGHT HEIGHT18
enum{BAR_S_MIN=36, BAR_S_1, BAR_S_2, BAR_S_MAX}; //36, 37, 38, 39
enum{BAR_MIN=40, BAR_1, BAR_2, BAR_MAX}; //40 41 42 43
enum{BAR_E_MIN=44,BAR_E_1, BAR_E_2, BAR_E_MAX}; //44 45 46 47
#endif
#define MAIN_MENU_TOTAL_LINES 12
#define SUB_MENU_TOTAL_LINES 7 //DigiMax OSD Language sub-menu
//#define TOTAL_FONT_NUM sizeof(AllFonts)/sizeof(unsigned char*)
#define TOTAL_FONT_NUM 128
#define FONT_DATA_START_ADDRESS 0x0000
#define MENU_RAM_START_ADDRESS ((TOTAL_FONT_NUM*FONT_HEIGHT)/32+1)*32
#define CHAR_MAIN_MENU_START ((MENU_RAM_START_ADDRESS>>5)&0x7F)
//MENU_RAM_START_ADDRESS must be times of 32
//#define MENU_RAM_START_ADDRESS 0x9c0 //0xc00 - 0x20 * line total
#define CHAR_RAM_END 0x60
#define idGammaAdjust 0x20
/*
//Main Menu
enum{
idMainMenu=0x10,
idBRIGHT,
idCONTRAST,
idSHARP,
idSAT,
idHUE
};
*/
//Main Menu
/*
typedef enum{
eENGLISH,
eCHINESE
} eLANGUAGE;
*/
#define OSD_LENGTH 30
#define NOSIGNAL_LENGTH 13
#define NOSUPPORT_LENGTH 14
#define COLORCAL_LENGTH 23
#define CALDOING_LENGTH 18
#define ICON_STAT 0
#define TXT_STAT 3
#define NUM_STAT 21
#define FCTRY_OSD_LENGTH 25
#define FCTRY_NUM_STAT 20
//OSD number draw attabite
#define DRAW_BLANK 0x10
#define DRAW_ZERO 0x20
//void OSDLogo(void);
void OSDInit(void);
void OSDLoadColor(void);
void OSDSetRamAddr(uWORD);
//void OSDEventMgr(void);
//void OSDOpenMenu(void);
//void OSDFuncSelect(sCHAR);
//void OSDFuncEnter(void);
//void OSDFuncEnterVideo(void);
//void OSDFuncExit(void);
//void OSDFuncExitVideo(void);
void OSDDisable(void);
void OSDEnable(void);
void OSDExit(void);
//void OSDShowPage(void);
//void OSDShowFactryPage(void);
void OSDShowLine(uCHAR*,uCHAR,uCHAR,uCHAR,uCHAR);
//void OSDDisplayNum(uCHAR cVal, uCHAR x, uCHAR y, uCHAR cColor);
//void OSDHLLine(uCHAR *str, uCHAR x, uCHAR y, uCHAR cCol);
//void OSDHLLine(uCHAR, uCHAR);
//void OSDMoveCursor(uCHAR, uCHAR);
//void OSDShowData(uCHAR);
//void OSDShowVideoData(void);
//void OSDDrawGauge(uCHAR cVal, uCHAR cMax, uCHAR x, uCHAR y, uCHAR cColor);
//void OSDDrawNum(uWORD wVal, uCHAR cMax, uCHAR x, uCHAR y, uCHAR cColor, uCHAR cAttr);
//void OSDDrawTVFreq(uWORD wFreq);
//void OSDShowTV_Num(uCHAR cTemp);
//void OSDDrawBand(uWORD wFreq);
//void OSDNumConvert(uCHAR cNum);
//void OSDShowInfo(uCHAR,uCHAR,uCHAR);
//void OSDDrawSkip(void);
//void OSDShowRESET(bit bTemp);
void OSDCleanLine(uCHAR x,uCHAR y,uCHAR cColor,uCHAR cLength);
void OSDClearPage(void);
void OSDSetLineAttribute(uCHAR cLine,uCHAR cAttribute);
//void OSDShiftSrc(uCHAR cSrc1, uCHAR cSrc2);
//void OSDShowSubpage(void);
//void OSDDspMessages(uCHAR);
void OSDPosition(uCHAR);
//void OSDTVShowChannel(uCHAR x, uCHAR y, uCHAR cColor, uCHAR cChannel);
//void OSDShowTVSource(sCHAR);
//void OSDDrawFactry(void);
//void OSDDrawSTV_STH(void);
//void OSDShowVideoNum(uCHAR, uCHAR);
//void OSDDrawHexNum(uWORD wVal, uCHAR x, uCHAR y, uCHAR cColor);
//void OSDShowSource(void);
//void OSDShowNTSC_PAL(void);
//void OSDDrawSoundSystem(void);
//void OSDShowRatio(void);
#endif // __OSDDRAW_H__
//////////////////////
//sary
//main
#define TITLE_STAT 13
#define SOURCE_STAT 3
#define AUDIO_STAT 13
#define VIDEO_STAT 23
#define SCREEN_STAT 3
#define SYSTEM_STAT 13
#define DEFAULT_STAT 23
#define MAIN_LINE1 2
#define MAIN_LINE2 4
//sub menu
#define SUB_STAT 2
#define VAL_STAT 26
void OSD_SignVal(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char);
unsigned char Comp2(char);
void OSD_UnsignVal(unsigned char , unsigned char , unsigned char , unsigned char);
unsigned char OSD_GaugeSt(unsigned char, unsigned char, unsigned char, unsigned char);
unsigned char OSD_GaugeMiEmpty(unsigned char, unsigned char, unsigned char, unsigned char);
unsigned char OSD_GaugeMiFull(unsigned char, unsigned char, unsigned char, unsigned char);
unsigned char OSD_GaugeMilevel(unsigned char, unsigned char, unsigned char, unsigned char);
unsigned char OSD_GaugeEnd(unsigned char, unsigned char, unsigned char, unsigned char);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -