1 /* NetHack 3.6 winami.h $NHDT-Date: 1432512780 2015/05/25 00:13:00 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */
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. */
29 amii_menu_item
*items
; /* Starting pointer for item list. */
30 amii_menu_item
*last
; /* End pointer for item list. */
31 const char *query
; /* Query string */
32 int count
; /* Number of strings. */
33 char chr
; /* Character to assign for accelerator */
36 /* descriptor for Amiga Intuition-based windows. If we decide to cope with
37 * tty-style windows also, then things will need to change. */
40 xchar type
; /* type of window */
41 struct amii_menu menu
;
42 boolean active
; /* true if window is active */
43 boolean wasup
; /* true if menu/text window was already open */
45 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 */
75 1 /* First message in the NHW_MESSAGE window for this turn */
77 short cursx
, cursy
; /* Where the cursor is displayed at */
78 short curs_apen
, /* Color cursor is displayed in */
82 /* descriptor for intuition-based displays -- all the per-display data */
83 /* this is a generic thing - think of it as Screen level */
85 struct amii_DisplayDesc
{
86 /* we need this for Screen size (which will vary with display mode) */
87 uchar rows
, cols
; /* width & height of display in text units */
88 short xpix
, ypix
; /* width and height of display in pixels */
89 int toplin
; /* flag for topl stuff */
90 int rawprint
; /* number of raw_printed lines since synch */
91 winid lastwin
; /* last window used for I/O */
101 typedef struct WEVENT
{
113 #define MAXWIN 20 /* maximum number of windows, cop-out */
115 /* port specific variable declarations */
116 extern winid WIN_BASE
;
117 extern winid WIN_OVER
;
119 #define NHW_OVER 7 /* overview window */
121 extern struct amii_WinDesc
*amii_wins
[MAXWIN
+ 1];
123 extern struct amii_DisplayDesc
124 *amiIDisplay
; /* the Amiga Intuition descriptor */
126 extern char morc
; /* last character typed to xwaitforspace */
127 extern char defmorestr
[]; /* default --more-- prompt */
129 #endif /* WINAMI_H */