reindent-20030715
[openafs.git] / src / gtx / gtxframe.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
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
8  */
9
10 #ifndef __GTX_FRAME_INCL_
11 #define __GTX_FRAME_INCL_ 1
12 struct gtxframe_dlist {
13     struct gtxframe_dlist *next;
14     char *data;
15 };
16
17 struct gtxframe_menu {
18     struct gtxframe_menu *next;
19     char *name;
20     char *cmdString;
21 };
22
23 struct gtx_frame {
24     struct keymap_map *keymap;  /*Map for handling keystrokes */
25     struct keymap_map *savemap; /* Map saved during recursive edit */
26     struct keymap_state *keystate;      /*Associated key state */
27     struct gtxframe_dlist *display;     /*Display list */
28     struct gtxframe_menu *menus;        /* Menu list */
29     char *messageLine;          /* message line */
30     char *promptLine;           /* prompt for a response */
31     char *defaultLine;          /* default response */
32     struct gwin *window;        /* window we're currently showing on */
33     int flags;
34 };
35
36 #define GTXFRAME_NEWDISPLAY     1       /* just did a display string this command */
37 #define GTXFRAME_RECURSIVEEND   2       /* end recursive edit */
38 #define GTXFRAME_RECURSIVEERR   4       /* recursive edit failed due to error */
39
40 extern struct gtx_frame *gtxframe_Create();
41 extern struct gtx_frame *gtxframe_GetFrame();
42
43 /*
44   * The gtxframe_ExitCmd() routine, normally bound to ^C, allows a caller
45   * to cleanly exit from its gtx environment, returning the terminal or
46   * window to its normal state.  If a non-zero exit value is desired, then
47   * the caller should place it in gtxframe_exitValue.
48   */
49 extern int gtxframe_ExitCmd();
50 extern int gtxframe_exitValue;
51
52 #endif /* __GTX_FRAME_INCL_ */