📄 osd.h
字号:
//----------------------------------------------------------------------------------------------------
// ID Code : Osd.h No.0000
// Update Note :
//
//----------------------------------------------------------------------------------------------------
#ifdef __OSD__
//--------------------------------------------------
// Global Variables
//--------------------------------------------------
BYTE idata ucOsdState = 0;
BYTE idata ucOsdEventMsg = 0;
BYTE idata ucOsdMap = 0;
bit bVideoSharpness = 0;
#else
//--------------------------------------------------
// Extern Global Variables
//--------------------------------------------------
extern BYTE idata ucOsdState;
extern BYTE idata ucOsdEventMsg;
extern BYTE idata ucOsdMap;
extern bit bVideoSharpness;
#endif
//--------------------------------------------------
// Definitions of Font Start Position
//--------------------------------------------------
#define _OSD_FONT_START_POSITION 745
//--------------------------------------------------
// Definitions of Clock Settings Used by COsdFxGetAdcClockRange()
//--------------------------------------------------
#define _CLOCK_BIAS 50
#define _GET_CLOCKRANGE_MAX 0
#define _GET_CLOCKRANGE_MIN 1
//--------------------------------------------------
// Definitions of Hor. Position Settings Used by COsdFxGetHPositionRange()
//--------------------------------------------------
#define _HPOSITION_BIAS (ucHStartBias - abs(stModeInfo.IHStartPos - stModeUserCenterData.CenterHPos))
#define _GET_HPOSITIONRANGE_MAX 0
#define _GET_HPOSITIONRANGE_MIN 1
//--------------------------------------------------
// Definitions of Ver. Position Settings Used by COsdFxGetVPositionRange()
//--------------------------------------------------
#define _VPOSITION_BIAS (ucVStartBias - abs(stModeInfo.IVStartPos - stModeUserCenterData.CenterVPos))
#define _GET_VPOSITIONRANGE_MAX 0
#define _GET_VPOSITIONRANGE_MIN 1
//--------------------------------------------------
// Definitions of OSD timer. Add by zhang_dc
//--------------------------------------------------
#define _OSD_TIMER_MAX 30
#define _OSD_TIMER_MIN 3
//--------------------------------------------------
// Definitions of Volume. Add by zhang_dc
//--------------------------------------------------
#define _VOLUME_MAX 255
#define _VOLUME_MIN 66//0
//--------------------------------------------------
// Definitions of System Timer. Add by zhang_dc
//--------------------------------------------------
#define _USER_TIMER_MAX 24
/*
//--------------------------------------------------
// Definitions of OSD Position
//--------------------------------------------------
#define _OSD_HPOSITION_RANGE 200
#define _OSD_VPOSITION_RANGE 200
#define _OSD_HPOSITION_OFFSET 8
#define _OSD_VPOSITION_OFFSET 5
*/
//--------------------------------------------------
// Definitions of OSD Show Number Function Used by COsdFxShowNumber()
//--------------------------------------------------
#define _ALIGN_LEFT 0
#define _ALIGN_RIGHT 1
#define _FORCE_SHOW_NUMBER_OFF (0 << 1)
#define _FORCE_SHOW_NUMBER_ON (1 << 1)
#define _SHOW_1 (0 << 4)
#define _SHOW_2 (1 << 4)
#define _SHOW_3 (2 << 4)
#define _SHOW_4 (3 << 4)
#define _SHOW_5 (4 << 4)
//--------------------------------------------------
// Definitions of Checking Max or Min Value Used by COsdFxDetOverRange()
//--------------------------------------------------
#define _DET_OVERRANGE_MAX 0
#define _DET_OVERRANGE_MIN 1
//----------------------------------------------------------------------------------------------------
//--------------------------------------------------
// Definitions of OSD Event Message
//--------------------------------------------------
#define _NONE_MSG 0
#define _SHOW_NOSIGNAL_MSG 1
#define _SHOW_NOCABLE_MSG 2
#define _SHOW_NOSUPPORT_MSG 3
#define _SAVE_EE_MODEUSERDATA_MSG 4
#define _SAVE_EE_SYSTEMDATA_MSG 5
#define _SAVE_EE_OSDUSERDATA_MSG 6
#define _SAVE_EE_ADCDATA_MSG 7
#define _SAVE_EE_COLORPROC0_MSG 8
#define _SAVE_EE_COLORPROC1_MSG 9
#define _ENTER_FACTORY_MODE_MSG 10
#define _CHANGE_SOURCE_MSG 11
#define _DO_AUTO_CONFIG 12
#define _SHOW_MAIN_PAGE 13 //Add by zhang_dc for showing main page.
#define _SAVE_EE_VIDEODATA_MSG 14 //Add by zhang_dc
#define _SHOW_TIMER_REMIND 15 //Add by zhang_dc for showing user timer remind information
#define _SAVE_EE_AUDIODATA_MSG 16 //x.hu, for audio
#define _SHOW_SOURCE_MSG 17 //x.hu, for source hint
//--------------------------------------------------
// Definitions of Different OSD Map Type
//--------------------------------------------------
#define _OSD_MAP0 0
#define _OSD_MAP1 1
#define _OSD_MAP2 2
#define _OSD_MAP3 3
#define _OSD_MAP4 4
#define _OSD_MAP5 5
#define _OSD_MAP6 6
//--------------------------------------------------
// Definations of Write Byte
//--------------------------------------------------
#define _WRITE_BYTE0 0
#define _WRITE_BYTE1 1
#define _WRITE_BYTE2 2
#define _WRITE_BYTEALL 3
//--------------------------------------------------
// Definations of OSD Function
//--------------------------------------------------
#define _EXT_ 0xfc
#define _REPEAT_ 0xfd
#define _NEXT_ 0xfe
#define _END_ 0xff
//--------------------------------------------------
// Definitions of Color Palette
//--------------------------------------------------
#define _CP_BLACK 0
#define _CP_WHITE 1
#define _CP_RED 2
#define _CP_GREEN 3
#define _CP_BLUE 4
#define _CP_YELLOW 5
#define _CP_GRAY 6
#define _CP_DARKBLUE 7
#define _CP_LIGHTBLUE 8
#define _CP_COLOR9 9
#define _CP_COLOR10 10
#define _CP_COLOR11 11
#define _CP_COLOR12 12
#define _CP_COLOR13 13
#define _CP_COLOR14 14
#define _CP_COLOR15 15
//----------------------------------------------------------------------------------------------------
//--------------------------------------------------
// Macro of OSD
//--------------------------------------------------
#define FONTBYTE0(x) HIBYTE(0x1000|x),LOBYTE(0x1000|x)
#define FONTBYTE1(x) HIBYTE(0x5000|x),LOBYTE(0x5000|x)
#define FONTBYTE2(x) HIBYTE(0x9000|x),LOBYTE(0x9000|x)
#define FONTALLBYTE(x) HIBYTE(0xD000|x),LOBYTE(0xD000|x)
#define WINDOWBYTE0(x) HIBYTE(0x0000|x),LOBYTE(0x0000|x)
#define WINDOWBYTE1(x) HIBYTE(0x4000|x),LOBYTE(0x4000|x)
#define WINDOWBYTE2(x) HIBYTE(0x8000|x),LOBYTE(0x8000|x)
#define WINDOWALLBYTE(x) HIBYTE(0xC000|x),LOBYTE(0xC000|x)
#define FRAMEBYTE0(x) WINDOWBYTE0(x)
#define FRAMEBYTE1(x) WINDOWBYTE1(x)
#define FRAMEBYTE2(x) WINDOWBYTE2(x)
#define FRAMEALLBYTE(x) WINDOWALLBYTE(x)
#define WINNO(x) x
#define ROW(x) x
#define COL(x) x
#define WIDTH(x) x
#define HEIGHT(x) x
#define LENGTH(x) x
#define FGCOLOR(x) x
#define BGCOLOR(x) x
#define COLOR00(x) x
#define COLOR01(x) x
#define COLOR10(x) x
#define COLOR11(x) x
#define XSTART(x) x
#define YSTART(x) x
#define XEND(x) x
#define YEND(x) x
#define LANGUAGE(x) x //Add by zhang_dc
#define WXSTART(x0,x1) (0x000|((x1&0x01f)<<6)|((x0&0x0fc)>>2)) //add by zhang_dc
#define WYSTART(x1,x2) (0x000|(x2<<3)|((x1&0x0e0)>>5)) //add by zhang_dc
#define WXEND(x0,x1) (0x000|((x1&0x01f)<<6)|((x0&0x0fc)>>2)) //add by zhang_dc
#define WYEND(x1,x2) (0x000|(x2<<3)|((x1&0x0e0)>>5)) //add by zhang_dc
//--------------------------------------------------
// Char Alias
//--------------------------------------------------
#define ___ 0x00
#define _0_ 0x01
#define _1_ 0x02
#define _2_ 0x03
#define _3_ 0x04
#define _4_ 0x05
#define _5_ 0x06
#define _6_ 0x07
#define _7_ 0x08
#define _8_ 0x09
#define _9_ 0x0a
#define _A_ 0x1B
#define _B_ (_A_+1)
#define _C_ (_A_+2)
#define _D_ (_A_+3)
#define _E_ (_A_+4)
#define _F_ (_A_+5)
#define _G_ (_A_+6)
#define _H_ (_A_+7)
#define _I_ (_A_+8)
#define _J_ (_A_+9)
#define _K_ (_A_+10)
#define _L_ (_A_+11)
#define _M_ (_A_+12)
#define _N_ (_A_+13)
#define _O_ (_A_+14)
#define _P_ (_A_+15)
#define _Q_ (_A_+16)
#define _R_ (_A_+17)
#define _S_ (_A_+18)
#define _T_ (_A_+19)
#define _U_ (_A_+20)
#define _V_ (_A_+21)
#define _W_ (_A_+22)
#define _X_ (_A_+23)
#define _Y_ (_A_+24)
#define _Z_ (_A_+25)
#define _a_ 0x35
#define _b_ (_a_+1)
#define _c_ (_a_+2)
#define _d_ (_a_+3)
#define _e_ (_a_+4)
#define _f_ (_a_+5)
#define _g_ (_a_+6)
#define _h_ (_a_+7)
#define _i_ (_a_+8)
#define _j_ (_a_+9)
#define _k_ (_a_+10)
#define _l_ (_a_+11)
#define _m_ (_a_+12)
#define _n_ (_a_+13)
#define _o_ (_a_+14)
#define _p_ (_a_+15)
#define _q_ (_a_+16)
#define _r_ (_a_+17)
#define _s_ (_a_+18)
#define _t_ (_a_+19)
#define _u_ (_a_+20)
#define _v_ (_a_+21)
#define _w_ (_a_+22)
#define _x_ (_a_+23)
#define _y_ (_a_+24)
#define _z_ (_a_+25)
#define _DOT_ 0x0B // .
#define _COLON_ 0x0C // :
#define _PLUS_ 0x0D // +
#define _SUBT_ 0x0E // -
#define _DIVI_ 0x0F // /
#define _MULT_ 0x10 // x
#define _PERC_ 0x11 // %
#define _ARROW_ 0x51 // >
//--------------------------------------------------
// Definitions of OSD Menu .Add by zhang_dc
//--------------------------------------------------
#define _OSD_MAIN_ROW 14
#define _OSD_MAIN_COL 28
#define _OSD_MAIN_ITEM_NUM 6 //There are 6 items in one main page. Notice! should not change this value!
#define _OSD_AUTO_ROW 5
#define _OSD_AUTO_COL 22
#define _OSD_HINT_ROW _OSD_AUTO_ROW
#define _OSD_HINT_COL _OSD_AUTO_COL
#define _OSD_USERTIMER_ROW _OSD_AUTO_ROW
#define _OSD_USERTIMER_COL _OSD_AUTO_COL
//-------------------------------------------------
// Definitions of Char number. Add by zhang_dc
//------------------------------------------------
#define _GLOBAL_CHAR_NUM 0x52
#define _SCHINESE_CHAR_NUM 0x4A
#define _EUROPE_CHAR_NUM 0x2E
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -