dspl.h

来自「是一个手机功能的模拟程序」· C头文件 代码 · 共 401 行 · 第 1/2 页

H
401
字号
//08/09/2002  zhonghz, add  set_font_type() and some others functions, can display multi-font
//08/01/2002  zy add dspl_colorTextOut() function could dspl txt out in special color
//07/16/2002  zhangzg modified the raster operation of bmp				
//6.19 chenjun add a function dspl_set_pen_size();
//6.13,chenjun &zym change
/*
+--------------------------------------------------------------------+
| PROJECT: GSM (6103)                   $Workfile:: dspl.h          $|
| $Author: jhxu $Revision: 1.3 $|
| CREATED: 07.10.98                     $Modtime:: 20.04.99 16:18   $|
| STATE  : code                                                      |
+--------------------------------------------------------------------+

    PURPOSE :  Types definitions for the display driver
    .
*/
/****************************************************************
history:
 data                 modification
 04/08/02            zy eastcom remove the colormanagement functions



******************************************************************/

#ifndef DSPL_H
#define DSPL_H


#if (MAIN_LCD_SIZE==3)
//#define FONT_12X12	0
#define FONT_16X16	1
#elif (MAIN_LCD_SIZE==4)
#define FONT_16X16	1
#endif

#if defined FONT_12X12
	#define	UNI_FONT_HEIGHT		12
	#define	UNI_0_127_WIDTH		6
	#define	UNI_0_127_BMPSIZE	12
	#define	UNI_SYM_WIDTH		12
	#define	UNI_SYM_BMPSIZE		24
	#define	UNI_CJK_WIDTH		12	/* 2004/04/06 sunsj modify */
	#define	UNI_CJK_BMPSIZE		24
#elif defined FONT_16X16
	#define	UNI_FONT_HEIGHT		16
	#define	UNI_0_127_WIDTH		8
	#define	UNI_0_127_BMPSIZE	16
	#define	UNI_SYM_WIDTH		16
	#define	UNI_SYM_BMPSIZE		32
	#define	UNI_CJK_WIDTH		16
	#define	UNI_CJK_BMPSIZE		32
#endif

#define	UNI_CJK_FIRST_CHAR	0x4e00
#define	UNI_CJK_LAST_CHAR	0x9fa5

#define  MAXROW 9

#ifdef _INNOVATION_EMULATOR_
#ifdef MAXCHAR
#undef MAXCHAR
#endif
#define  MAXCHAR 15
#endif

#define  NEWLINE 0x0a

/*
 *   Device Capabilities data Type
 */
typedef struct dspl_DevCaps
{
  UBYTE    DisplayType;
  USHORT   Width;
  USHORT   Height;
} dspl_DevCaps;

/*
 * Display Types
 */
#define    DSPL_TYPE_CHARACTER    0
#define    DSPL_TYPE_GRAPHIC      1
#define    DSPL_TYPE_COLOR        2

/*
 * Character Types
 */

#define    DSPL_TYPE_ASCII         1
#define    DSPL_TYPE_UNICODE      2
#define    DSPL_TYPE_ASCII_12_6    3

/*Font Types,Added by zhonghz, eastcom ,08/01/2002 */
#define    NORMAL_FONT         		1//normal font is 16x16 unicode and 8x16 ascii
#define    UNI12X12_FONT			2//12x12 unicode font
#define    UNI24X24_FONT			3//24x24 unicode font
#define	  ASC10X16_FONT				4//10x16 ascii font, dialing number:0~9,*,+,#,P,ect.
#define	  CHNINPUT_FONT				5//for zhangxp's chinese input.
#define    YB8X16_FONT				6//8x16 ascii yinbiao font, hxl add
#define    SMALL_FONT				7	/* 2004/03/08 sunsj add */

/*
 * Display Text Attributes
 */
#define    DSPL_TXTATTR_NORMAL    			0x00
#define    DSPL_TXTATTR_INVERS    			0x01
#define    DSPL_TXTATTR_UNICODE				0x02	
#define	  DSPL_TXTATTR_CURRENT_MODE			0x04	/*Represents the string in the current display mode,unicode or ASCII*/
#define	  DSPL_TXTATTR_SIGNED_COORDS		0x08	/*SH - if this is set, coordinates can have negative numbers*/
#define    DSPL_TXTATTR_TRANSPARENT      0x10      //zhangzg 07/03/2002
#define    DSPL_TXTATTR_WHITE_EDGE       0x20      //zhanghz, display white edge,2002/9/11
#define    DSPL_TXTATTR_ASCIIMODE			0x40
#define    DSPL_TXTATTR_UNIMODE				0x80
/* Cursor Types
 */
