码迷,mamicode.com
首页 > 其他好文 > 详细

电子书项目分析

时间:2014-10-20 23:05:32      阅读:433      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   ar   sp   div   on   art   log   

三个重要的结构体:

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;

 

电子书项目分析

标签:style   blog   color   ar   sp   div   on   art   log   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!