Three important struct:
1. t_dispopr
1 typedef struct dispopr {2 char * Name; 3 int ixres;/* x resolution */4 int iyres;/* Y Resolution */5 Int ibpp; /* BPP */6 int (* deviceinit) (void);/* Device initialization, set display parameters */7 int (* showpixel) (INT ipenx, int ipeny, unsigned int dwcolor);/* pixel display function */8 int (* cleanscreen) (unsigned int dwbackcolor);/* clear screen function */9 struct dispopr * ptnext; /* point to the next structure (linked list) */10} t_dispopr, * pt_dispopr;/* a struct, a struct pointer */
2. t_fontopr
1 typedef struct fontopr {2 char * Name; 3 int (* fontinit) (char * pcfontfile, unsigned int dwfontsize);/* font initialization */4 int (* getfontbitmap) (unsigned int dwcode, pt_fontbitmap ptfontbitmap);/* Get the font bitmap */5 struct fontopr * ptnext;/* point to the next struct (linked list) */6} t_fontopr, * pt_fontopr; /* a struct, a pointer to the struct */
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;
E-book Project Analysis