以下代码在dos/turbo_C2.0编译通过,并使用良好,只是没有注释,
我也忘了,根据函数名猜吧。
/* popup.h */
#define Ctrwin 9999
typedef struct texel_struct {
unsigned char ch;
unsigned char attr;
} texel;
typedef struct wincolors_struct {
char border_type;
unsigned char border_color,text_color;
unsigned char title_color,hilite_color;
} wincolors;
enum windowtype {popup,tile};
typedef struct winstruct {
char *name;
void *image;
struct winstruct *under,*over;
wincolors wc;
char xul,yul,xlr,ylr,wd,ht;
char xsave,ysave;
enum windowtype wtype;
} windesc;
extern windesc *base_win;
extern windesc *curr_win;
extern wincolors defcolors;
extern wincolors invcolors;
extern wincolors monocolors;
extern wincolors errcolors;
extern wincolors msgcolors;
#define rmv_win(w) view_win(w,0)
#define slct_win(w) view_win(w,1)
extern void init_win(void);
extern windesc *draw_win (int x,int y,int wd,int ht,char *title,
enum windowtype wt,wincolors *ws);
extern void view_win(windesc *this,int move_to_top);
extern void clr_win(void);
extern void draw_box(int xul,int yul,int xlr,int ylr,int btype,int attr);
extern void centerstr(int xul,int yul,int xlr,int ylr,char *s,unsigned char a);
extern void mprintf(char *fmt,...);
extern void prtfstr(int x,int y,char *fmt,unsigned char attr,int wd,...);
extern void swap_image(windesc *w);
#define Swrnf 0,1,__Line__,__File__
#define Serrf 0,2,__Line__,__File__
#define Smsgf 0,0,__Line__,__File__
#define Fwrnf 1,1,__Line__,__File__
#define Ferrf 1,2,__Line__,__File__
#define Fmsgf 1,0,__Line__,__File__
#define Swrn 0,1,0,""
#define Serr 0,2,0,""
#define Smsg 0,0,0,""
#define Fwrn 1,1,0,""
#define Ferr 1,2,0,""
#define Fmsg 1,0,0,""
extern int errx;
extern int erry;
extern windesc *errw;
extern int msgx;
extern int msgy;
extern windesc *msgw;
extern void numnewlines(char *s,int *n,int *w);
extern void popmsg(int x,int y,char *msg,char *title,
char soundout,wincolors *wc);
extern void reperr(int level,char *msg);
extern void repmsg(char *msg);
extern void sayerr(int ferr,int errflag,int lno,
char *pname,char *fmt,...);
extern void beep(void);
extern unsigned int getkey(void);
阅读(642) | 评论(0) | 转发(0) |