xmh.h revision c9e2be55
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
32c9e2be55Smrg#include <X11/Intrinsic.h>
33c9e2be55Smrg#include <X11/StringDefs.h>
34c9e2be55Smrg#include <X11/Shell.h>
35c9e2be55Smrg#include <X11/Xos.h>
36c9e2be55Smrg#include <X11/Xfuncs.h>
37c9e2be55Smrg#include <X11/Xutil.h>
38c9e2be55Smrg#include <X11/cursorfont.h>
39c9e2be55Smrg#include <X11/Xaw/AsciiText.h>
40c9e2be55Smrg#include <X11/Xaw/SmeBSB.h>
41c9e2be55Smrg#include <X11/Xaw/Box.h>
42c9e2be55Smrg#include <X11/Xaw/Command.h>
43c9e2be55Smrg#include <X11/Xaw/Dialog.h>
44c9e2be55Smrg#include <X11/Xaw/Form.h>
45c9e2be55Smrg#include <X11/Xaw/Label.h>
46c9e2be55Smrg#include <X11/Xaw/SmeLine.h>
47c9e2be55Smrg#include <X11/Xaw/MenuButton.h>
48c9e2be55Smrg#include <X11/Xaw/SimpleMenu.h>
49c9e2be55Smrg#include <X11/Xaw/Toggle.h>
50c9e2be55Smrg#include <X11/Xaw/Viewport.h>
51c9e2be55Smrg#include <X11/Xaw/Paned.h>
52c9e2be55Smrg#if defined(sun) && defined(SVR4)
53c9e2be55Smrg#define _XOPEN_SOURCE
54c9e2be55Smrg#include <stdio.h>
55c9e2be55Smrg#undef _XOPEN_SOURCE
56c9e2be55Smrg#else
57c9e2be55Smrg#include <stdio.h>
58c9e2be55Smrg#endif
59c9e2be55Smrg
60c9e2be55Smrg#define DELETEABORTED	-1
61c9e2be55Smrg#define NEEDS_CONFIRMATION	-1
62c9e2be55Smrg#define MARKPOS		4
63c9e2be55Smrg
64c9e2be55Smrg#define xMargin 2
65c9e2be55Smrg#define yMargin 2
66c9e2be55Smrg
67c9e2be55Smrg#define DEBUG(msg) \
68c9e2be55Smrg	if (app_resources.debug) \
69c9e2be55Smrg	    {(void)fprintf(stderr, msg); (void)fflush(stderr);}
70c9e2be55Smrg
71c9e2be55Smrg#define DEBUG1(msg, arg) \
72c9e2be55Smrg	if (app_resources.debug) \
73c9e2be55Smrg	    {(void)fprintf(stderr, msg, arg); (void)fflush(stderr);}
74c9e2be55Smrg
75c9e2be55Smrg#define DEBUG2(msg, arg1, arg2) \
76c9e2be55Smrg	if (app_resources.debug) \
77c9e2be55Smrg	    {(void)fprintf(stderr,msg,arg1,arg2); (void)fflush(stderr);}
78c9e2be55Smrg
79c9e2be55Smrgtypedef int * dp;		/* For debugging. */
80c9e2be55Smrg
81c9e2be55Smrgtypedef FILE* FILEPTR;
82c9e2be55Smrg
83c9e2be55Smrgtypedef struct _ButtonRec *Button;
84c9e2be55Smrgtypedef struct _XmhButtonBoxRec *ButtonBox;
85c9e2be55Smrgtypedef struct _TocRec *Toc;
86c9e2be55Smrgtypedef struct _MsgRec *Msg;
87c9e2be55Smrgtypedef struct _PickRec *Pick;
88c9e2be55Smrg
89c9e2be55Smrgtypedef enum {
90c9e2be55Smrg    Fignore, Fmove, Fcopy, Fdelete
91c9e2be55Smrg} FateType;
92c9e2be55Smrg
93c9e2be55Smrgtypedef enum {
94c9e2be55Smrg    STtocAndView,
95c9e2be55Smrg    STview,
96c9e2be55Smrg    STcomp,
97c9e2be55Smrg    STpick
98c9e2be55Smrg} ScrnKind;
99c9e2be55Smrg
100c9e2be55Smrgtypedef struct _StackRec {
101c9e2be55Smrg    char		*data;
102c9e2be55Smrg    struct _StackRec	*next;
103c9e2be55Smrg} StackRec, *Stack;
104c9e2be55Smrg
105c9e2be55Smrg
106c9e2be55Smrgtypedef struct _ScrnRec {
107c9e2be55Smrg   Widget	parent;		/* The parent widget of the scrn */
108c9e2be55Smrg   Widget	widget;		/* The pane widget for the scrn */
109c9e2be55Smrg   int		mapped;		/* TRUE only if we've mapped this screen. */
110c9e2be55Smrg   ScrnKind	kind;		/* What kind of scrn we have. */
111c9e2be55Smrg   ButtonBox	mainbuttons;	/* Main xmh control buttons. */
112c9e2be55Smrg   Widget	folderlabel;	/* Folder titlebar */
113c9e2be55Smrg   ButtonBox	folderbuttons;	/* Folder buttons. */
114c9e2be55Smrg   Widget	toclabel;	/* Toc titlebar. */
115c9e2be55Smrg   Widget	tocwidget;	/* Toc text. */
116c9e2be55Smrg   ButtonBox	miscbuttons;	/* optional miscellaneous command buttons */
117c9e2be55Smrg   Widget	viewlabel;	/* View titlebar. */
118c9e2be55Smrg   Widget	viewwidget;	/* View text. */
119c9e2be55Smrg   ButtonBox 	viewbuttons;	/* View control buttons. */
120c9e2be55Smrg   char *	curfolder;	/* Currently selected folder name */
121c9e2be55Smrg   Toc		toc;		/* The table of contents. */
122c9e2be55Smrg   Msg		msg;		/* The message being viewed. */
123c9e2be55Smrg   Pick		pick;		/* Pick in this screen. */
124c9e2be55Smrg   XtTranslations edit_translations;	/* Text widget translations */
125c9e2be55Smrg   XtTranslations read_translations;	/* overridden by accelerators */
126c9e2be55Smrg   Msg		assocmsg;	/* Associated message for reply, etc. */
127c9e2be55Smrg   Window	wait_window;	/* InputOnly window with busy cursor */
128c9e2be55Smrg   Stack	folder_stack;	/* Stack of folder names */
129c9e2be55Smrg} ScrnRec, *Scrn;
130c9e2be55Smrg
131c9e2be55Smrg
132c9e2be55Smrgtypedef struct {
133c9e2be55Smrg    int nummsgs;
134c9e2be55Smrg    Msg *msglist;
135c9e2be55Smrg} MsgListRec, *MsgList;
136c9e2be55Smrg
137c9e2be55Smrg
138c9e2be55Smrgtypedef struct {
139c9e2be55Smrg   char		*name;		/* Name of this sequence. */
140c9e2be55Smrg   MsgList	mlist;		/* Messages in this sequence. */
141c9e2be55Smrg} SequenceRec, *Sequence;
142c9e2be55Smrg
143c9e2be55Smrg#define XMH_CB_ARGS Widget, XtPointer, XtPointer
144c9e2be55Smrg
145c9e2be55Smrg#include "globals.h"
146c9e2be55Smrg#include "externs.h"
147c9e2be55Smrg#include "mlist.h"
148c9e2be55Smrg#include "bbox.h"
149c9e2be55Smrg#include "msg.h"
150c9e2be55Smrg#include "toc.h"
151c9e2be55Smrg
152c9e2be55Smrg#endif /* _xmh_h */
153