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