00001
00002
00003
00004
00005 #ifndef WINPROCS_H
00006 #define WINPROCS_H
00007
00008 struct window_procs {
00009 const char *name;
00010 unsigned long wincap;
00011 unsigned long wincap2;
00012 void FDECL((*win_init_nhwindows), (int *, char **));
00013 void NDECL((*win_player_selection));
00014 void NDECL((*win_askname));
00015 void NDECL((*win_get_nh_event)) ;
00016 void FDECL((*win_exit_nhwindows), (const char *));
00017 void FDECL((*win_suspend_nhwindows), (const char *));
00018 void NDECL((*win_resume_nhwindows));
00019 winid FDECL((*win_create_nhwindow), (int));
00020 void FDECL((*win_clear_nhwindow), (winid));
00021 void FDECL((*win_display_nhwindow), (winid, BOOLEAN_P));
00022 void FDECL((*win_destroy_nhwindow), (winid));
00023 void FDECL((*win_curs), (winid,int,int));
00024 void FDECL((*win_putstr), (winid, int, const char *));
00025 void FDECL((*win_display_file), (const char *, BOOLEAN_P));
00026 void FDECL((*win_start_menu), (winid));
00027 void FDECL((*win_add_menu), (winid,int,const ANY_P *,
00028 CHAR_P,CHAR_P,int,const char *, BOOLEAN_P));
00029 void FDECL((*win_end_menu), (winid, const char *));
00030 int FDECL((*win_select_menu), (winid, int, MENU_ITEM_P **));
00031 char FDECL((*win_message_menu), (CHAR_P,int,const char *));
00032 void NDECL((*win_update_inventory));
00033 void NDECL((*win_mark_synch));
00034 void NDECL((*win_wait_synch));
00035 #ifdef CLIPPING
00036 void FDECL((*win_cliparound), (int, int));
00037 #endif
00038 #ifdef POSITIONBAR
00039 void FDECL((*win_update_positionbar), (char *));
00040 #endif
00041 void FDECL((*win_print_glyph), (winid,XCHAR_P,XCHAR_P,int));
00042 void FDECL((*win_raw_print), (const char *));
00043 void FDECL((*win_raw_print_bold), (const char *));
00044 int NDECL((*win_nhgetch));
00045 int FDECL((*win_nh_poskey), (int *, int *, int *));
00046 void NDECL((*win_nhbell));
00047 int NDECL((*win_doprev_message));
00048 char FDECL((*win_yn_function), (const char *, const char *, CHAR_P));
00049 void FDECL((*win_getlin), (const char *,char *));
00050 int NDECL((*win_get_ext_cmd));
00051 void FDECL((*win_number_pad), (int));
00052 void NDECL((*win_delay_output));
00053 #ifdef CHANGE_COLOR
00054 void FDECL((*win_change_color), (int,long,int));
00055 #ifdef MAC
00056 void FDECL((*win_change_background), (int));
00057 short FDECL((*win_set_font_name), (winid, char *));
00058 #endif
00059 char * NDECL((*win_get_color_string));
00060 #endif
00061
00062
00063 void NDECL((*win_start_screen));
00064 void NDECL((*win_end_screen));
00065
00066 void FDECL((*win_outrip), (winid,int));
00067 void FDECL((*win_preference_update), (const char *));
00068 };
00069
00070 extern NEARDATA struct window_procs windowprocs;
00071
00072
00073
00074
00075
00076
00077 #define init_nhwindows (*windowprocs.win_init_nhwindows)
00078 #define player_selection (*windowprocs.win_player_selection)
00079 #define askname (*windowprocs.win_askname)
00080 #define get_nh_event (*windowprocs.win_get_nh_event)
00081 #define exit_nhwindows (*windowprocs.win_exit_nhwindows)
00082 #define suspend_nhwindows (*windowprocs.win_suspend_nhwindows)
00083 #define resume_nhwindows (*windowprocs.win_resume_nhwindows)
00084 #define create_nhwindow (*windowprocs.win_create_nhwindow)
00085 #define clear_nhwindow (*windowprocs.win_clear_nhwindow)
00086 #define display_nhwindow (*windowprocs.win_display_nhwindow)
00087 #define destroy_nhwindow (*windowprocs.win_destroy_nhwindow)
00088 #define curs (*windowprocs.win_curs)
00089 #define putstr (*windowprocs.win_putstr)
00090 #define display_file (*windowprocs.win_display_file)
00091 #define start_menu (*windowprocs.win_start_menu)
00092 #define add_menu (*windowprocs.win_add_menu)
00093 #define end_menu (*windowprocs.win_end_menu)
00094 #define select_menu (*windowprocs.win_select_menu)
00095 #define message_menu (*windowprocs.win_message_menu)
00096 #define update_inventory (*windowprocs.win_update_inventory)
00097 #define mark_synch (*windowprocs.win_mark_synch)
00098 #define wait_synch (*windowprocs.win_wait_synch)
00099 #ifdef CLIPPING
00100 #define cliparound (*windowprocs.win_cliparound)
00101 #endif
00102 #ifdef POSITIONBAR
00103 #define update_positionbar (*windowprocs.win_update_positionbar)
00104 #endif
00105 #define print_glyph (*windowprocs.win_print_glyph)
00106 #define raw_print (*windowprocs.win_raw_print)
00107 #define raw_print_bold (*windowprocs.win_raw_print_bold)
00108 #define nhgetch (*windowprocs.win_nhgetch)
00109 #define nh_poskey (*windowprocs.win_nh_poskey)
00110 #define nhbell (*windowprocs.win_nhbell)
00111 #define nh_doprev_message (*windowprocs.win_doprev_message)
00112 #define getlin (*windowprocs.win_getlin)
00113 #define get_ext_cmd (*windowprocs.win_get_ext_cmd)
00114 #define number_pad (*windowprocs.win_number_pad)
00115 #define delay_output (*windowprocs.win_delay_output)
00116 #ifdef CHANGE_COLOR
00117 #define change_color (*windowprocs.win_change_color)
00118 #ifdef MAC
00119 #define change_background (*windowprocs.win_change_background)
00120 #define set_font_name (*windowprocs.win_set_font_name)
00121 #endif
00122 #define get_color_string (*windowprocs.win_get_color_string)
00123 #endif
00124
00125
00126
00127
00128
00129
00130
00131
00132 #define start_screen (*windowprocs.win_start_screen)
00133 #define end_screen (*windowprocs.win_end_screen)
00134
00135 #define outrip (*windowprocs.win_outrip)
00136 #define preference_update (*windowprocs.win_preference_update)
00137
00138
00139
00140
00141
00142
00143 #define WC_COLOR 0x01L
00144 #define WC_HILITE_PET 0x02L
00145 #define WC_ASCII_MAP 0x04L
00146 #define WC_TILED_MAP 0x08L
00147 #define WC_PRELOAD_TILES 0x10L
00148 #define WC_TILE_WIDTH 0x20L
00149 #define WC_TILE_HEIGHT 0x40L
00150 #define WC_TILE_FILE 0x80L
00151 #define WC_INVERSE 0x100L
00152 #define WC_ALIGN_MESSAGE 0x200L
00153 #define WC_ALIGN_STATUS 0x400L
00154 #define WC_VARY_MSGCOUNT 0x800L
00155 #define WC_FONT_MAP 0x1000L
00156 #define WC_FONT_MESSAGE 0x2000L
00157 #define WC_FONT_STATUS 0x4000L
00158 #define WC_FONT_MENU 0x8000L
00159 #define WC_FONT_TEXT 0x10000L
00160 #define WC_FONTSIZ_MAP 0x20000L
00161 #define WC_FONTSIZ_MESSAGE 0x40000L
00162 #define WC_FONTSIZ_STATUS 0x80000L
00163 #define WC_FONTSIZ_MENU 0x100000L
00164 #define WC_FONTSIZ_TEXT 0x200000L
00165 #define WC_SCROLL_MARGIN 0x400000L
00166 #define WC_SPLASH_SCREEN 0x800000L
00167 #define WC_POPUP_DIALOG 0x1000000L
00168 #define WC_SCROLL_AMOUNT 0x2000000L
00169 #define WC_EIGHT_BIT_IN 0x4000000L
00170 #define WC_PERM_INVENT 0x8000000L
00171 #define WC_MAP_MODE 0x10000000L
00172 #define WC_WINDOWCOLORS 0x20000000L
00173 #define WC_PLAYER_SELECTION 0x40000000L
00174 #define WC_MOUSE_SUPPORT 0x80000000L
00175
00176
00177 #define WC2_FULLSCREEN 0x01L
00178 #define WC2_SOFTKEYBOARD 0x02L
00179 #define WC2_WRAPTEXT 0x04L
00180 #define WC2_TERM_COLS 0x08L
00181 #define WC2_TERM_ROWS 0x10L
00182 #define WC2_WINDOWBORDERS 0x20L
00183 #define WC2_PETATTR 0x40L
00184 #define WC2_GUICOLOR 0x80L
00185 #define WC2_NEWCOLORS 0x100L
00186
00187
00188 #define ALIGN_LEFT 1
00189 #define ALIGN_RIGHT 2
00190 #define ALIGN_TOP 3
00191 #define ALIGN_BOTTOM 4
00192
00193
00194 #define VIA_DIALOG 0
00195 #define VIA_PROMPTS 1
00196
00197
00198 #define MAP_MODE_TILES 0
00199 #define MAP_MODE_ASCII4x6 1
00200 #define MAP_MODE_ASCII6x8 2
00201 #define MAP_MODE_ASCII8x8 3
00202 #define MAP_MODE_ASCII16x8 4
00203 #define MAP_MODE_ASCII7x12 5
00204 #define MAP_MODE_ASCII8x12 6
00205 #define MAP_MODE_ASCII16x12 7
00206 #define MAP_MODE_ASCII12x16 8
00207 #define MAP_MODE_ASCII10x18 9
00208 #define MAP_MODE_ASCII_FIT_TO_SCREEN 10
00209 #define MAP_MODE_TILES_FIT_TO_SCREEN 11
00210
00211 #if 0
00212 #define WC_SND_SOUND 0x01L
00213 #define WC_SND_SPEAKER 0x02L
00214 #define WC_SND_STEREO 0x04L
00215 #define WC_SND_RAW 0x08L
00216 #define WC_SND_WAVE 0x10L
00217 #define WC_SND_MIDI 0x20L
00218
00219 #endif
00220
00221 struct wc_Opt {
00222 const char *wc_name;
00223 unsigned long wc_bit;
00224 };
00225
00226 #endif