data.h revision d522f475
1/* $XTermId: data.h,v 1.105 2007/07/22 16:03:16 tom Exp $ */
2
3/* $XFree86: xc/programs/xterm/data.h,v 3.39 2006/02/13 01:14:58 dickey Exp $ */
4
5/*
6 * Copyright 2002-2006,2007 by Thomas E. Dickey
7 *
8 *                         All Rights Reserved
9 *
10 * Permission is hereby granted, free of charge, to any person obtaining a
11 * copy of this software and associated documentation files (the
12 * "Software"), to deal in the Software without restriction, including
13 * without limitation the rights to use, copy, modify, merge, publish,
14 * distribute, sublicense, and/or sell copies of the Software, and to
15 * permit persons to whom the Software is furnished to do so, subject to
16 * the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be included
19 * in all copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
25 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 *
29 * Except as contained in this notice, the name(s) of the above copyright
30 * holders shall not be used in advertising or otherwise to promote the
31 * sale, use or other dealings in this Software without prior written
32 * authorization.
33 *
34 * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
35 *
36 *                         All Rights Reserved
37 *
38 * Permission to use, copy, modify, and distribute this software and its
39 * documentation for any purpose and without fee is hereby granted,
40 * provided that the above copyright notice appear in all copies and that
41 * both that copyright notice and this permission notice appear in
42 * supporting documentation, and that the name of Digital Equipment
43 * Corporation not be used in advertising or publicity pertaining to
44 * distribution of the software without specific, written prior permission.
45 *
46 *
47 * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
48 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
49 * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
50 * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
51 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
52 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
53 * SOFTWARE.
54 */
55
56#ifndef included_data_h
57#define included_data_h 1
58
59#include <xterm.h>
60
61extern Widget toplevel;
62
63extern XtAppContext app_con;
64
65#ifdef VMS
66/* actually in vms.c */
67extern int tt_width;
68extern int tt_length;
69extern int tt_changed;
70extern int tt_pasting;
71extern int tt_new_output;
72#define VMS_TERM_BUFFER_SIZE	500
73struct q_head {
74    int flink;
75    int blink;
76};
77extern struct q_head read_queue;
78#endif
79
80#if OPT_TEK4014
81extern Char *Tpushb;
82extern Char *Tpushback;
83extern TekLink *tekRefreshList;
84extern TekWidget tekWidget;
85extern Widget tekshellwidget;
86extern int T_lastx;
87extern int T_lasty;
88extern int Ttoggled;
89extern jmp_buf Tekend;
90#endif
91
92extern char *ptydev;
93extern char *ttydev;
94extern char *xterm_name;
95extern int hold_screen;
96
97extern PtyData *VTbuffer;
98extern int am_slave;
99extern int max_plus1;
100extern jmp_buf VTend;
101
102#ifdef DEBUG
103extern int debug;
104#endif /* DEBUG */
105
106extern PtySelect Select_mask;
107extern PtySelect X_mask;
108extern PtySelect pty_mask;
109
110extern int ice_fd;
111
112extern XtermWidget term;
113
114extern SIG_ATOMIC_T need_cleanup;
115
116#if defined(HAVE_XKB_BELL_EXT)
117#include <X11/XKBlib.h>		/* has the prototype */
118#include <X11/extensions/XKBbells.h>	/* has the XkbBI_xxx definitions */
119#endif
120
121#ifndef XkbBI_Info
122#define	XkbBI_Info			0
123#define	XkbBI_MinorError		1
124#define	XkbBI_MajorError		2
125#define	XkbBI_TerminalBell		9
126#define	XkbBI_MarginBell		10
127#endif
128
129extern char *ProgramName;
130extern Arg ourTopLevelShellArgs[];
131extern Cardinal number_ourTopLevelShellArgs;
132extern Atom wm_delete_window;
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
147typedef struct XTERM_RESOURCE {
148    char *xterm_name;
149    char *icon_geometry;
150    char *title;
151    char *icon_name;
152    char *term_name;
153    char *tty_modes;
154
155    int minBufSize;
156    int maxBufSize;
157
158    Boolean hold_screen;	/* true if we keep window open  */
159    Boolean utmpInhibit;
160    Boolean utmpDisplayId;
161    Boolean messages;
162
163    String menuLocale;
164
165    String keyboardType;
166#if OPT_SUNPC_KBD
167    Boolean sunKeyboard;
168#endif
169#if OPT_HP_FUNC_KEYS
170    Boolean hpFunctionKeys;
171#endif
172#if OPT_SCO_FUNC_KEYS
173    Boolean scoFunctionKeys;
174#endif
175#if OPT_SUN_FUNC_KEYS
176    Boolean sunFunctionKeys;	/* %%% should be VT100 widget resource? */
177#endif
178#if OPT_TCAP_FKEYS
179    Boolean termcapKeys;
180#endif
181
182#if OPT_INITIAL_ERASE
183    Boolean ptyInitialErase;	/* if true, use pty's sense of erase char */
184    Boolean backarrow_is_erase;	/* override backspace/delete */
185#endif
186    Boolean useInsertMode;
187#if OPT_ZICONBEEP
188    int zIconBeep;		/* beep level when output while iconified */
189#endif
190#if OPT_PTY_HANDSHAKE
191    Boolean wait_for_map;
192    Boolean wait_for_map0;	/* ...initial value of .wait_for_map */
193    Boolean ptyHandshake;	/* use pty-handshaking */
194    Boolean ptySttySize;	/* reset TTY size after pty handshake */
195#endif
196#if OPT_SAME_NAME
197    Boolean sameName;		/* Don't change the title or icon name if it is
198				 * the same.  This prevents flicker on the
199				 * screen at the cost of an extra request to
200				 * the server.
201				 */
202#endif
203#if OPT_SESSION_MGT
204    Boolean sessionMgt;
205#endif
206#if OPT_TOOLBAR
207    Boolean toolBar;
208#endif
209} XTERM_RESOURCE;
210
211extern XTERM_RESOURCE resource;
212
213#endif /* included_data_h */
214