首页 > 其他 > 详细

电子书项目分析

时间:2014-10-20 23:04:40      阅读:347      评论:0      收藏:0      [点我收藏+]

三个重要的结构体:

1.T_DispOpr

 1 typedef struct DispOpr {
 2     char *name;
 3     int iXres;  /* X分辨率 */
 4     int iYres;  /* Y分辨率 */
 5     int iBpp;   /* BPP */
 6     int (*DeviceInit)(void);   /* 设备初始化,设置显示器的相关参数 */
 7     int (*ShowPixel)(int iPenX, int iPenY, unsigned int dwColor);/* 像素显示函数 */
 8     int (*CleanScreen)(unsigned int dwBackColor);/* 清屏幕函数 */
 9     struct DispOpr *ptNext;/* 指向下一个结构 (链表)*/
10 }T_DispOpr, *PT_DispOpr;/* 一个结构体,一个结构体指针 */

2.T_FontOpr

1 typedef struct FontOpr {
2     char *name;
3     int (*FontInit)(char *pcFontFile, unsigned int dwFontSize);/* 字体初始化 */
4     int (*GetFontBitmap)(unsigned int dwCode, PT_FontBitMap ptFontBitMap);/* 获得字体的位图 */
5     struct FontOpr *ptNext;/* 指向下一个结构体(链表) */
6 }T_FontOpr, *PT_FontOpr;/* 一个结构体,一个指向结构体的指针 */

3.T_EncodingOpr

1 typedef struct EncodingOpr {
2     char *name;
3     int iHeadLen;
4     PT_FontOpr ptFontOprSupportedHead;
5     int (*isSupport)(unsigned char *pucBufHead);
6     int (*GetCodeFrmBuf)(unsigned char *pucBufStart, unsigned char *pucBufEnd, unsigned int *pdwCode);
7     struct EncodingOpr *ptNext;
8 }T_EncodingOpr, *PT_EncodingOpr;

 

电子书项目分析

原文:http://www.cnblogs.com/chrispauls/p/4038706.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!