home *** CD-ROM | disk | FTP | other *** search
- /*
- * bi_def.h - Buzzwords Interface Define Header File.
- *
- */
-
- #if !defined(PCMS_DOS)
- #define PCMS_DOS 1 /* PC/MS-DOS operating system */
- #endif
-
- #if !defined(UNIX_XNX)
- #undef UNIX_XNX /* Unix/Xenix operating system */
- #endif
-
- #if defined(UNIX_XNX) || defined(LATTICE)
- #undef CURSES /* Use Curses ? */
- #else
- #undef CURSES /* Lattice C tries to use CURSES */
- #endif
-
- #define BI_OK 1 /* success return code */
- #define BI_ERR -1 /* error return code */
- #define BI_NOSEL -2 /* no menu selection made */
-
- #define BI_MXGETS 128 /* maximum number of GETS at one time */
-
- #if defined(PCMS_DOS)
- #define BI_MSGRW 24 /* row number for menu/bar messages */
- #else
- #define BI_MSGRW 23 /* row number for menu/bar messages */
- #endif
-
- #if !defined(FALSE) && !defined(CURSES)
- #define FALSE 0
- #define TRUE (!FALSE)
- #endif
-
- #if !defined(NO)
- #define NO 0
- #define YES (!NO)
- #endif
-
- #if defined(LATTICE)
- #define stdprn stdprt
- #endif
-
- #define BI_PROD "Buzzwords Video Interface"
-
- struct bi_bars /* bar, single item on a menu */
- {
- char *txt ; /* Bar prompt */
- char *msg ; /* Bar message */
- char *qkeys ; /* quick keys to select bar */
- int status ; /* status, ie. selectable */
- int type ; /* type (e.g. BAR_ONFF, BAR_NUMB...) */
- void *value ; /* bar value, use with BAR_xxxx */
- int retval ; /* return value, use with: BAR_OTHR */
- } ;
-
- struct bi_menus /* menu definition */
- {
- struct bi_bars **bars ; /* bar info */
- int fy, fx, ty, tx ; /* coordinates */
- char *qkeys ; /* quick keys to select menu */
- char *title ; /* menu title, used with pull down title bar */
- int normal ; /* normal bar color */
- int hilite ; /* hilite bar color */
- int firstc ; /* first non-blank character color */
- int border ; /* border color (0x00 == no border) */
- int shadow ; /* shadow color (0x00 == no shadow) */
- int msgrow ; /* row for optional message */
- int msgclr ; /* color for optional message */
- int offset ; /* index of top (1st) bar to display */
- int actbar ; /* index of active bar */
- int button ; /* button style menus ? */
- int ptrs[4] ; /* active bar pointer information */
- /* ptrs[0] = left char, 0 == no left pointer */
- /* ptrs[1] = left color */
- /* ptrs[2] = right char 0 == no right pointer */
- /* ptrs[3] = right color */
- char *save ; /* internal use only */
- } ;
-
- struct bi_pulls /* pull down menu definition */
- {
- struct bi_menus **menus ; /* menus for this pull down */
- int fy, fx, tx ; /* pull down bar coordinates */
- int confirm ; /* must press enter key to display menu ? */
- int exitesc ; /* exit if escape key is pressed ? */
- int normal ; /* normal bar color */
- int hilite ; /* hilite bar color */
- int firstc ; /* first non-blank character color */
- int actmenu ; /* index of active menu */
- int rghtlast ; /* right justify last pad ? */
- char *msg ; /* optional message */
- int msgrow ; /* row for optional message */
- int msgcol ; /* column for option message */
- int msgclr ; /* color for optional message */
- } ;
-
- #define BAR_SELE 1 /* bar is selectable */
- #define BAR_NOSE 2 /* bar is not selectable */
-
- #define BAR_ONFF 1 /* bar is an on/off bar */
- #define BAR_NUMB 2 /* bar is a number bar */
- #define BAR_OTHR 3 /* bar should return when selected */
- #define BAR_YESN 4 /* bar is a yes/no bar */
- #define BAR_CHAR 5 /* bar is a 1-character bar */
- #define BAR_MENU 6 /* bar should select another menu */
- #define BAR_SET1 7 /* bar is a user defined set */
- #define BAR_SET2 8 /* bar is a user defined set */
- #define BAR_SET3 9 /* bar is a user defined set */
- #define BAR_SET4 10 /* bar is a user defined set */
- #define BAR_SET5 11 /* bar is a user defined set */
- #define BAR_SET6 12 /* bar is a user defined set */
- #define BAR_SET7 13 /* bar is a user defined set */
- #define BAR_SET8 14 /* bar is a user defined set */
- #define BAR_SET9 15 /* bar is a user defined set */
- #define BAR_SET0 16 /* bar is a user defined set */
- #define BAR_LINE 17 /* bar is a horizontal line */
- #define BAR_VTXT 18 /* bar is a variable text line */
-
- #define BI_CLEAR 1 /* clear screen on exit */
- #define BI_RESTR 2 /* restore previous contents on exit */
- #define BI_LEAVE 3 /* leave menu on screen on exit */
- #define BI_RFRSH 4 /* refresh menu, but do not get input */
-
- #define KEY_CTRA 0x0001
- #define KEY_CTRB 0x0002
- #define KEY_CTRC 0x0003 /* control - C */
- #define KEY_CTRD 0x0004
- #define KEY_CTRE 0x0005
- #define KEY_CTRF 0x0006
- #define KEY_CTRG 0x0007
- #define KEY_CTRH 0x0008
- #define KEY_BS 0x0008 /* back space key */
- #define KEY_CTRI 0x0009
- #define KEY_CTRJ 0x000A
- #define KEY_CTRK 0x000B
- #define KEY_CTRL 0x000C
- #define KEY_ENTR 0x000D /* enter key */
- #define KEY_CTRM 0x000D
- #define KEY_CTRN 0x000E
- #define KEY_CTRO 0x000F
- #define KEY_CTRP 0x0010
- #define KEY_CTRQ 0x0011 /* control - Q */
- #define KEY_CTRR 0x0012
- #define KEY_CTRS 0x0013
- #define KEY_CTRT 0x0014
- #define KEY_CTRU 0x0015
- #define KEY_CTRV 0x0016
- #define KEY_CTRW 0x0017 /* control - W */
- #define KEY_CTRX 0x0018
- #define KEY_CTRY 0x0019
- #define KEY_CTRZ 0x001A
- #define KEY_ESC 0x001B /* Escape key */
- #define KEY_SPAC 0x0020 /* Space bar */
- #if defined(CURSES)
- #define KEY_F1 KEY_F(1)
- #define KEY_F2 KEY_F(2)
- #define KEY_F3 KEY_F(3)
- #define KEY_F4 KEY_F(4)
- #define KEY_F5 KEY_F(5)
- #define KEY_F6 KEY_F(6)
- #define KEY_F7 KEY_F(7)
- #define KEY_F8 KEY_F(8)
- #define KEY_F9 KEY_F(9)
- #define KEY_F10 KEY_F(10)
- #define KEY_F11 KEY_F(11)
- #define KEY_F12 KEY_F(12)
- #define KEY_SF1 KEY_F(13)
- #define KEY_SF2 KEY_F(14)
- #define KEY_SF3 KEY_F(15)
- #define KEY_SF4 KEY_F(16)
- #define KEY_SF5 KEY_F(17)
- #define KEY_SF6 KEY_F(18)
- #define KEY_SF7 KEY_F(19)
- #define KEY_SF8 KEY_F(20)
- #define KEY_SF9 KEY_F(21)
- #define KEY_SF10 KEY_F(22)
- #define KEY_SF11 KEY_F(23)
- #define KEY_SF12 KEY_F(24)
- #define KEY_CTBR KEY_BREAK /* Control Break */
- #define KEY_AF1 0x68+256 /* Alt-Function Key F1 */
- #define KEY_AF2 0x69+256 /* Alt-Function Key F2 */
- #define KEY_AF3 0x6A+256 /* Alt-Function Key F3 */
- #define KEY_AF4 0x6B+256 /* Alt-Function Key F4 */
- #define KEY_AF5 0x6C+256 /* Alt-Function Key F5 */
- #define KEY_AF6 0x6D+256 /* Alt-Function Key F6 */
- #define KEY_AF7 0x6E+256 /* Alt-Function Key F7 */
- #define KEY_AF8 0x6F+256 /* Alt-Function Key F8 */
- #define KEY_AF9 0x70+256 /* Alt-Function Key F9 */
- #define KEY_AF10 0x71+256 /* Alt-Function Key F10 */
- #define KEY_AF11 0x8B+256 /* Alt-Function Key F11 (AT Keyboard only) */
- #define KEY_AF12 0x8C+256 /* Alt-Function Key F12 (AT Keyboard only) */
- #define KEY_CF1 0x5E+256 /* Control-Function Key F1 */
- #define KEY_CF2 0x5F+256 /* Control-Function Key F2 */
- #define KEY_CF3 0x60+256 /* Control-Function Key F3 */
- #define KEY_CF4 0x61+256 /* Control-Function Key F4 */
- #define KEY_CF5 0x62+256 /* Control-Function Key F5 */
- #define KEY_CF6 0x63+256 /* Control-Function Key F6 */
- #define KEY_CF7 0x64+256 /* Control-Function Key F7 */
- #define KEY_CF8 0x65+256 /* Control-Function Key F8 */
- #define KEY_CF9 0x66+256 /* Control-Function Key F9 */
- #define KEY_CF10 0x67+256 /* Control-Function Key F10 */
- #define KEY_CF11 0x89+256 /* Control-Function Key F11 (AT Keyboard only) */
- #define KEY_CF12 0x8A+256 /* Control-Function Key F12 (AT Keyboard only) */
- #define KEY_HOM KEY_HOME /* Home key */
- #define KEY_PGUP KEY_PPAGE /* Page up key */
- #define KEY_RGHT KEY_RIGHT /* right arrow key */
- #define KEY_END KEY_C1 /* End key */
- #define KEY_PGDW KEY_NPAGE /* Page down key */
- #define KEY_INS KEY_IC /* Insert key */
- #define KEY_DEL KEY_DC /* Delete key */
- #define BEEP 0x07 /* bell, control-G */
- #define KEY_CHOM 0x77+256 /* control home */
- #define KEY_CEND 0x75+256 /* control end */
- #define KEY_CRIG 0x74+256 /* control right */
- #define KEY_CLEF 0x73+256 /* control left */
- #else
- #define KEY_CTBR 0x00+256 /* Control Break */
- #define KEY_F1 0x3B+256 /* Function Key F1 */
- #define KEY_F2 0x3C+256 /* Function Key F2 */
- #define KEY_F3 0x3D+256 /* Function Key F3 */
- #define KEY_F4 0x3E+256 /* Function Key F4 */
- #define KEY_F5 0x3F+256 /* Function Key F5 */
- #define KEY_F6 0x40+256 /* Function Key F6 */
- #define KEY_F7 0x41+256 /* Function Key F7 */
- #define KEY_F8 0x42+256 /* Function Key F8 */
- #define KEY_F9 0x43+256 /* Function Key F9 */
- #define KEY_F10 0x44+256 /* Function Key F10 */
- #define KEY_F11 0x85+256 /* Function Key F11 (AT Keyboard only) */
- #define KEY_F12 0x86+256 /* Function Key F12 (AT Keyboard only) */
- #define KEY_SF1 0x54+256 /* Shift-Function Key F1 */
- #define KEY_SF2 0x55+256 /* Shift-Function Key F2 */
- #define KEY_SF3 0x56+256 /* Shift-Function Key F3 */
- #define KEY_SF4 0x57+256 /* Shift-Function Key F4 */
- #define KEY_SF5 0x58+256 /* Shift-Function Key F5 */
- #define KEY_SF6 0x59+256 /* Shift-Function Key F6 */
- #define KEY_SF7 0x5A+256 /* Shift-Function Key F7 */
- #define KEY_SF8 0x5B+256 /* Shift-Function Key F8 */
- #define KEY_SF9 0x5C+256 /* Shift-Function Key F9 */
- #define KEY_SF10 0x5D+256 /* Shift-Function Key F10 */
- #define KEY_SF11 0x87+256 /* Shift-Function Key F11 (AT Keyboard only) */
- #define KEY_SF12 0x88+256 /* Shift-Function Key F12 (AT Keyboard only) */
- #define KEY_AF1 0x68+256 /* Alt-Function Key F1 */
- #define KEY_AF2 0x69+256 /* Alt-Function Key F2 */
- #define KEY_AF3 0x6A+256 /* Alt-Function Key F3 */
- #define KEY_AF4 0x6B+256 /* Alt-Function Key F4 */
- #define KEY_AF5 0x6C+256 /* Alt-Function Key F5 */
- #define KEY_AF6 0x6D+256 /* Alt-Function Key F6 */
- #define KEY_AF7 0x6E+256 /* Alt-Function Key F7 */
- #define KEY_AF8 0x6F+256 /* Alt-Function Key F8 */
- #define KEY_AF9 0x70+256 /* Alt-Function Key F9 */
- #define KEY_AF10 0x71+256 /* Alt-Function Key F10 */
- #define KEY_AF11 0x8B+256 /* Alt-Function Key F11 (AT Keyboard only) */
- #define KEY_AF12 0x8C+256 /* Alt-Function Key F12 (AT Keyboard only) */
- #define KEY_CF1 0x5E+256 /* Control-Function Key F1 */
- #define KEY_CF2 0x5F+256 /* Control-Function Key F2 */
- #define KEY_CF3 0x60+256 /* Control-Function Key F3 */
- #define KEY_CF4 0x61+256 /* Control-Function Key F4 */
- #define KEY_CF5 0x62+256 /* Control-Function Key F5 */
- #define KEY_CF6 0x63+256 /* Control-Function Key F6 */
- #define KEY_CF7 0x64+256 /* Control-Function Key F7 */
- #define KEY_CF8 0x65+256 /* Control-Function Key F8 */
- #define KEY_CF9 0x66+256 /* Control-Function Key F9 */
- #define KEY_CF10 0x67+256 /* Control-Function Key F10 */
- #define KEY_CF11 0x89+256 /* Control-Function Key F11 (AT Keyboard only) */
- #define KEY_CF12 0x8A+256 /* Control-Function Key F12 (AT Keyboard only) */
- #define KEY_HOM 0x47+256 /* Home key */
- #define KEY_UP 0x48+256 /* Up key */
- #define KEY_PGUP 0x49+256 /* Page up key */
- #define KEY_LEFT 0x4B+256 /* left arrow key */
- #define KEY_RGHT 0x4D+256 /* right arrow key */
- #define KEY_END 0x4F+256 /* End key */
- #define KEY_DOWN 0x50+256 /* Down key */
- #define KEY_PGDW 0x51+256 /* Page down key */
- #define KEY_INS 0x52+256 /* Insert key */
- #define KEY_DEL 0x53+256 /* Delete key */
- #define BEEP 0x07 /* bell, control-G */
- #define KEY_CHOM 0x77+256 /* control home */
- #define KEY_CEND 0x75+256 /* control end */
- #define KEY_CRIG 0x74+256 /* control right */
- #define KEY_CLEF 0x73+256 /* control left */
- #endif
-
- #if defined(PCMS_DOS)
- #define GRS_UL "\311" /* graphics, upper left corner */
- #define GRS_HORZ "\315" /* graphics, horizontal line */
- #define GRS_VERT "\272" /* graphics, vertical line */
- #define GRS_UR "\273" /* graphics, upper right corner */
- #define GRS_LR "\274" /* graphics, lower right corner */
- #define GRS_LL "\310" /* graphics, lower left corner */
- #define GRS_LT "\314" /* graphics, left tee */
- #define GRC_UL 201 /* graphics, upper left corner */
- #define GRC_HORZ 205 /* graphics, horizontal line */
- #define GRC_VERT 186 /* graphics, vertical line */
- #define GRC_UR 187 /* graphics, upper right corner */
- #define GRC_LR 188 /* graphics, lower right corner */
- #define GRC_LL 200 /* graphics, lower left corner */
- #define GRC_LT 204 /* graphics, left tee */
- #endif
- #if defined(UNIX_XNX)
- #define GRC_UL '+' /* graphics, upper left corner */
- #define GRC_HORZ '-' /* graphics, horizontal line */
- #define GRC_VERT '|' /* graphics, vertical line */
- #define GRC_UR '+' /* graphics, upper right corner */
- #define GRC_LR '+' /* graphics, lower right corner */
- #define GRC_LL '+' /* graphics, lower left corner */
- #define GRC_LT '+' /* graphics, left tee */
- #endif
-
- #define PICHARS "!#9ALNXYCMD" /* get() picture characters */
-
- #define BI_NORM 0x0F /* Unix / Xenix normal color for display */
- #define BI_HILI 0x70 /* Unix / Xenix stand-out color for display */
-
- struct bi_gets /* get structure */
- {
- int y ; /* row number */
- int x ; /* column number */
- int color ; /* color */
- char *str ; /* pointer to data */
- char *pic ; /* picture string */
- } ;
-
- #define BI_GETST 0
- #define BI_GETNU 1
- #define BI_GETDA 2
- #define BI_GETLO 3
-
-
-
-