source: trunk/third/xmh/globals.h @ 9658

Revision 9658, 6.4 KB checked in by ghudson, 28 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r9657, which included commits to RCS files with non-trunk default branches.
Line 
1/*
2 *  $XConsortium: globals.h,v 2.39 91/07/18 21:03:15 converse Exp $
3 *
4 *
5 *                     COPYRIGHT 1987, 1989
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
28#ifdef MAIN
29#define ext
30#else
31#define ext extern
32#endif
33
34ext Display     *theDisplay;    /* Display variable. */
35ext Widget      toplevel;       /* The top level widget (A hack %%%). */
36ext char        *progName;      /* Program name. */
37ext char        *homeDir;       /* User's home directory. */
38ext Atom        wm_protocols;   /* WM_PROTOCOLS atom for this display */
39ext Atom        wm_delete_window;       /* see ICCCM on Window Deletion */
40ext Atom        wm_save_yourself;       /* see ICCCM on session management */
41ext Atom        protocolList[2];        /* contains the two above */
42
43ext struct _resources {
44    Boolean     debug;
45    char        *mail_path;             /* mh's mail directory. */
46    char        *temp_dir;              /* Directory for temporary files. */
47    char        *mh_path;               /* Path for mh commands. */
48    char        *initial_folder_name;   /* Initial folder to use. */
49    char        *initial_inc_file;      /* -file for inc on initial folder */
50    char        *insert_filter;         /* Insert message filter command */
51    char        *drafts_folder_name;    /* Folder for drafts. */
52    int         send_line_width;        /* How long to break lines on send. */
53    int         break_send_line_width;  /* Minimum length of a line before
54                                           we'll break it. */
55    char        *print_command;         /* Printing command. */
56    int         toc_width;      /* How many characters wide to use in tocs */
57    Boolean     skip_deleted;           /* If true, skip over deleted msgs. */
58    Boolean     skip_moved;             /* If true, skip over moved msgs. */
59    Boolean     skip_copied;            /* If true, skip over copied msgs. */
60    Boolean     hide_boring_headers;
61    char        *geometry;      /* Default geometry to use for things. */
62    char        *toc_geometry;
63    char        *view_geometry;
64    char        *comp_geometry;
65    char        *pick_geometry;
66    int         toc_percentage;         /* % of toc and view used by toc */
67    Boolean     new_mail_check;         /* should xmh check for new mail? */
68    Boolean     make_checkpoints;       /* should xmh save edits in progress?*/
69    int         check_frequency;        /* backwards compatibility */
70    int         mail_waiting_flag;      /* If true, change icon on new mail */
71    int         mail_interval;          /* how often to check for new mail */
72    int         rescan_interval;        /* how often to check viewed tocs */
73    int         checkpoint_interval;    /* how often to save edits */
74    char *      checkpoint_name_format; /* format of checkpoint file name */
75    Pixmap      flag_up;                /* folder has new mail */
76    Pixmap      flag_down;              /* folder has no new mail */
77    Pixmap      new_mail_icon;          /* new mail icon for wm hints */
78    Pixmap      no_mail_icon;           /* no mail icon for wm hints */
79    Cursor      cursor;                 /* application cursor */
80    Pixel       pointer_color;          /* application cursor color */
81    Boolean     show_on_inc;            /* show 1st new message after inc? */
82    Boolean     sticky_menu;            /* command menu entries are sticky? */
83    Boolean     prefix_wm_and_icon_name;/* prefix wm names with progName ? */
84    Boolean     reverse_read_order;     /* decrement counter to next msg ? */
85    Boolean     block_events_on_busy;   /* disallow user input while busy ? */
86    Cursor      busy_cursor;            /* the cursor while input blocked */
87    Pixel       busy_pointer_color;     /* busy cursor color */
88    int         command_button_count;   /* number of buttons in command box */
89    int         app_defaults_version;   /* for sanity check */
90    char        *banner;                /* defaults to xmh version string */
91    XtTranslations wm_protocols_translations; /* for all shells seen by WM */
92} app_resources;
93
94ext char        *draftFile;     /* Filename of draft. */
95ext char        *xmhDraftFile;  /* Filename for sending. */
96ext Toc         *folderList;    /* Array of folders. */
97ext int         numFolders;     /* Number of entries in above array. */
98ext Toc         InitialFolder;  /* Toc containing initial folder. */
99ext Toc         DraftsFolder;   /* Toc containing drafts. */
100ext Scrn        *scrnList;      /* Array of scrns in use. */
101ext int         numScrns;       /* Number of scrns in above array. */
102ext Widget      NoMenuForButton;/* Flag menu widget value: no menu */
103ext Widget      LastMenuButtonPressed;  /* to `toggle' menu buttons */
104ext Widget      NullSource;     /* null text widget source */
105ext Dimension   rootwidth;      /* Dimensions of root window.  */
106ext Dimension   rootheight;
107ext Pixmap      MenuItemBitmap; /* Options menu item checkmark */
108ext XtTranslations NoTextSearchAndReplace; /* no-op ^S and ^R in Text */
109
110ext struct _LastInput {
111    Window win;
112    int x;
113    int y;
114} lastInput;
115
116ext Boolean     subProcessRunning; /* interlock for DoCommand/CheckMail */
117
118#define PNullSource (NullSource != NULL ? NullSource : \
119(NullSource = (Widget)  CreateFileSource(scrn->viewlabel, "/dev/null", False)))
120
121
122typedef struct _XmhMenuEntry {
123    char        *name;                  /* menu entry name */
124    void        (*function)();          /* menu entry callback function */
125} XmhMenuEntryRec, *XmhMenuEntry;       
126
127
128typedef struct _XmhMenuButtonDesc {
129    char        *button_name;           /* menu button name */
130    char        *menu_name;             /* menu name */
131    int         id;                     /* an internal key */
132    XmhMenuEntry entry;                 /* list of menu entries */
133    Cardinal    num_entries;            /* count of menu entries in list */
134} XmhMenuButtonDescRec, *XmhMenuButtonDesc;
135
136
137extern XmhMenuEntryRec  folderMenu[];
138extern XmhMenuEntryRec  tocMenu[];
139extern XmhMenuEntryRec  messageMenu[];
140extern XmhMenuEntryRec  sequenceMenu[];
141extern XmhMenuEntryRec  viewMenu[];
142extern XmhMenuEntryRec  optionMenu[];
143
144extern XmhMenuButtonDescRec     MenuBoxButtons[];
145
146/* Used as indices into MenuBoxButtons; these must correspond. */
147
148#define XMH_FOLDER      0
149#define XMH_TOC         1
150#define XMH_MESSAGE     2
151#define XMH_SEQUENCE    3
152#define XMH_VIEW        4
153#define XMH_OPTION      5
154
Note: See TracBrowser for help on using the repository browser.