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