2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
11 #include <afsconfig.h>
12 #include <afs/param.h>
18 #include <sys/types.h>
22 #include "gtxobjects.h"
23 #include "gtxwindows.h"
24 #include "gtxcurseswin.h"
26 #include "gtxkeymap.h"
33 register struct gwin *awin;
37 register struct gtx_frame *tframe;
39 WOP_DISPLAY(awin); /* start off with a clean display */
41 /* get a character from the generic window */
42 tframe = awin->w_frame;
43 code = WOP_WAIT(awin);
45 printf("***WAIT FAILURE %d****\n", code);
48 tc = WOP_GETCHAR(awin);
49 tframe->flags &= ~GTXFRAME_NEWDISPLAY; /* OK to clear now */
51 break; /* EOF or some such */
52 /* otherwise, process the character and go get a new one */
53 gtxframe_ClearMessageLine(tframe);
54 tframe->flags &= ~(GTXFRAME_RECURSIVEEND | GTXFRAME_RECURSIVEERR);
55 keymap_ProcessKey(tframe->keystate, tc, awin);
56 tframe = awin->w_frame; /* in case command changed it */
57 if (tframe->flags & GTXFRAME_RECURSIVEEND) {
58 tframe->flags &= ~GTXFRAME_RECURSIVEEND;
61 tframe->flags &= ~GTXFRAME_RECURSIVEEND;
62 WOP_DISPLAY(awin); /* eventually calls gtxframe_Display */
67 gtx_Init(astartInput, atype)
68 int atype; /* type of window to create */
72 struct onode_initparams oi_params; /* object init params */
73 struct gwin_initparams wi_params; /* window initialization params */
74 register struct gwin *twin;
77 /* setup the main window structure */
78 wi_params.i_type = GATOR_WIN_CURSES;
81 wi_params.i_width = 80;
82 wi_params.i_height = 200;
83 wi_params.i_debug = 0; /* or 1 if we want debugging done */
86 * Set up the basic onode initialization parameters, throwing in
87 * the graphics-specific stuff.
89 oi_params.i_debug = 0; /* or 1 if we want debugging */
90 oi_params.i_gwparams = &wi_params;
92 code = gator_objects_init(&oi_params);
96 /* if we start input thread */
97 IOMGR_Initialize(); /* input thread uses it */
100 LWP_CreateProcess(gtx_InputServer, 8192, LWP_NORMAL_PRIORITY,
101 (void *)0, "gx-listener", &junk);
103 twin = &gator_basegwin;