home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Games / NetHack 3.1.3 / source / include / winami.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-01  |  3.1 KB  |  92 lines  |  [TEXT/R*ch]

  1. /*    SCCS Id: @(#)winami.h    3.1    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. /* descriptor for Amiga Intuition-based windows.  If we decide to cope with
  10.  * tty-style windows also, then things will need to change. */
  11. /* per-window data */
  12. struct amii_WinDesc {
  13.     xchar type;            /* type of window */
  14.     boolean active;        /* true if window is active */
  15.     boolean wasup;        /* true if menu/text window was already open */
  16.     short disprows;        /* Rows displayed so far (used for paging in message win) */
  17.     xchar offx, offy;        /* offset from topleft of display */
  18.     short vwx, vwy, vcx, vcy;    /* View cursor location */
  19.     short rows, cols;        /* dimensions */
  20.     short curx, cury;        /* current cursor position */
  21.     short maxrow, maxcol;    /* the maximum size used -- for INVEN wins */
  22.                 /* maxcol is also used by WIN_MESSAGE for */
  23.                 /* tracking the ^P command */
  24.     char **data;        /* window data [row][column] */
  25.     char *resp;            /* valid menu responses (for NHW_INVEN) */
  26.     char *canresp;        /* cancel responses; 1st is the return value */
  27.     char *morestr;        /* string to display instead of default */
  28. /* amiga stuff */
  29.     struct Window *win;        /* Intuition window pointer */
  30. #ifdef    INTUI_NEW_LOOK
  31.     struct ExtNewWindow *newwin;    /* NewWindow alloc'd */
  32. #else
  33.     struct NewWindow *newwin;    /* ExtNewWindow alloc'd */
  34. #endif
  35. #define FLMAP_INGLYPH    1    /* An NHW_MAP window is in glyph mode */
  36. #define FLMAP_CURSUP    2    /* An NHW_MAP window has the cursor displayed */
  37. #define FLMAP_SKIP    4
  38. #define FLMSG_FIRST    1    /* First message in the NHW_MESSAGE window for this turn */
  39.     long wflags;
  40.     short cursx, cursy;        /* Where the cursor is displayed at */
  41.     short curs_apen,        /* Color cursor is displayed in */
  42.       curs_bpen;
  43. };
  44.  
  45. /* descriptor for intuition-based displays -- all the per-display data */
  46. /* this is a generic thing - think of it as Screen level */
  47.  
  48. struct amii_DisplayDesc {
  49. /* we need this for Screen size (which will vary with display mode) */
  50.     uchar rows, cols;        /* width & height of display in text units */
  51.     short xpix, ypix;        /* width and height of display in pixels */
  52.     int toplin;            /* flag for topl stuff */
  53.     int rawprint;        /* number of raw_printed lines since synch */
  54.     winid lastwin;        /* last window used for I/O */
  55. };
  56.  
  57. typedef enum {
  58.     WEUNK, WEKEY, WEMOUSE, WEMENU,
  59. } WETYPE;
  60.  
  61. typedef struct WEVENT
  62. {
  63.     WETYPE type;
  64.     union {
  65.         int key;
  66.         struct {
  67.             int x, y;
  68.             int qual;
  69.         } mouse;
  70.         long menucode;
  71.     } un;
  72. } WEVENT;
  73.  
  74. #define MAXWIN 20        /* maximum number of windows, cop-out */
  75.  
  76. /* port specific variable declarations */
  77. extern winid WIN_BASE;
  78. extern winid WIN_VIEW;
  79. extern winid WIN_VIEWBOX;
  80. #define NHW_BASE    6
  81. #define NHW_VIEW    7
  82. #define NHW_VIEWBOX    8
  83.  
  84. extern struct amii_WinDesc *amii_wins[MAXWIN + 1];
  85.  
  86. extern struct amii_DisplayDesc *amiIDisplay;    /* the Amiga Intuition descriptor */
  87.  
  88. extern char morc;        /* last character typed to xwaitforspace */
  89. extern char defmorestr[];    /* default --more-- prompt */
  90.  
  91. #endif /* WINAMI_H */
  92.