1 /* SCCS Id: @(#)wintype.h 3.4 1996/02/18 */ 2 /* Copyright (c) David Cohrs, 1991 */ 3 /* NetHack may be freely redistributed. See license for details. */ 4 5 #ifndef WINTYPE_H 6 #define WINTYPE_H 7 8 typedef int winid; /* a window identifier */ 9 10 /* generic parameter - must not be any larger than a pointer */ 11 typedef union any { 12 genericptr_t a_void; 13 struct obj *a_obj; 14 int a_int; 15 char a_char; 16 schar a_schar; 17 /* add types as needed */ 18 } anything; 19 #define ANY_P union any /* avoid typedef in prototypes */ 20 /* (buggy old Ultrix compiler) */ 21 22 /* menu return list */ 23 typedef struct mi { 24 anything item; /* identifier */ 25 long count; /* count */ 26 } menu_item; 27 #define MENU_ITEM_P struct mi 28 29 /* select_menu() "how" argument types */ 30 #define PICK_NONE 0 /* user picks nothing (display only) */ 31 #define PICK_ONE 1 /* only pick one */ 32 #define PICK_ANY 2 /* can pick any amount */ 33 34 /* window types */ 35 /* any additional port specific types should be defined in win*.h */ 36 #define NHW_MESSAGE 1 37 #define NHW_STATUS 2 38 #define NHW_MAP 3 39 #define NHW_MENU 4 40 #define NHW_TEXT 5 41 42 /* attribute types for putstr; the same as the ANSI value, for convenience */ 43 #define ATR_NONE 0 44 #define ATR_BOLD 1 45 #define ATR_DIM 2 46 #define ATR_ULINE 4 47 #define ATR_BLINK 5 48 #define ATR_INVERSE 7 49 50 /* nh_poskey() modifier types */ 51 #define CLICK_1 1 52 #define CLICK_2 2 53 54 /* invalid winid */ 55 #define WIN_ERR ((winid) -1) 56 57 /* menu window keyboard commands (may be mapped) */ 58 #define MENU_FIRST_PAGE '^' 59 #define MENU_LAST_PAGE '|' 60 #define MENU_NEXT_PAGE '>' 61 #define MENU_PREVIOUS_PAGE '<' 62 #define MENU_SELECT_ALL '.' 63 #define MENU_UNSELECT_ALL '-' 64 #define MENU_INVERT_ALL '@' 65 #define MENU_SELECT_PAGE ',' 66 #define MENU_UNSELECT_PAGE '\\' 67 #define MENU_INVERT_PAGE '~' 68 #define MENU_SEARCH ':' 69 70 71 #endif /* WINTYPE_H */ 72