1c9e2be55Smrg/*
2c9e2be55Smrg * $XConsortium: xmh.h,v 2.32 93/09/08 15:31:11 kaleb Exp $
3c9e2be55Smrg *
4c9e2be55Smrg *
5c9e2be55Smrg *			  COPYRIGHT 1987
6c9e2be55Smrg *		   DIGITAL EQUIPMENT CORPORATION
7c9e2be55Smrg *		       MAYNARD, MASSACHUSETTS
8c9e2be55Smrg *			ALL RIGHTS RESERVED.
9c9e2be55Smrg *
10c9e2be55Smrg * THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND
11c9e2be55Smrg * SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
12c9e2be55Smrg * DIGITAL MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR
13c9e2be55Smrg * ANY PURPOSE.  IT IS SUPPLIED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
14c9e2be55Smrg *
15c9e2be55Smrg * IF THE SOFTWARE IS MODIFIED IN A MANNER CREATING DERIVATIVE COPYRIGHT
16c9e2be55Smrg * RIGHTS, APPROPRIATE LEGENDS MAY BE PLACED ON THE DERIVATIVE WORK IN
17c9e2be55Smrg * ADDITION TO THAT SET FORTH ABOVE.
18c9e2be55Smrg *
19c9e2be55Smrg * Permission to use, copy, modify, and distribute this software and its
20c9e2be55Smrg * documentation for any purpose and without fee is hereby granted, provided
21c9e2be55Smrg * that the above copyright notice appear in all copies and that both that
22c9e2be55Smrg * copyright notice and this permission notice appear in supporting
23c9e2be55Smrg * documentation, and that the name of Digital Equipment Corporation not be
24c9e2be55Smrg * used in advertising or publicity pertaining to distribution of the software
25c9e2be55Smrg * without specific, written prior permission.
26c9e2be55Smrg */
27c9e2be55Smrg/* $XFree86$ */
28c9e2be55Smrg
29c9e2be55Smrg#ifndef _xmh_h
30c9e2be55Smrg#define _xmh_h
31c9e2be55Smrg
32e2264b6dSmrg#include "config.h"
33e2264b6dSmrg#define XMH_VERSION PACKAGE_STRING
3466d665a3Smrg#define _CONST_X_STRING
35e2264b6dSmrg
36c9e2be55Smrg#include <X11/Intrinsic.h>
37c9e2be55Smrg#include <X11/StringDefs.h>
38c9e2be55Smrg#include <X11/Shell.h>
39c9e2be55Smrg#include <X11/Xos.h>
40c9e2be55Smrg#include <X11/Xfuncs.h>
41c9e2be55Smrg#include <X11/Xutil.h>
42c9e2be55Smrg#include <X11/cursorfont.h>
43c9e2be55Smrg#include <X11/Xaw/AsciiText.h>
44c9e2be55Smrg#include <X11/Xaw/SmeBSB.h>
45c9e2be55Smrg#include <X11/Xaw/Box.h>
46c9e2be55Smrg#include <X11/Xaw/Command.h>
47c9e2be55Smrg#include <X11/Xaw/Dialog.h>
48c9e2be55Smrg#include <X11/Xaw/Form.h>
49c9e2be55Smrg#include <X11/Xaw/Label.h>
50c9e2be55Smrg#include <X11/Xaw/SmeLine.h>
51c9e2be55Smrg#include <X11/Xaw/MenuButton.h>
52c9e2be55Smrg#include <X11/Xaw/SimpleMenu.h>
53c9e2be55Smrg#include <X11/Xaw/Toggle.h>
54c9e2be55Smrg#include <X11/Xaw/Viewport.h>
55c9e2be55Smrg#include <X11/Xaw/Paned.h>
56c9e2be55Smrg#if defined(sun) && defined(SVR4)
57c9e2be55Smrg#define _XOPEN_SOURCE
58c9e2be55Smrg#include <stdio.h>
59c9e2be55Smrg#undef _XOPEN_SOURCE
60c9e2be55Smrg#else
61c9e2be55Smrg#include <stdio.h>
62c9e2be55Smrg#endif
63c9e2be55Smrg
64c9e2be55Smrg#define DELETEABORTED	-1
65c9e2be55Smrg#define NEEDS_CONFIRMATION	-1
66c9e2be55Smrg#define MARKPOS		4
67c9e2be55Smrg
68c9e2be55Smrg#define xMargin 2
69c9e2be55Smrg#define yMargin 2
70c9e2be55Smrg
71c9e2be55Smrg#define DEBUG(msg) \
72c9e2be55Smrg	if (app_resources.debug) \
7366d665a3Smrg	    {(void)fputs(msg, stderr); (void)fflush(stderr);}
74c9e2be55Smrg
75c9e2be55Smrg#define DEBUG1(msg, arg) \
76c9e2be55Smrg	if (app_resources.debug) \
77c9e2be55Smrg	    {(void)fprintf(stderr, msg, arg); (void)fflush(stderr);}
78c9e2be55Smrg
79c9e2be55Smrg#define DEBUG2(msg, arg1, arg2) \
80c9e2be55Smrg	if (app_resources.debug) \
81c9e2be55Smrg	    {(void)fprintf(stderr,msg,arg1,arg2); (void)fflush(stderr);}
82c9e2be55Smrg
83c9e2be55Smrgtypedef int * dp;		/* For debugging. */
84c9e2be55Smrg
85c9e2be55Smrgtypedef FILE* FILEPTR;
86c9e2be55Smrg
87c9e2be55Smrgtypedef struct _ButtonRec *Button;
88c9e2be55Smrgtypedef struct _XmhButtonBoxRec *ButtonBox;
89c9e2be55Smrgtypedef struct _TocRec *Toc;
90c9e2be55Smrgtypedef struct _MsgRec *Msg;
91c9e2be55Smrgtypedef struct _PickRec *Pick;
92c9e2be55Smrg
93c9e2be55Smrgtypedef enum {
94c9e2be55Smrg    Fignore, Fmove, Fcopy, Fdelete
95c9e2be55Smrg} FateType;
96c9e2be55Smrg
97c9e2be55Smrgtypedef enum {
98c9e2be55Smrg    STtocAndView,
99c9e2be55Smrg    STview,
100c9e2be55Smrg    STcomp,
101c9e2be55Smrg    STpick
102c9e2be55Smrg} ScrnKind;
103c9e2be55Smrg
104c9e2be55Smrgtypedef struct _StackRec {
10566d665a3Smrg    const char		*data;
106c9e2be55Smrg    struct _StackRec	*next;
107c9e2be55Smrg} StackRec, *Stack;
108c9e2be55Smrg
109c9e2be55Smrg
110c9e2be55Smrgtypedef struct _ScrnRec {
111c9e2be55Smrg   Widget	parent;		/* The parent widget of the scrn */
112c9e2be55Smrg   Widget	widget;		/* The pane widget for the scrn */
113c9e2be55Smrg   int		mapped;		/* TRUE only if we've mapped this screen. */
114c9e2be55Smrg   ScrnKind	kind;		/* What kind of scrn we have. */
115c9e2be55Smrg   ButtonBox	mainbuttons;	/* Main xmh control buttons. */
116c9e2be55Smrg   Widget	folderlabel;	/* Folder titlebar */
117c9e2be55Smrg   ButtonBox	folderbuttons;	/* Folder buttons. */
118c9e2be55Smrg   Widget	toclabel;	/* Toc titlebar. */
119c9e2be55Smrg   Widget	tocwidget;	/* Toc text. */
120c9e2be55Smrg   ButtonBox	miscbuttons;	/* optional miscellaneous command buttons */
121c9e2be55Smrg   Widget	viewlabel;	/* View titlebar. */
122c9e2be55Smrg   Widget	viewwidget;	/* View text. */
123c9e2be55Smrg   ButtonBox 	viewbuttons;	/* View control buttons. */
12466d665a3Smrg   const char *	curfolder;	/* Currently selected folder name */
125c9e2be55Smrg   Toc		toc;		/* The table of contents. */
126c9e2be55Smrg   Msg		msg;		/* The message being viewed. */
127c9e2be55Smrg   Pick		pick;		/* Pick in this screen. */
128c9e2be55Smrg   XtTranslations edit_translations;	/* Text widget translations */
129c9e2be55Smrg   XtTranslations read_translations;	/* overridden by accelerators */
130c9e2be55Smrg   Msg		assocmsg;	/* Associated message for reply, etc. */
131c9e2be55Smrg   Window	wait_window;	/* InputOnly window with busy cursor */
132c9e2be55Smrg   Stack	folder_stack;	/* Stack of folder names */
133c9e2be55Smrg} ScrnRec, *Scrn;
134c9e2be55Smrg
135c9e2be55Smrg
136c9e2be55Smrgtypedef struct {
137c9e2be55Smrg    int nummsgs;
138c9e2be55Smrg    Msg *msglist;
139c9e2be55Smrg} MsgListRec, *MsgList;
140c9e2be55Smrg
141c9e2be55Smrg
142c9e2be55Smrgtypedef struct {
14366d665a3Smrg   const char	*name;		/* Name of this sequence. */
144c9e2be55Smrg   MsgList	mlist;		/* Messages in this sequence. */
145c9e2be55Smrg} SequenceRec, *Sequence;
146c9e2be55Smrg
147c9e2be55Smrg#define XMH_CB_ARGS Widget, XtPointer, XtPointer
148c9e2be55Smrg
149c9e2be55Smrg#include "globals.h"
150c9e2be55Smrg#include "externs.h"
151c9e2be55Smrg#include "mlist.h"
152c9e2be55Smrg#include "bbox.h"
153c9e2be55Smrg#include "msg.h"
154c9e2be55Smrg#include "toc.h"
155c9e2be55Smrg
156c9e2be55Smrg#endif /* _xmh_h */
157