Source:NetHack 3.2.0/winami.h

Below is the full text to winami.h from the source code of NetHack 3.2.0. To link to a particular line, write [[NetHack 3.2.0/winami.h#line123 ]], for example.

Warning! This is the source code from an old release. For the latest release, see Source code

1.   /*	SCCS Id: @(#)winami.h	3.2	93/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. */ 5.     6.    #ifndef WINAMI_H 7.   #define WINAMI_H 8.    9.    #define MAXWINTAGS	5 10.   11.   /*  12.    * Information specific to a menu window. First a structure for each 13.   * menu entry, then the structure for each menu window. 14.   */  15.   typedef struct amii_mi { 16.      struct amii_mi *next; 17.      anything identifier;	/* Opaque type to identify this selection */ 18.      long glyph;			/* Glyph for menu item */ 19.      char selected;		/* Been selected? */ 20.       char selector;		/* Char used to select this entry. */ 21.       char canselect;		/* Can user select this entry. */ 22.       char attr;			/* Attribute for the line. */ 23.       char *str;			/* The text of the item. */ 24.   } amii_menu_item; 25.   26.   struct amii_menu 27.  {  28.       amii_menu_item *items;	/* Starting pointer for item list. */ 29.       amii_menu_item *last;	/* End pointer for item list. */ 30.       const char     *query;	/* Query string */ 31.      int		    count;	/* Number of strings. */ 32.       char            chr;	/* Character to assign for accelerator */ 33.  };  34.    35.   /* descriptor for Amiga Intuition-based windows. If we decide to cope with 36.   * tty-style windows also, then things will need to change. */ 37.   /* per-window data */ 38.  struct amii_WinDesc { 39.      xchar type;			/* type of window */ 40.      struct amii_menu menu; 41.      boolean active;		/* true if window is active */ 42.      boolean wasup;		/* true if menu/text window was already open */ 43.      short disprows;		/* Rows displayed so far (used for paging in message win) */ 44.      xchar offx, offy;		/* offset from topleft of display */ 45.      short vwx, vwy, vcx, vcy;	/* View cursor location */ 46.      short rows, cols;		/* dimensions */ 47.      short curx, cury;		/* current cursor position */ 48.      short maxrow, maxcol;	/* the maximum size used -- for INVEN wins */ 49.  				/* maxcol is also used by WIN_MESSAGE for */ 50.  				/* tracking the ^P command */ 51.      char **data;		/* window data [row][column] */ 52.      menu_item *mi;		/* Menu information */ 53.      char *resp;			/* valid menu responses (for NHW_INVEN) */ 54.      char *canresp;		/* cancel responses; 1st is the return value */ 55.      char *morestr;		/* string to display instead of default */ 56.  /* amiga stuff */ 57.      struct Window *win;		/* Intuition window pointer */ 58.  #ifdef	INTUI_NEW_LOOK 59.      struct ExtNewWindow *newwin;	/* NewWindow alloc'd */ 60.  #else 61.      struct NewWindow *newwin;	/* ExtNewWindow alloc'd */ 62.  #endif 63.  #ifdef	INTUI_NEW_LOOK 64.      struct TagItem wintags[ MAXWINTAGS ];/* Tag items for this window */ 65.  #else 66.      long wintags[ MAXWINTAGS*2 ]; 67.  #endif 68.      void *hook;			/* Hook structure pointer for tiles version */ 69.  #define FLMAP_INGLYPH	1	/* An NHW_MAP window is in glyph mode */ 70.  #define FLMAP_CURSUP	2	/* An NHW_MAP window has the cursor displayed */ 71.  #define FLMAP_SKIP	4 72.  #define FLMSG_FIRST	1	/* First message in the NHW_MESSAGE window for this turn */ 73.      long wflags; 74.      short cursx, cursy;		/* Where the cursor is displayed at */ 75.      short curs_apen,		/* Color cursor is displayed in */ 76.  	  curs_bpen; 77.  };  78.    79.   /* descriptor for intuition-based displays -- all the per-display data */ 80.  /* this is a generic thing - think of it as Screen level */ 81.   82.   struct amii_DisplayDesc { 83.  /* we need this for Screen size (which will vary with display mode) */ 84.      uchar rows, cols;		/* width & height of display in text units */ 85.      short xpix, ypix;		/* width and height of display in pixels */ 86.      int toplin;			/* flag for topl stuff */ 87.      int rawprint;		/* number of raw_printed lines since synch */ 88.      winid lastwin;		/* last window used for I/O */ 89.  };  90.    91.   typedef enum { 92.      WEUNK, WEKEY, WEMOUSE, WEMENU, 93.  } WETYPE; 94.   95.   typedef struct WEVENT 96.  {  97.       WETYPE type; 98.      union { 99.  	int key; 100. 	struct { 101. 	    int x, y;  102. int qual; 103. 	} mouse; 104. 	long menucode; 105.     } un; 106. } WEVENT; 107.  108.  #define MAXWIN 20		/* maximum number of windows, cop-out */ 109.  110.  /* port specific variable declarations */ 111. extern winid WIN_BASE; 112. extern winid WIN_OVER; 113. #define NHW_BASE	6 114. #define NHW_OVER	7		/* overview window */ 115.  116.   117.  extern struct amii_WinDesc *amii_wins[MAXWIN + 1]; 118.  119.  extern struct amii_DisplayDesc *amiIDisplay;	/* the Amiga Intuition descriptor */ 120.  121.  extern char morc;		/* last character typed to xwaitforspace */ 122. extern char defmorestr[];	/* default --more-- prompt */ 123.  124.  #endif /* WINAMI_H */