data.h revision ad37e533
1/* $XTermId: data.h,v 1.139 2021/03/09 01:08:15 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 107extern int ice_fd; 108 109extern XtermWidget term; 110 111extern SIG_ATOMIC_T need_cleanup; 112extern SIG_ATOMIC_T caught_intr; 113 114#if defined(HAVE_XKB_BELL_EXT) 115#include <X11/XKBlib.h> /* has the prototype */ 116#include <X11/extensions/XKBbells.h> /* has the XkbBI_xxx definitions */ 117#endif 118 119#ifndef XkbBI_Info 120#define XkbBI_Info 0 121#define XkbBI_MinorError 1 122#define XkbBI_MajorError 2 123#define XkbBI_TerminalBell 9 124#define XkbBI_MarginBell 10 125#endif 126 127extern char *ProgramName; 128extern Arg ourTopLevelShellArgs[]; 129extern Cardinal number_ourTopLevelShellArgs; 130extern Atom wm_delete_window; 131 132extern CellColor initCColor; 133 134#if HANDLE_STRUCT_NOTIFY 135/* Flag icon name with "*** " on window output when iconified. 136 * I'd like to do something like reverse video, but I don't 137 * know how to tell this to window managers in general. 138 * 139 * mapstate can be IsUnmapped, !IsUnmapped, or -1; 140 * -1 means no change; the other two are set by event handlers 141 * and indicate a new mapstate. !IsMapped is done in the handler. 142 * we worry about IsUnmapped when output occurs. -IAN! 143 */ 144extern int mapstate; 145#endif /* HANDLE_STRUCT_NOTIFY */ 146 147#ifdef HAVE_LIB_XCURSOR 148extern char *xterm_cursor_theme; 149#endif 150 151typedef struct XTERM_RESOURCE { 152 char *icon_geometry; 153 char *title; 154 char *icon_hint; 155 char *icon_name; 156 char *term_name; 157 char *tty_modes; 158 char *valid_shells; 159 160 int minBufSize; 161 int maxBufSize; 162 163 Boolean hold_screen; /* true if we keep window open */ 164 Boolean utmpInhibit; 165 Boolean utmpDisplayId; 166 Boolean messages; 167 168#ifdef HAVE_LIB_XCURSOR 169 String cursorTheme; 170#endif 171 172 String menuLocale; 173 String omitTranslation; 174 175 String keyboardType; 176 177#if OPT_PRINT_ON_EXIT 178 int printModeNow; 179 int printModeOnXError; 180 int printOptsNow; 181 int printOptsOnXError; 182 String printFileNow; 183 String printFileOnXError; 184#endif 185 186 Boolean oldKeyboard; /* placeholder for decode_keyboard_type */ 187#if OPT_SUNPC_KBD 188 Boolean sunKeyboard; 189#endif 190#if OPT_HP_FUNC_KEYS 191 Boolean hpFunctionKeys; 192#endif 193#if OPT_SCO_FUNC_KEYS 194 Boolean scoFunctionKeys; 195#endif 196#if OPT_SUN_FUNC_KEYS 197 Boolean sunFunctionKeys; /* %%% should be VT100 widget resource? */ 198#endif 199#if OPT_TCAP_FKEYS 200 Boolean termcapKeys; 201#endif 202 203#if OPT_INITIAL_ERASE 204 Boolean ptyInitialErase; /* if true, use pty's sense of erase char */ 205 Boolean backarrow_is_erase; /* override backspace/delete */ 206#endif 207 Boolean useInsertMode; 208#if OPT_ZICONBEEP 209 int zIconBeep; /* beep level when output while iconified */ 210 char *zIconFormat; /* format for icon name */ 211#endif 212#if OPT_PTY_HANDSHAKE 213 Boolean wait_for_map; 214 Boolean wait_for_map0; /* ...initial value of .wait_for_map */ 215 Boolean ptyHandshake; /* use pty-handshaking */ 216 Boolean ptySttySize; /* reset TTY size after pty handshake */ 217#endif 218#if OPT_REPORT_CCLASS 219 Boolean reportCClass; /* show character-class information */ 220#endif 221#if OPT_REPORT_COLORS 222 Boolean reportColors; /* show color information as allocated */ 223#endif 224#if OPT_REPORT_FONTS 225 Boolean reportFonts; /* show bitmap-font information as loaded */ 226#endif 227#if OPT_XRES_QUERY 228 Boolean reportXRes; /* show vt100 resources after initialization */ 229#endif 230#if OPT_REPORT_ICONS 231 Boolean reportIcons; /* show icon information as loaded */ 232#endif 233#if OPT_SAME_NAME 234 Boolean sameName; /* Don't change the title or icon name if it is 235 * the same. This prevents flicker on the 236 * screen at the cost of an extra request to 237 * the server. 238 */ 239#endif 240#if OPT_SESSION_MGT 241 Boolean sessionMgt; 242#endif 243#if OPT_TOOLBAR 244 Boolean toolBar; 245#endif 246#if OPT_MAXIMIZE 247 Boolean maximized; 248 String fullscreen_s; /* resource for "fullscreen" */ 249 int fullscreen; /* derived from fullscreen_s */ 250#endif 251#if USE_DOUBLE_BUFFER 252 Boolean buffered; 253 int buffered_fps; 254#endif 255} XTERM_RESOURCE; 256 257extern Boolean guard_keyboard_type; 258extern XTERM_RESOURCE resource; 259 260#ifdef USE_IGNORE_RC 261extern int ignore_unused; 262#endif 263 264#endif /* included_data_h */ 265