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