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

📄 disp.h

📁 一个操作系统源代码 用于嵌入式设备 在Vc++环境下仿真 成功移植到多款处理器上
💻 H
字号:
#ifndef _DISP_H
#define _DISP_H

#ifndef _ASIXWIN_H
#include <asixwin.h>
#endif

#define STRING16_MAX_LEN	ASIX_LCD_W/8
#define STRING5X7_MAX_LEN	ASIX_LCD_W/6

extern char Mtempstr[];
/*
extern char 	*DrawText(U32 hDC, char *str, U16 xSrc, U16 ySrc, U16 xDes, U16 yDes, U16 font, U16 grey, U16 style);
extern STATUS	TextOut(U32 hDC, char *str, U16 xSrc, U16 ySrc, U16 font, U16 grey, U16 style);
*/
extern void Disp16X16ASCIIString(char *string, U16 xSrc, U16 ySrc);
extern void Disp16X16ASCIIStringGrey(U8 grey,char *string, U16 xSrc, U16 ySrc);

extern void Disp16StringCenter(const char *string, U16 winXSrc, U16 winXWidth, U16 ySrc);
extern void Disp5X7StringCenter(const char *string, U16 winXSrc, U16 winXWidth, U16 ySrc);
//extern void Disp16StringCenterGrey(U8 grey,const char *string, U16 winXSrc, U16 winXWidth, U16 ySrc);


#define Disp5X7Char(chr, xSrc, ySrc) 	\
		Mtempstr[0] = chr;				\
		Mtempstr[1] = '\0';				\
		TextOut(GetGC(), Mtempstr, xSrc, ySrc, ASCII_5X7_FONT, ColorTheme.form_text, GPC_REPLACE_STYLE)		

#define Disp8X16Char(chr, xSrc, ySrc)	\
		Mtempstr[0] = chr;				\
		Mtempstr[1] = '\0';				\
		TextOut(GetGC(), Mtempstr, xSrc, ySrc, ASCII_8X16_FONT, ColorTheme.form_text, GPC_REPLACE_STYLE)
		
#define Disp16Char(chr, xSrc, ySrc)		\
		Mtempstr[0] = chr;				\
		Mtempstr[1] = '\0';				\
		TextOut(GetGC(), Mtempstr, xSrc, ySrc, HZK_16X16_FONT, ColorTheme.form_text, GPC_REPLACE_STYLE)

#define Disp5X7String(string, xSrc, ySrc)\
		TextOut(GetGC(), string, xSrc, ySrc, ASCII_5X7_FONT, ColorTheme.form_text, GPC_REPLACE_STYLE)

#define Disp16String(string, xSrc, ySrc)\
		TextOut(GetGC(), string, xSrc, ySrc, HZK_16X16_FONT, ColorTheme.form_text, GPC_REPLACE_STYLE)

#define Disp5X7StringGrey(grey, string,  xSrc, ySrc)\
		TextOut(GetGC(), string, xSrc, ySrc, ASCII_5X7_FONT, grey, GPC_REPLACE_STYLE)

#define Disp16StringGrey(grey, string, xSrc, ySrc )\
		TextOut(GetGC(), string, xSrc, ySrc, HZK_16X16_FONT, grey, GPC_REPLACE_STYLE)

#define Disp16StringCenter(string, winXSrc, winXWidth, ySrc)\
		TextOut(GetGC(), string, xSrc, ySrc, HZK_16X16_FONT, ColorTheme.form_text, GPC_REPLACE_STYLE)

#define DispStringCenter(string, ySrc, font )\
		TextOut(GetGC(), string, AlignString( str, winXSrc, winXWidth, GPC_ALIGN_CENTER ), ySrc, font, ColorTheme.form_text, GPC_REPLACE_STYLE )
		
#define Disp5X7CharGrey(grey, chr, xSrc, ySrc)\
		Mtempstr[0] = chr;				\
		Mtempstr[1] = '\0';				\
		TextOut(GetGC(), Mtempstr, xSrc, ySrc, ASCII_5X7_FONT, grey, GPC_REPLACE_STYLE)		

#define Disp8X16CharGrey(grey, chr, xSrc, ySrc)\
		Mtempstr[0] = chr;				\
		Mtempstr[1] = '\0';				\
		TextOut(GetGC(), Mtempstr, xSrc, ySrc, ASCII_8X16_FONT, grey, GPC_REPLACE_STYLE)


/*   if creat botton active area then creatActiveArea==TRUE
      only  disp button 	    creatActiveArea==FALSE;
   grey=WHITE,LIGHT_GREY,DARK_GREY,BLACK
   item is botton item;	
   if shadowLen<0 then no shadow
   		  else shadowSize=shadowLen+1;
   shadowLen must less tan 5
   the botton min size is 19+shadowLen dot		
*/      
extern void DrawTextBotton(char *string,U8 creatActiveArea,U8 grey,U32 *item,
		S16 xSrc,S16 ySrc,S16 xDest,S16 yDest,S8 shadowLen);


#endif

⌨️ 快捷键说明

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