1 /* NetHack 3.6 wintype.h $NHDT-Date: 1549327486 2019/02/05 00:44:46 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.19 $ */
2 /* Copyright (c) David Cohrs, 1991 */
3 /* NetHack may be freely redistributed. See license for details. */
8 typedef int winid; /* a window identifier */
10 /* generic parameter - must not be any larger than a pointer */
14 struct monst *a_monst;
21 unsigned long a_ulong;
24 unsigned long *a_ulptr;
27 int NDECL((*a_nfunc));
28 unsigned long a_mask32; /* used by status highlighting */
29 /* add types as needed */
31 #define ANY_P union any /* avoid typedef in prototypes */
32 /* (buggy old Ultrix compiler) */
34 /* symbolic names for the data types housed in anything */
37 ANY_OBJ, /* struct obj */
38 ANY_MONST, /* struct monst (not used) */
41 ANY_UCHAR, /* unsigned char */
42 ANY_SCHAR, /* signed char */
43 ANY_UINT, /* unsigned int */
45 ANY_ULONG, /* unsigned long */
46 ANY_IPTR, /* pointer to int */
47 ANY_UPTR, /* pointer to unsigned int */
48 ANY_LPTR, /* pointer to long */
49 ANY_ULPTR, /* pointer to unsigned long */
50 ANY_STR, /* pointer to null-terminated char string */
51 ANY_NFUNC, /* pointer to function taking no args, returning int */
52 ANY_MASK32 /* 32-bit mask (stored as unsigned long) */
55 /* menu return list */
57 anything item; /* identifier */
58 long count; /* count */
60 #define MENU_ITEM_P struct mi
62 /* select_menu() "how" argument types */
63 /* [MINV_PICKMASK in monst.h assumes these have values of 0, 1, 2] */
64 #define PICK_NONE 0 /* user picks nothing (display only) */
65 #define PICK_ONE 1 /* only pick one */
66 #define PICK_ANY 2 /* can pick any amount */
69 /* any additional port specific types should be defined in win*.h */
76 /* attribute types for putstr; the same as the ANSI value, for convenience */
83 /* not a display attribute but passed to putstr() as an attribute;
84 can be masked with one regular display attribute */
86 #define ATR_NOHISTORY 32
88 /* nh_poskey() modifier types */
93 #define WIN_ERR ((winid) -1)
95 /* menu window keyboard commands (may be mapped) */
96 /* clang-format off */
97 #define MENU_FIRST_PAGE '^'
98 #define MENU_LAST_PAGE '|'
99 #define MENU_NEXT_PAGE '>'
100 #define MENU_PREVIOUS_PAGE '<'
101 #define MENU_SELECT_ALL '.'
102 #define MENU_UNSELECT_ALL '-'
103 #define MENU_INVERT_ALL '@'
104 #define MENU_SELECT_PAGE ','
105 #define MENU_UNSELECT_PAGE '\\'
106 #define MENU_INVERT_PAGE '~'
107 #define MENU_SEARCH ':'
108 /* clang-format on */
110 #endif /* WINTYPE_H */