data.h revision ae137402
1/* $XTermId: data.h,v 1.141 2021/05/27 22:29:12 tom Exp $ */ 2 3/* 4 * Copyright 2002-2019,2021 by Thomas E. Dickey 5 * 6 * All Rights Reserved 7 * 8 * Permission is hereby granted, free of charge, to any person obtaining a 9 * copy of this software and associated documentation files (the 10 * "Software"), to deal in the Software without restriction, including 11 * without limitation the rights to use, copy, modify, merge, publish, 12 * distribute, sublicense, and/or sell copies of the Software, and to 13 * permit persons to whom the Software is furnished to do so, subject to 14 * the following conditions: 15 * 16 * The above copyright notice and this permission notice shall be included 17 * in all copies or substantial portions of the Software. 18 * 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 23 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 * 27 * Except as contained in this notice, the name(s) of the above copyright 28 * holders shall not be used in advertising or otherwise to promote the 29 * sale, use or other dealings in this Software without prior written 30 * authorization. 31 * 32 * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. 33 * 34 * All Rights Reserved 35 * 36 * Permission to use, copy, modify, and distribute this software and its 37 * documentation for any purpose and without fee is hereby granted, 38 * provided that the above copyright notice appear in all copies and that 39 * both that copyright notice and this permission notice appear in 40 * supporting documentation, and that the name of Digital Equipment 41 * Corporation not be used in advertising or publicity pertaining to 42 * distribution of the software without specific, written prior permission. 43 * 44 * 45 * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 46 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 47 * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 48 * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 49 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 50 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 51 * SOFTWARE. 52 */ 53 54#ifndef included_data_h 55#define included_data_h 1 56 57#include <xterm.h> 58 59extern Widget toplevel; 60 61extern XtAppContext app_con; 62 63#ifdef VMS 64/* actually in vms.c */ 65extern int tt_width; 66extern int tt_length; 67extern int tt_changed; 68extern int tt_pasting; 69extern int tt_new_output; 70#define VMS_TERM_BUFFER_SIZE 500 71struct q_head { 72 int flink; 73 int blink; 74}; 75extern struct q_head read_queue; 76#endif 77 78#if OPT_TEK4014 79extern Char *Tpushb; 80extern Char *Tpushback; 81extern TekLink *tekRefreshList; 82extern TekWidget tekWidget; 83extern Widget tekshellwidget; 84extern int T_lastx; 85extern int T_lasty; 86extern int Ttoggled; 87extern jmp_buf Tekend; 88#endif 89 90extern char *ptydev; 91extern char *ttydev; 92extern int hold_screen; 93 94extern PtyData *VTbuffer; 95extern int am_slave; 96extern int max_plus1; 97extern jmp_buf VTend; 98 99#ifdef DEBUG 100extern int debug; 101#endif /* DEBUG */ 102 103extern PtySelect Select_mask; 104extern PtySelect X_mask; 105extern PtySelect pty_mask; 106 107#if OPT_SESSION_MGT 108extern int ice_fd; 109extern char **restart_command; 110#endif 111 112extern int restart_params; 113 114extern XtermWidget term; 115 116extern SIG_ATOMIC_T need_cleanup; 117extern SIG_ATOMIC_T caught_intr; 118 119#if defined(HAVE_XKB_BELL_EXT) 120#include <X11/XKBlib.h> /* has the prototype */ 121#include <X11/extensions/XKBbells.h> /* has the XkbBI_xxx definitions */ 122#endif 123 124#ifndef XkbBI_Info 125#define XkbBI_Info 0 126#define XkbBI_MinorError 1 127#define XkbBI_MajorError 2 128#define XkbBI_TerminalBell 9 129#define XkbBI_MarginBell 10 130#endif 131 132extern char *ProgramName; /* just the last part of name, maybe alias */ 133extern char *ProgramPath; /* full pathname which can be executed */ 134extern Arg ourTopLevelShellArgs[]; 135extern Cardinal number_ourTopLevelShellArgs; 136extern Atom wm_delete_window; 137 138extern CellColor initCColor; 139 140#if HANDLE_STRUCT_NOTIFY 141/* Flag icon name with "*** " on window output when iconified. 142 * I'd like to do something like reverse video, but I don't 143 * know how to tell this to window managers in general. 144 * 145 * mapstate can be IsUnmapped, !IsUnmapped, or -1; 146 * -1 means no change; the other two are set by event handlers 147 * and indicate a new mapstate. !IsMapped is done in the handler. 148 * we worry about IsUnmapped when output occurs. -IAN! 149 */ 150extern int mapstate; 151#endif /* HANDLE_STRUCT_NOTIFY */ 152 153#ifdef HAVE_LIB_XCURSOR 154extern char *xterm_cursor_theme; 155#endif 156 157typedef struct XTERM_RESOURCE { 158 char *icon_geometry; 159 char *title; 160 char *icon_hint; 161 char *icon_name; 162 char *term_name; 163 char *tty_modes; 164 char *valid_shells; 165 166 int minBufSize; 167 int maxBufSize; 168 169 Boolean hold_screen; /* true if we keep window open */ 170 Boolean utmpInhibit; 171 Boolean utmpDisplayId; 172 Boolean messages; 173 174#ifdef HAVE_LIB_XCURSOR 175 String cursorTheme; 176#endif 177 178 String menuLocale; 179 String omitTranslation; 180 181 String keyboardType; 182 183#if OPT_PRINT_ON_EXIT 184 int printModeNow; 185 int printModeOnXError; 186 int printOptsNow; 187 int printOptsOnXError; 188 String printFileNow; 189 String printFileOnXError; 190#endif 191 192 Boolean oldKeyboard; /* placeholder for decode_keyboard_type */ 193#if OPT_SUNPC_KBD 194 Boolean sunKeyboard; 195#endif 196#if OPT_HP_FUNC_KEYS 197 Boolean hpFunctionKeys; 198#endif 199#if OPT_SCO_FUNC_KEYS 200 Boolean scoFunctionKeys; 201#endif 202#if OPT_SUN_FUNC_KEYS 203 Boolean sunFunctionKeys; /* %%% should be VT100 widget resource? */ 204#endif 205#if OPT_TCAP_FKEYS 206 Boolean termcapKeys; 207#endif 208 209#if OPT_INITIAL_ERASE 210 Boolean ptyInitialErase; /* if true, use pty's sense of erase char */ 211 Boolean backarrow_is_erase; /* override backspace/delete */ 212#endif 213 Boolean useInsertMode; 214#if OPT_ZICONBEEP 215 int zIconBeep; /* beep level when output while iconified */ 216 char *zIconFormat; /* format for icon name */ 217#endif 218#if OPT_PTY_HANDSHAKE 219 Boolean wait_for_map; 220 Boolean wait_for_map0; /* ...initial value of .wait_for_map */ 221 Boolean ptyHandshake; /* use pty-handshaking */ 222 Boolean ptySttySize; /* reset TTY size after pty handshake */ 223#endif 224#if OPT_REPORT_CCLASS 225 Boolean reportCClass; /* show character-class information */ 226#endif 227#if OPT_REPORT_COLORS 228 Boolean reportColors; /* show color information as allocated */ 229#endif 230#if OPT_REPORT_FONTS 231 Boolean reportFonts; /* show bitmap-font information as loaded */ 232#endif 233#if OPT_XRES_QUERY 234 Boolean reportXRes; /* show vt100 resources after initialization */ 235#endif 236#if OPT_REPORT_ICONS 237 Boolean reportIcons; /* show icon information as loaded */ 238#endif 239#if OPT_SAME_NAME 240 Boolean sameName; /* Don't change the title or icon name if it is 241 * the same. This prevents flicker on the 242 * screen at the cost of an extra request to 243 * the server. 244 */ 245#endif 246#if OPT_SESSION_MGT 247 Boolean sessionMgt; 248#endif 249#if OPT_TOOLBAR 250 Boolean toolBar; 251#endif 252#if OPT_MAXIMIZE 253 Boolean maximized; 254 String fullscreen_s; /* resource for "fullscreen" */ 255 int fullscreen; /* derived from fullscreen_s */ 256#endif 257#if USE_DOUBLE_BUFFER 258 Boolean buffered; 259 int buffered_fps; 260#endif 261} XTERM_RESOURCE; 262 263extern Boolean guard_keyboard_type; 264extern XTERM_RESOURCE resource; 265 266#ifdef USE_IGNORE_RC 267extern int ignore_unused; 268#endif 269 270#endif /* included_data_h */ 271