?? windows.h
字號:
struct BYTEREGS h;
};
struct SREGS {
unsigned int cs;
unsigned int ss;
unsigned int ds;
unsigned int es;
};
#define FP_SEG(fp) (*((unsigned *)&(fp) + 1))
#define FP_OFF(fp) (*((unsigned *)&(fp)))
struct RS {
int ax, bx, cx, dx, si, di, ds, es;
};
#endif /* End AZTEC DOS.H */
#define SAVE TRUE /* similar truth */
#define RESTORE FALSE /* fibs */
#define PAINT TRUE /* screen update modes */
#define FLASH FALSE /* ditto */
#define REPLACE 1 /* for flicker free */
#define ERASE 0 /* scroll w_sapd & w_sapu */
#define FAST 0x01 /* fast retrace */
#define SLOW 0x08 /* slow retrace */
#define NULPTR (char *) 0 /* null pointer */
#define NUL '\0' /* NUL char */
#define NVAL 0 /* null value - INTEGER */
#define ECHO 0x8000 /* echo disable bit */
#define BIOS 0x01 /* BIOS Scrolling */
#define DMAS 0x02 /* The BOSS's DMA Scrolling */
#define MO_LEFT 0 /* Mouse left button */
#define MO_RIGHT 1 /* Mouse right button */
#define MO_HDW 1 /* Mouse hardware */
#define MO_SFT 0 /* Mouse software */
#define WNTOPR 1 /* top rigth */
#define WNTOPL 2 /* top left */
#define WNTOPC 3 /* top center */
#define WNBOTR 4 /* bottom right */
#define WNBOTL 5 /* bottom left */
#define WNBOTC 6 /* bottom center */
/*
** The following 2 equates are needed by Lattice Ver 2.XX (which is
** no longer "officially" supported. Lattice Ver 2.XX users that need
** to work with larger Physical screens must change these constants here
** and in "windows.c". Other users can use the wns_ssiz() function. Refer
** to wn_sup.c for usage.
*/
#define WN_MXROWS 25 /* MAX PHYSICAL SCREEN */
#define WN_MXCOLS 80 /* MAX PHYSICAL SCREEN */
#define MAXIMAGES 10 /* MAX # of PUSH/POP IMAGES */
#define BCUL wns_bchars[0] /* some shorthand for later */
#define BCUR wns_bchars[1]
#define BCTB wns_bchars[2]
#define BCSD wns_bchars[3]
#define BCLL wns_bchars[4]
#define BCLR wns_bchars[5]
/*
** HELP System Stuff
*/
#define HLPMAXKY 255 /* ISAM file length (# of keys) */
#define HLPKEYLN 25 /* Maximum KEY length */
/*
** Misc Stuff
*/
#define WMR wn->bsize /* shorthand */
typedef struct wcb /* Window control block */
{
int ulx, /* upper left corner x coordinate */
uly, /* upper left corner y coordinate */
xsize, /* width of window - INSIDE dimension */
ysize, /* height of window -INSIDE dimension */
ccx, /* virtual cursor offset in window */
ccy,
style, /* attribute to be used in window */
bstyle, /* border attribute */
bsize; /* total border size 0 or 2 only */
char *scrnsave; /* pointer to screen save buffer */
int page, /* current video page being used */
oldx, /* cursor position when window was */
oldy, /* opened (used for screen restore) */
wrpflg, /* wrap flag */
synflg; /* cursor sync flag */
char *handle; /* my own id */
char *prevptr; /* linked list - previous */
char *nextptr; /* linked list - next */
unsigned tmpseg; /* for activate */
unsigned tmpoff; /* ditto */
int smeth; /* scroll method to use */
int shadow; /* shadow flag */
char *rshwin; /* right shadow WINDOWPTR */
char *bshwin; /* bottom shadow WINDOWPTR */
} WINDOW, *WINDOWPTR;
typedef struct mcb /* Mouse control block */
{
int exists, /* TRUE if MOUSE exists */
nbuts, /* number of buttons */
bstat, /* button status */
nclik, /* number of clicks */
col, /* position - column */
row, /* position - row */
hmove, /* net horizontal movement */
vmove; /* net vertical movement */
char *handle; /* my own id */
} MOUSE, *MOUSEPTR;
union wi_args { /* variable arg type union */
int vi; /* (int) */
int *vip; /* (int *) */
unsigned int vui; /* (unsigned int) */
unsigned int *vuip; /* (unsigned int *) */
char vc; /* (char) */
char *vcp; /* (char *) */
long vl; /* (long) */
long *vlp; /* (long *) */
unsigned long vul; /* (unsigned long) */
unsigned long *vulp; /* (unsigned long *) */
float vf; /* (float) */
float *vfp; /* (float *) */
double vd; /* (double) */
double *vdp; /* (double *) */
unsigned char *vuc; /* (unsiged char) */
unsigned char *vucp; /* (unsigned char *) */
} ;
typedef struct wi_scb { /* screen control block */
char *pself; /* pointer to myself */
int fcode; /* input funtion code */
WINDOWPTR wn; /* the window */
int row; /* window (wn) location - row */
int col; /* window (wn) location - col */
char *prmpt; /* prompt string for field */
unsigned int atrib; /* input field attribute */
char fill; /* input field fill character */
union wi_args v1; /* whatever */
union wi_args v2; /* whatever */
union wi_args v3; /* whatever */
union wi_args v4; /* whatever */
union wi_args v5; /* whatever */
union wi_args v6; /* whatever */
union wi_args v7; /* whatever */
union wi_args v8; /* whatever */
} WIFLD, *WIFLDPTR, **WIFORM;
struct mitem { /* POPUP menu item template */
int r; /* row */
int c; /* col */
char *t; /* text */
int rv; /* return value */
};
struct pmenu { /* POPUP menu structure */
WINDOWPTR wpsave; /* place to hold window id */
int winopn; /* leave window open flag */
int lndx; /* last index */
int fm; /* first menu item index */
int lm; /* last menu item index */
struct mitem scrn[WN_MXROWS*4]; /* a bunch of menu items */
}; /* NOTE RELATIVE LIMIT */
#if MSCV3 | MSCV4 | BORLAND | DLC | LC3 /* allow for LINT_ARGS */
#ifndef GENFNS
#include "windows.fns" /* enforce type checking */
#endif
#else /* and almost lint args */
struct wcb *wn_open();
struct wcb *wn_move();
struct wcb *wn_save();
struct mcb *mo_reset();
char *wn_gets();
char *wn_sleftj();
char *wn_srightj();
char *wn_scenter();
char *wn_sdelspc();
struct wcb *wn_save();
struct wi_scb * *wn_frmopn();
unsigned int wns_mtype();
#endif
#define BLACK 0x00 /* foreground */
#define RED 0x04 /* background */
#define GREEN 0x02 /* colors */
#define YELLOW 0x06 /* bg << 4 | fg */
#define BLUE 0x01
#define MAGENTA 0x05
#define CYAN 0x03
#define WHITE 0x07
#define BLINK 0x80
#define BOLD 0x08
#define NDISPB 0x00 /* non display black */
#define NDISPW 0x77 /* non display white */
#define RVIDEO 0x70 /* reverse video */
#define UNLINE 0x01 /* under line (BLUE) */
#define NVIDEO 0x07 /* normal video */
#define NORMAL 0x03 /* cyan is normal for me */
/*
** Display Mode Atributes
*/
#define B4025 0 /* black & white 40 x 25 */
#define C4025 1 /* color 40 x 25 */
#define B8025 2 /* black & white 80 x 25 */
#define C8025 3 /* color 80 x 25 */
#define C320 4 /* color graphics 320 x 200 */
#define B320 5 /* black & white graphics */
#define HIRES 6 /* B&W hi res 640 * 200 */
#define MONO 7 /* monocrome 80 x 25 */
/*
** Macro to set attribute byte
*/
#define v_setatr(bg,fg,blink,bold) ((blink|(bg<<4))|(fg|bold))
#define v_setrev(atrib) ((atrib&0x88) | ((atrib>>4)&0x07) | ((atrib<<4)&0x70) )
/*
** Key Scan Scodes & Window Input Stuff
*/
#define LARROW 0x4b00 /* left arrow */
#define RARROW 0x4d00 /* right arrow */
#define DARROW 0x5000 /* down arrow */
#define UARROW 0x4800 /* up arrow */
#define HOME 0x4700 /* home key */
#define END 0x4f00 /* end key */
#define INS 0x5200 /* insert key */
#define DEL 0x5300 /* delete key */
#define PGUP 0x4900 /* pgup */
#define PGDN 0x5100 /* pgdn */
#define F1 0x3b00 /* F1 aka HELP */
#define HELP F1 /* same as F1 */
#define TAB 0x0f09 /* tab */
#define BKTAB 0x0f00 /* back (shift) tab */
#define RET 0x1c0d /* return */
#define SPACE 0x3920 /* space */
#define ESCAPE 0x011b /* escape */
/*
** Character codes (non scan codes)
*/
#define BELL 0x07 /* ring a ding */
#define BS 0x08 /* backspace */
#define ESC 0x1b /* Escape */
#define CR 0x0d /* carriage return */
#define LF 0x0a /* linefeed */
#define RUB 0x7f /* delete */
#define NAK 0x15 /* ^U */
#define ETX 0x03 /* ^C */
#define CAN 0x18 /* ^X */
/*
** Special Cases
*/
#define Del 0x53 /* Del key scan code >> 8 */
#define ESC_CODE -2 /* return code: ESCAPE - ESC.001 */
/* 0 to 100 are reserved!! */
#define GDONE 0 /* end of list */
#define GDATE 10 /* wn_gdate */
#define GTIME 11 /* wn_gtime */
#define GINT 12 /* wn_gint */
#define GUINT 13 /* wn_guint */
#define GLONG 14 /* wn_glong */
#define GFLOAT 15 /* wn_gfloat */
#define GPHONE 16 /* wn_gphone */
#define GTEXT 17 /* wn_gtext */
#define GBOOL 18 /* wn_gbool */
#define DTEXT 19 /* Display text only */
#define GPWORD 20 /* wn_gpword */
#define GULONG 21 /* wn_gulong */
#define GDOUBL 22 /* wn_gdouble */
#define GUTEXT 23 /* wn_gutext */
#define GLTEXT 24 /* wn_gltext */
#define GATEXT 25 /* wn_gatext */
/* from above to 100 are reserved!! */
#define NSTR "" /* null string */
#define NFRM (WIFORM)(0) /* null form pointer */
#define NFLD 0 /* must be int 0 */
#define SET 1 /* form setup */
#define XEQ 2 /* immediate execution */
#define MAXSTR 80 /* max size - wn_gtext, wn_input */
#define WNLPTR (WINDOWPTR) 0 /* A TRUE NULL WINDOW POINTER */
#define MOLPTR (MOUSEPTR) 0 /* A TRUE NULL MOUSE POINTER */
/*
** FAR MEMORY MACROS
*/
#if MSCV3 | MSCV4
#define FPSEG(fp) (*((unsigned *)&(fp) + 1))
#define FPOFF(fp) (*((unsigned *)&(fp)))
#endif
#if DLC
#define FPOFF(fp) ((unsigned) ((char *)(fp) - (char *)0))
#define FPSEG(fp) (((unsigned *) (&(fp)))[1])
#endif
#if BORLAND
#define FPOFF(fp) ((unsigned)(fp))
#define FPSEG(fp) ((unsigned)((unsigned long)(fp) >> 16))
#endif
#if LC3
#define FPOFF(fp) (unsigned)FP_OFF( (char far *) fp)
#define FPSEG(fp) (unsigned)FP_SEG( (char far *) fp)
#endif
#if CI86
unsigned wns_off();
unsigned wns_seg();
unsigned long wns_gticks();
#define intdos sysint21
#define int86 sysint
#define int86x sysint
#define FPOFF(fp) (unsigned)wns_off(fp)
#define FPSEG(fp) (unsigned)wns_seg(fp)
#endif
#if LC2
#define FPOFF(fp) wns_off(fp)
#define FPSEG(fp) wns_seg(fp)
#endif
#ifndef N1ADE
#include "windows.ext" /* load externals */
#endif
#define WNBDEBUG FALSE /* disable debugging */
/* End */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -