1 /* NetHack 3.6 wintype.h $NHDT-Date: 1461028538 2016/04/19 01:15:38 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.16 $ */
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
;
20 unsigned long a_ulong
;
23 unsigned long *a_ulptr
;
26 /* add types as needed */
28 #define ANY_P union any /* avoid typedef in prototypes */
29 /* (buggy old Ultrix compiler) */
31 /* symbolic names for the data types housed in anything */
34 ANY_OBJ
, /* struct obj */
35 ANY_MONST
, /* struct monst (not used) */
38 ANY_UCHAR
, /* unsigned char */
39 ANY_SCHAR
, /* signed char */
40 ANY_UINT
, /* unsigned int */
42 ANY_ULONG
, /* unsigned long */
43 ANY_IPTR
, /* pointer to int */
44 ANY_UPTR
, /* pointer to unsigned int */
45 ANY_LPTR
, /* pointer to long */
46 ANY_ULPTR
, /* pointer to unsigned long */
47 ANY_STR
, /* pointer to null-terminated char string */
48 ANY_MASK32
/* 32-bit mask (stored as unsigned long) */
51 /* menu return list */
53 anything item
; /* identifier */
54 long count
; /* count */
56 #define MENU_ITEM_P struct mi
58 /* select_menu() "how" argument types */
59 /* [MINV_PICKMASK in monst.h assumes these have values of 0, 1, 2] */
60 #define PICK_NONE 0 /* user picks nothing (display only) */
61 #define PICK_ONE 1 /* only pick one */
62 #define PICK_ANY 2 /* can pick any amount */
65 /* any additional port specific types should be defined in win*.h */
72 /* attribute types for putstr; the same as the ANSI value, for convenience */
80 /* nh_poskey() modifier types */
85 #define WIN_ERR ((winid) -1)
87 /* menu window keyboard commands (may be mapped) */
88 /* clang-format off */
89 #define MENU_FIRST_PAGE '^'
90 #define MENU_LAST_PAGE '|'
91 #define MENU_NEXT_PAGE '>'
92 #define MENU_PREVIOUS_PAGE '<'
93 #define MENU_SELECT_ALL '.'
94 #define MENU_UNSELECT_ALL '-'
95 #define MENU_INVERT_ALL '@'
96 #define MENU_SELECT_PAGE ','
97 #define MENU_UNSELECT_PAGE '\\'
98 #define MENU_INVERT_PAGE '~'
99 #define MENU_SEARCH ':'
100 /* clang-format on */
102 #endif /* WINTYPE_H */