1 /* SCCS Id: @(#)winami.h 3.4 1993/01/17 */
2 /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1991. */
3 /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1992, 1993. */
4 /* NetHack may be freely redistributed. See license for details. */
12 * Information specific to a menu window. First a structure for each
13 * menu entry, then the structure for each menu window.
15 typedef struct amii_mi {
17 anything identifier; /* Opaque type to identify this selection */
18 long glyph; /* Glyph for menu item */
19 long count; /* Object count */
20 char selected; /* Been selected? */
21 char selector; /* Char used to select this entry. */
22 char gselector; /* Group selector */
23 char canselect; /* Can user select this entry. */
24 char attr; /* Attribute for the line. */
25 char *str; /* The text of the item. */
30 amii_menu_item *items; /* Starting pointer for item list. */
31 amii_menu_item *last; /* End pointer for item list. */
32 const char *query; /* Query string */
33 int count; /* Number of strings. */
34 char chr; /* Character to assign for accelerator */
37 /* descriptor for Amiga Intuition-based windows. If we decide to cope with
38 * tty-style windows also, then things will need to change. */
41 xchar type; /* type of window */
42 struct amii_menu menu;
43 boolean active; /* true if window is active */
44 boolean wasup; /* true if menu/text window was already open */
45 short disprows; /* Rows displayed so far (used for paging in message win) */
46 xchar offx, offy; /* offset from topleft of display */
47 short vwx, vwy, vcx, vcy; /* View cursor location */
48 short rows, cols; /* dimensions */
49 short curx, cury; /* current cursor position */
50 short maxrow, maxcol; /* the maximum size used -- for INVEN wins */
51 /* maxcol is also used by WIN_MESSAGE for */
52 /* tracking the ^P command */
53 char **data; /* window data [row][column] */
54 menu_item *mi; /* Menu information */
55 char *resp; /* valid menu responses (for NHW_INVEN) */
56 char *canresp; /* cancel responses; 1st is the return value */
57 char *morestr; /* string to display instead of default */
59 struct Window *win; /* Intuition window pointer */
61 struct ExtNewWindow *newwin; /* NewWindow alloc'd */
63 struct NewWindow *newwin; /* ExtNewWindow alloc'd */
66 struct TagItem wintags[ MAXWINTAGS ];/* Tag items for this window */
68 long wintags[ MAXWINTAGS*2 ];
70 void *hook; /* Hook structure pointer for tiles version */
71 #define FLMAP_INGLYPH 1 /* An NHW_MAP window is in glyph mode */
72 #define FLMAP_CURSUP 2 /* An NHW_MAP window has the cursor displayed */
74 #define FLMSG_FIRST 1 /* First message in the NHW_MESSAGE window for this turn */
76 short cursx, cursy; /* Where the cursor is displayed at */
77 short curs_apen, /* Color cursor is displayed in */
81 /* descriptor for intuition-based displays -- all the per-display data */
82 /* this is a generic thing - think of it as Screen level */
84 struct amii_DisplayDesc {
85 /* we need this for Screen size (which will vary with display mode) */
86 uchar rows, cols; /* width & height of display in text units */
87 short xpix, ypix; /* width and height of display in pixels */
88 int toplin; /* flag for topl stuff */
89 int rawprint; /* number of raw_printed lines since synch */
90 winid lastwin; /* last window used for I/O */
94 WEUNK, WEKEY, WEMOUSE, WEMENU,
110 #define MAXWIN 20 /* maximum number of windows, cop-out */
112 /* port specific variable declarations */
113 extern winid WIN_BASE;
114 extern winid WIN_OVER;
116 #define NHW_OVER 7 /* overview window */
119 extern struct amii_WinDesc *amii_wins[MAXWIN + 1];
121 extern struct amii_DisplayDesc *amiIDisplay; /* the Amiga Intuition descriptor */
123 extern char morc; /* last character typed to xwaitforspace */
124 extern char defmorestr[]; /* default --more-- prompt */
126 #endif /* WINAMI_H */