data.h revision e39b573c
1/* $XTermId: data.h,v 1.119 2011/07/12 08:37:24 tom Exp $ */ 2 3/* 4 * Copyright 2002-2009,2011 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; 112 113#if defined(HAVE_XKB_BELL_EXT) 114#include <X11/XKBlib.h> /* has the prototype */ 115#include <X11/extensions/XKBbells.h> /* has the XkbBI_xxx definitions */ 116#endif 117 118#ifndef XkbBI_Info 119#define XkbBI_Info 0 120#define XkbBI_MinorError 1 121#define XkbBI_MajorError 2 122#define XkbBI_TerminalBell 9 123#define XkbBI_MarginBell 10 124#endif 125 126extern char *ProgramName; 127extern Arg ourTopLevelShellArgs[]; 128extern Cardinal number_ourTopLevelShellArgs; 129extern Atom wm_delete_window; 130 131#if HANDLE_STRUCT_NOTIFY 132/* Flag icon name with "*** " on window output when iconified. 133 * I'd like to do something like reverse video, but I don't 134 * know how to tell this to window managers in general. 135 * 136 * mapstate can be IsUnmapped, !IsUnmapped, or -1; 137 * -1 means no change; the other two are set by event handlers 138 * and indicate a new mapstate. !IsMapped is done in the handler. 139 * we worry about IsUnmapped when output occurs. -IAN! 140 */ 141extern int mapstate; 142#endif /* HANDLE_STRUCT_NOTIFY */ 143 144typedef struct XTERM_RESOURCE { 145 char *icon_geometry; 146 char *title; 147 char *icon_name; 148 char *term_name; 149 char *tty_modes; 150 151 int minBufSize; 152 int maxBufSize; 153 154 Boolean hold_screen; /* true if we keep window open */ 155 Boolean utmpInhibit; 156 Boolean utmpDisplayId; 157 Boolean messages; 158 159 String menuLocale; 160 String omitTranslation; 161 162 String keyboardType; 163 164#if OPT_PRINT_ON_EXIT 165 int printModeNow; 166 int printModeOnXError; 167 int printOptsNow; 168 int printOptsOnXError; 169 String printFileNow; 170 String printFileOnXError; 171#endif 172#if OPT_SUNPC_KBD 173 Boolean sunKeyboard; 174#endif 175#if OPT_HP_FUNC_KEYS 176 Boolean hpFunctionKeys; 177#endif 178#if OPT_SCO_FUNC_KEYS 179 Boolean scoFunctionKeys; 180#endif 181#if OPT_SUN_FUNC_KEYS 182 Boolean sunFunctionKeys; /* %%% should be VT100 widget resource? */ 183#endif 184#if OPT_TCAP_FKEYS 185 Boolean termcapKeys; 186#endif 187 188#if OPT_INITIAL_ERASE 189 Boolean ptyInitialErase; /* if true, use pty's sense of erase char */ 190 Boolean backarrow_is_erase; /* override backspace/delete */ 191#endif 192 Boolean useInsertMode; 193#if OPT_ZICONBEEP 194 int zIconBeep; /* beep level when output while iconified */ 195#endif 196#if OPT_PTY_HANDSHAKE 197 Boolean wait_for_map; 198 Boolean wait_for_map0; /* ...initial value of .wait_for_map */ 199 Boolean ptyHandshake; /* use pty-handshaking */ 200 Boolean ptySttySize; /* reset TTY size after pty handshake */ 201#endif 202#if OPT_SAME_NAME 203 Boolean sameName; /* Don't change the title or icon name if it is 204 * the same. This prevents flicker on the 205 * screen at the cost of an extra request to 206 * the server. 207 */ 208#endif 209#if OPT_SESSION_MGT 210 Boolean sessionMgt; 211#endif 212#if OPT_TOOLBAR 213 Boolean toolBar; 214#endif 215#if OPT_MAXIMIZE 216 Boolean maximized; 217 String fullscreen_s; /* resource for "fullscreen" */ 218 int fullscreen; /* derived from fullscreen_s */ 219#endif 220} XTERM_RESOURCE; 221 222extern XTERM_RESOURCE resource; 223 224#ifdef USE_IGNORE_RC 225extern int ignore_unused; 226#endif 227 228#endif /* included_data_h */ 229