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
10 #ifndef __GTX_FRAME_INCL_
11 #define __GTX_FRAME_INCL_ 1
12 struct gtxframe_dlist
{
13 struct gtxframe_dlist
*next
;
17 struct gtxframe_menu
{
18 struct gtxframe_menu
*next
;
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 */
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 */
40 extern int gtxframe_SetFrame(struct gwin
*awin
, struct gtx_frame
*aframe
);
41 extern struct gtx_frame
*gtxframe_GetFrame(struct gwin
*);
42 extern int gtxframe_AddMenu(struct gtx_frame
*aframe
, char *alabel
,
44 extern int gtxframe_DeleteMenu(struct gtx_frame
*aframe
, char *alabel
);
45 extern int gtxframe_ClearMenus(struct gtx_frame
*aframe
);
46 extern int gtxframe_AskForString(struct gtx_frame
*aframe
, char *aprompt
,
47 char *adefault
, char *aresult
,
49 extern int gtxframe_DisplayString(struct gtx_frame
*, char *);
50 extern int gtxframe_ClearMessageLine(struct gtx_frame
*aframe
);
51 extern struct gtx_frame
*gtxframe_Create(void);
52 extern int gtxframe_Delete(struct gtx_frame
*aframe
);
53 extern int gtxframe_Display(struct gtx_frame
*aframe
, struct gwin
*awm
);
54 extern int gtxframe_AddToList(struct gtx_frame
*aframe
, struct onode
*aobj
);
55 extern int gtxframe_RemoveFromList(struct gtx_frame
*aframe
,
57 extern int gtxframe_ClearList(struct gtx_frame
*aframe
);
60 * The gtxframe_ExitCmd() routine, normally bound to ^C, allows a caller
61 * to cleanly exit from its gtx environment, returning the terminal or
62 * window to its normal state. If a non-zero exit value is desired, then
63 * the caller should place it in gtxframe_exitValue.
65 extern int gtxframe_ExitCmd(void *, void *);
66 extern int gtxframe_exitValue
;
68 #endif /* __GTX_FRAME_INCL_ */