data.h revision 20d2c4d2
1/* $XTermId: data.h,v 1.110 2009/10/12 00:33:08 tom Exp $ */
2
3/*
4 * Copyright 2002-2007,2009 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 char *xterm_name;
93extern int hold_screen;
94
95extern PtyData *VTbuffer;
96extern int am_slave;
97extern int max_plus1;
98extern jmp_buf VTend;
99
100#ifdef DEBUG
101extern int debug;
102#endif /* DEBUG */
103
104extern PtySelect Select_mask;
105extern PtySelect X_mask;
106extern PtySelect pty_mask;
107
108extern int ice_fd;
109
110extern XtermWidget term;
111
112extern SIG_ATOMIC_T need_cleanup;
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
145typedef struct XTERM_RESOURCE {
146    char *xterm_name;
147    char *icon_geometry;
148    char *title;
149    char *icon_name;
150    char *term_name;
151    char *tty_modes;
152
153    int minBufSize;
154    int maxBufSize;
155
156    Boolean hold_screen;	/* true if we keep window open  */
157    Boolean utmpInhibit;
158    Boolean utmpDisplayId;
159    Boolean messages;
160
161    String menuLocale;
162
163    String keyboardType;
164#if OPT_SUNPC_KBD
165    Boolean sunKeyboard;
166#endif
167#if OPT_HP_FUNC_KEYS
168    Boolean hpFunctionKeys;
169#endif
170#if OPT_SCO_FUNC_KEYS
171    Boolean scoFunctionKeys;
172#endif
173#if OPT_SUN_FUNC_KEYS
174    Boolean sunFunctionKeys;	/* %%% should be VT100 widget resource? */
175#endif
176#if OPT_TCAP_FKEYS
177    Boolean termcapKeys;
178#endif
179
180#if OPT_INITIAL_ERASE
181    Boolean ptyInitialErase;	/* if true, use pty's sense of erase char */
182    Boolean backarrow_is_erase;	/* override backspace/delete */
183#endif
184    Boolean useInsertMode;
185#if OPT_ZICONBEEP
186    int zIconBeep;		/* beep level when output while iconified */
187#endif
188#if OPT_PTY_HANDSHAKE
189    Boolean wait_for_map;
190    Boolean wait_for_map0;	/* ...initial value of .wait_for_map */
191    Boolean ptyHandshake;	/* use pty-handshaking */
192    Boolean ptySttySize;	/* reset TTY size after pty handshake */
193#endif
194#if OPT_SAME_NAME
195    Boolean sameName;		/* Don't change the title or icon name if it is
196				 * the same.  This prevents flicker on the
197				 * screen at the cost of an extra request to
198				 * the server.
199				 */
200#endif
201#if OPT_SESSION_MGT
202    Boolean sessionMgt;
203#endif
204#if OPT_TOOLBAR
205    Boolean toolBar;
206#endif
207#if OPT_MAXIMIZE
208    Boolean maximized;
209#endif
210} XTERM_RESOURCE;
211
212extern XTERM_RESOURCE resource;
213
214#ifdef USE_IGNORE_RC
215extern int ignore_unused;
216#endif
217
218#endif /* included_data_h */
219