data.h revision 913cc679
1/* $XTermId: data.h,v 1.130 2017/05/31 01:13:01 tom Exp $ */ 2 3/* 4 * Copyright 2002-2016,2017 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 132#if HANDLE_STRUCT_NOTIFY 133/* Flag icon name with "*** " on window output when iconified. 134 * I'd like to do something like reverse video, but I don't 135 * know how to tell this to window managers in general. 136 * 137 * mapstate can be IsUnmapped, !IsUnmapped, or -1; 138 * -1 means no change; the other two are set by event handlers 139 * and indicate a new mapstate. !IsMapped is done in the handler. 140 * we worry about IsUnmapped when output occurs. -IAN! 141 */ 142extern int mapstate; 143#endif /* HANDLE_STRUCT_NOTIFY */ 144 145#ifdef HAVE_LIB_XCURSOR 146extern char *xterm_cursor_theme; 147#endif 148 149typedef struct XTERM_RESOURCE { 150 char *icon_geometry; 151 char *title; 152 char *icon_hint; 153 char *icon_name; 154 char *term_name; 155 char *tty_modes; 156 157 int minBufSize; 158 int maxBufSize; 159 160 Boolean hold_screen; /* true if we keep window open */ 161 Boolean utmpInhibit; 162 Boolean utmpDisplayId; 163 Boolean messages; 164 165 String menuLocale; 166 String omitTranslation; 167 168 String keyboardType; 169 170#if OPT_PRINT_ON_EXIT 171 int printModeNow; 172 int printModeOnXError; 173 int printOptsNow; 174 int printOptsOnXError; 175 String printFileNow; 176 String printFileOnXError; 177#endif 178 179 Boolean oldKeyboard; /* placeholder for decode_keyboard_type */ 180#if OPT_SUNPC_KBD 181 Boolean sunKeyboard; 182#endif 183#if OPT_HP_FUNC_KEYS 184 Boolean hpFunctionKeys; 185#endif 186#if OPT_SCO_FUNC_KEYS 187 Boolean scoFunctionKeys; 188#endif 189#if OPT_SUN_FUNC_KEYS 190 Boolean sunFunctionKeys; /* %%% should be VT100 widget resource? */ 191#endif 192#if OPT_TCAP_FKEYS 193 Boolean termcapKeys; 194#endif 195 196#if OPT_INITIAL_ERASE 197 Boolean ptyInitialErase; /* if true, use pty's sense of erase char */ 198 Boolean backarrow_is_erase; /* override backspace/delete */ 199#endif 200 Boolean useInsertMode; 201#if OPT_ZICONBEEP 202 int zIconBeep; /* beep level when output while iconified */ 203 char *zIconFormat; /* format for icon name */ 204#endif 205#if OPT_PTY_HANDSHAKE 206 Boolean wait_for_map; 207 Boolean wait_for_map0; /* ...initial value of .wait_for_map */ 208 Boolean ptyHandshake; /* use pty-handshaking */ 209 Boolean ptySttySize; /* reset TTY size after pty handshake */ 210#endif 211#if OPT_REPORT_CCLASS 212 Boolean reportCClass; /* show character-class information */ 213#endif 214#if OPT_REPORT_COLORS 215 Boolean reportColors; /* show color information as allocated */ 216#endif 217#if OPT_REPORT_FONTS 218 Boolean reportFonts; /* show bitmap-font information as loaded */ 219#endif 220#if OPT_SAME_NAME 221 Boolean sameName; /* Don't change the title or icon name if it is 222 * the same. This prevents flicker on the 223 * screen at the cost of an extra request to 224 * the server. 225 */ 226#endif 227#if OPT_SESSION_MGT 228 Boolean sessionMgt; 229#endif 230#if OPT_TOOLBAR 231 Boolean toolBar; 232#endif 233#if OPT_MAXIMIZE 234 Boolean maximized; 235 String fullscreen_s; /* resource for "fullscreen" */ 236 int fullscreen; /* derived from fullscreen_s */ 237#endif 238} XTERM_RESOURCE; 239 240extern Boolean guard_keyboard_type; 241extern XTERM_RESOURCE resource; 242 243#ifdef USE_IGNORE_RC 244extern int ignore_unused; 245#endif 246 247#endif /* included_data_h */ 248