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