globals.h revision c9e2be55
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 35ext Display *theDisplay; /* Display variable. */ 36ext Widget toplevel; /* The top level widget (A hack %%%). */ 37ext char *progName; /* Program name. */ 38ext char *homeDir; /* User's home directory. */ 39ext Atom wm_protocols; /* WM_PROTOCOLS atom for this display */ 40ext Atom wm_delete_window; /* see ICCCM on Window Deletion */ 41ext Atom wm_save_yourself; /* see ICCCM on session management */ 42ext Atom protocolList[2]; /* contains the two above */ 43 44ext struct _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} app_resources; 94 95ext char *draftFile; /* Filename of draft. */ 96ext char *xmhDraftFile; /* Filename for sending. */ 97ext Toc *folderList; /* Array of folders. */ 98ext int numFolders; /* Number of entries in above array. */ 99ext Toc InitialFolder; /* Toc containing initial folder. */ 100ext Toc DraftsFolder; /* Toc containing drafts. */ 101ext Scrn *scrnList; /* Array of scrns in use. */ 102ext int numScrns; /* Number of scrns in above array. */ 103ext Widget NoMenuForButton;/* Flag menu widget value: no menu */ 104ext Widget LastMenuButtonPressed; /* to `toggle' menu buttons */ 105ext Widget NullSource; /* null text widget source */ 106ext Dimension rootwidth; /* Dimensions of root window. */ 107ext Dimension rootheight; 108ext Pixmap MenuItemBitmap; /* Options menu item checkmark */ 109ext XtTranslations NoTextSearchAndReplace; /* no-op ^S and ^R in Text */ 110 111ext struct _LastInput { 112 Window win; 113 int x; 114 int y; 115} lastInput; 116 117ext Boolean subProcessRunning; /* interlock for DoCommand/CheckMail */ 118 119#define PNullSource (NullSource != NULL ? NullSource : \ 120(NullSource = (Widget) CreateFileSource(scrn->viewlabel, "/dev/null", False))) 121 122 123typedef struct _XmhMenuEntry { 124 char *name; /* menu entry name */ 125 void (*function)(XMH_CB_ARGS); /* menu entry callback function */ 126} XmhMenuEntryRec, *XmhMenuEntry; 127 128 129typedef struct _XmhMenuButtonDesc { 130 char *button_name; /* menu button name */ 131 char *menu_name; /* menu name */ 132 int id; /* an internal key */ 133 XmhMenuEntry entry; /* list of menu entries */ 134 Cardinal num_entries; /* count of menu entries in list */ 135} XmhMenuButtonDescRec, *XmhMenuButtonDesc; 136 137 138extern XmhMenuEntryRec folderMenu[]; 139extern XmhMenuEntryRec tocMenu[]; 140extern XmhMenuEntryRec messageMenu[]; 141extern XmhMenuEntryRec sequenceMenu[]; 142extern XmhMenuEntryRec viewMenu[]; 143extern XmhMenuEntryRec optionMenu[]; 144 145extern XmhMenuButtonDescRec MenuBoxButtons[]; 146 147/* Used as indices into MenuBoxButtons; these must correspond. */ 148 149#define XMH_FOLDER 0 150#define XMH_TOC 1 151#define XMH_MESSAGE 2 152#define XMH_SEQUENCE 3 153#define XMH_VIEW 4 154#define XMH_OPTION 5 155 156/* Bell types Feep() */ 157#ifdef XKB 158#include <X11/extensions/XKBbells.h> 159#else 160#define XkbBI_Info 0 161#define XkbBI_MinorError 1 162#define XkbBI_MajorError 2 163#define XkbBI_Failure 6 164#define XkbBI_Wait 7 165#define XkbBI_NewMail 12 166#endif 167