#define    DSPL_FBOX_CURSOR_TYPE  1
#define    DSPL_OBOX_CURSOR_TYPE  2
#define    DSPL_TLIN_CURSOR_TYPE  3
#define    DSPL_BLIN_CURSOR_TYPE  4

#define    DSPL_SLOWFLASH_MODE    1
#define    DSPL_FASTFLASH_MODE    2
#define    DSPL_STATIC_MODE       3

#define    DSPL_CURSOR_VISIBLE    1
#define    DSPL_CURSOR_INVISIBLE  0
/*
 * Raster Operations
 */
 //zhangzg  07/16/2002
#define    DSPL_BMPCOPY           0
#define    DSPL_BMPOR				1
#define    DSPL_BMPAND            2
#define    DSPL_BMPXOR			   3
#define    DSPL_BMPNOTCOPY       4
#define    DSPL_BMPNOTOR         5
#define    DSPL_BMPNOTAND        6
#define    DSPL_BMPALPHA         7
#define    DSPL_BMPINVERT         8

/*define color*/
/*zhonghz, 2002/9/11*/
#define	CWHITE			0xffffff
#define	CBLACK			0x000000
#define	CRED			0xff0000
#define	CGREEN			0x00ff00
#define	CBLUE			0x0000ff

/*
 * Return Values
 */
#define    DSPL_FCT_NOTSUPPORTED  1

#if defined (NEW_FRAME)
/*
 * to achieve backward compatibility with older definitions
 */
#define drv_SignalCB_Type           T_DRV_CB_FUNC
#define drv_SignalID_Type           T_DRV_SIGNAL
#define T_VSI_THANDLE               USHORT
#endif

/*
 * Prototypes
 */

EXTERN UBYTE    dspl_Init                (void);
EXTERN void     dspl_Exit                (void);
EXTERN UBYTE    dspl_Clear               (USHORT              in_X1,
                                          USHORT              in_Y1,
                                          USHORT              in_X2,
                                          USHORT              in_Y2);

EXTERN UBYTE    dspl_ClearAll            (void);
EXTERN UBYTE    dspl_Enable              (UBYTE               in_Enable);
EXTERN void     dspl_GetDeviceCaps       (dspl_DevCaps      * out_DeviceCapsPtr);
EXTERN void     dspl_SetDeviceCaps       (dspl_DevCaps      * in_DeviceCapsPtr);
EXTERN UBYTE    dspl_GetIconImage        (UBYTE               in_Icon,
                                          USHORT              in_Size,
                                          UBYTE             * out_IconImagePtr);
EXTERN UBYTE    dspl_SetCursor           (UBYTE               in_CursorType,
                                          UBYTE               in_CursorMode);
EXTERN UBYTE	dspl_SetCursorPos		 (USHORT			  in_X,
										  USHORT			  in_Y,
										  USHORT			  in_SizeX,
										  USHORT			  in_SizeY);//GW 05/09/01
EXTERN UBYTE    dspl_ShowCursor          (UBYTE               in_Show);
EXTERN UINT32   dspl_SetBkgColor         (UINT32              in_Color);
EXTERN UINT32   dspl_SetFrgColor         (UINT32              in_Color);

//following prototype added by chenjun
EXTERN UINT32   dspl_GetFrgColor(void); //chenjun add 0603 for st
EXTERN UINT32   dspl_GetBkgColor(void); //chenjun add 0603 for st
EXTERN UBYTE    dspl_DrawCircle (USHORT x,USHORT y,USHORT r);
EXTERN UBYTE    dspl_DrawPoint (int px, int py);
EXTERN UBYTE    dspl_fill_Circle (USHORT x,USHORT y,USHORT r);
EXTERN UINT16  dspl_set_pen_size(UINT16 the_size);
EXTERN UBYTE       dspl_SetTextMode(void);//chenjun:set the bkg to white,frg black
//chenjun add till here
EXTERN UBYTE    dspl_DrawIcon            (UBYTE               in_IconID,

⌨️ 快捷键说明

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