1 /* SCCS Id: @(#)windows.c 3.4 1996/05/19 */
2 /* Copyright (c) D. Cohrs, 1993. */
3 /* NetHack may be freely redistributed. See license for details. */
10 /* cannot just blindly include winX.h without including all of X11 stuff */
11 /* and must get the order of include files right. Don't bother */
12 extern struct window_procs X11_procs;
13 extern void NDECL(win_X11_init);
16 extern struct window_procs Qt_procs;
22 extern struct window_procs mac_procs;
25 extern struct window_procs beos_procs;
26 extern void NDECL(be_win_init);
28 #ifdef AMIGA_INTUITION
29 extern struct window_procs amii_procs;
30 extern struct window_procs amiv_procs;
31 extern void NDECL(ami_wininit_data);
34 extern struct window_procs win32_procs;
38 extern struct window_procs Gnome_procs;
41 extern struct window_procs mswin_procs;
44 STATIC_DCL void FDECL(def_raw_print, (const char *s));
46 NEARDATA struct window_procs windowprocs;
50 struct window_procs *procs;
51 void NDECL((*ini_routine)); /* optional (can be 0) */
54 { &tty_procs, win_tty_init },
57 { &X11_procs, win_X11_init },
63 { &Gem_procs, win_Gem_init },
69 { &beos_procs, be_win_init },
71 #ifdef AMIGA_INTUITION
72 { &amii_procs, ami_wininit_data }, /* Old font version of the game */
73 { &amiv_procs, ami_wininit_data }, /* Tile version of the game */
84 { 0, 0 } /* must be last */
101 for(i=0; winchoices[i].procs; i++)
102 if (!strcmpi(s, winchoices[i].procs->name)) {
103 windowprocs = *winchoices[i].procs;
104 if (winchoices[i].ini_routine) (*winchoices[i].ini_routine)();
108 if (!windowprocs.win_raw_print)
109 windowprocs.win_raw_print = def_raw_print;
111 raw_printf("Window type %s not recognized. Choices are:", s);
112 for(i=0; winchoices[i].procs; i++)
113 raw_printf(" %s", winchoices[i].procs->name);
115 if (windowprocs.win_raw_print == def_raw_print)
116 terminate(EXIT_SUCCESS);
121 * tty_message_menu() provides a means to get feedback from the
122 * --More-- prompt; other interfaces generally don't need that.
126 genl_message_menu(let, how, mesg)
137 genl_preference_update(pref)
140 /* window ports are expected to provide
141 their own preference update routine
142 for the preference capabilities that
144 Just return in this genl one. */