1/* $XTermId: data.h,v 1.143 2024/09/30 07:48:05 tom Exp $ */
2
3/*
4 * Copyright 2002-2021,2024 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#if OPT_TEK4014
64extern Char *Tpushb;
65extern Char *Tpushback;
66extern TekLink *tekRefreshList;
67extern TekWidget tekWidget;
68extern Widget tekshellwidget;
69extern int T_lastx;
70extern int T_lasty;
71extern int Ttoggled;
72extern jmp_buf Tekend;
73#endif
74
75extern char *ptydev;
76extern char *ttydev;
77extern int hold_screen;
78
79extern PtyData *VTbuffer;
80extern int am_slave;
81extern int max_plus1;
82extern jmp_buf VTend;
83
84#ifdef DEBUG
85extern int debug;
86#endif /* DEBUG */
87
88extern PtySelect Select_mask;
89extern PtySelect X_mask;
90extern PtySelect pty_mask;
91
92#if OPT_SESSION_MGT
93extern int ice_fd;
94extern char **restart_command;
95#endif
96
97extern int restart_params;
98
99extern XtermWidget term;
100
101extern SIG_ATOMIC_T need_cleanup;
102extern SIG_ATOMIC_T caught_intr;
103
104#if defined(HAVE_XKB_BELL_EXT)
105#include <X11/XKBlib.h>		/* has the prototype */
106#include <X11/extensions/XKBbells.h>	/* has the XkbBI_xxx definitions */
107#endif
108
109#ifndef XkbBI_Info
110#define	XkbBI_Info			0
111#define	XkbBI_MinorError		1
112#define	XkbBI_MajorError		2
113#define	XkbBI_TerminalBell		9
114#define	XkbBI_MarginBell		10
115#endif
116
117extern char *ProgramName;	/* just the last part of name, maybe alias */
118extern char *ProgramPath;	/* full pathname which can be executed */
119extern Arg ourTopLevelShellArgs[];
120extern Cardinal number_ourTopLevelShellArgs;
121extern Atom wm_delete_window;
122
123extern CellColor initCColor;
124
125#if HANDLE_STRUCT_NOTIFY
126/* Flag icon name with "*** "  on window output when iconified.
127 * I'd like to do something like reverse video, but I don't
128 * know how to tell this to window managers in general.
129 *
130 * mapstate can be IsUnmapped, !IsUnmapped, or -1;
131 * -1 means no change; the other two are set by event handlers
132 * and indicate a new mapstate.  !IsMapped is done in the handler.
133 * we worry about IsUnmapped when output occurs.  -IAN!
134 */
135extern int mapstate;
136#endif /* HANDLE_STRUCT_NOTIFY */
137
138#ifdef HAVE_LIB_XCURSOR
139extern char *xterm_cursor_theme;
140#endif
141
142typedef struct XTERM_RESOURCE {
143    char *icon_geometry;
144    char *title;
145    char *icon_hint;
146    char *icon_name;
147    char *term_name;
148    char *tty_modes;
149    char *valid_shells;
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    Boolean notMapped;
159
160#ifdef HAVE_LIB_XCURSOR
161    String cursorTheme;
162#endif
163
164    String menuLocale;
165    String omitTranslation;
166
167    String keyboardType;
168
169#if OPT_PRINT_ON_EXIT
170    int printModeNow;
171    int printModeOnXError;
172    int printOptsNow;
173    int printOptsOnXError;
174    String printFileNow;
175    String printFileOnXError;
176#endif
177
178    Boolean oldKeyboard;	/* placeholder for decode_keyboard_type */
179#if OPT_SUNPC_KBD
180    Boolean sunKeyboard;
181#endif
182#if OPT_HP_FUNC_KEYS
183    Boolean hpFunctionKeys;
184#endif
185#if OPT_SCO_FUNC_KEYS
186    Boolean scoFunctionKeys;
187#endif
188#if OPT_SUN_FUNC_KEYS
189    Boolean sunFunctionKeys;	/* %%% should be VT100 widget resource? */
190#endif
191#if OPT_TCAP_FKEYS
192    Boolean termcapKeys;
193#endif
194
195#if OPT_INITIAL_ERASE
196    Boolean ptyInitialErase;	/* if true, use pty's sense of erase char */
197    Boolean backarrow_is_erase;	/* override backspace/delete */
198#endif
199    Boolean useInsertMode;
200#if OPT_ZICONBEEP
201    int zIconBeep;		/* beep level when output while iconified */
202    char *zIconFormat;		/* format for icon name */
203#endif
204#if OPT_PTY_HANDSHAKE
205    Boolean wait_for_map;
206    Boolean wait_for_map0;	/* ...initial value of .wait_for_map */
207    Boolean ptyHandshake;	/* use pty-handshaking */
208    Boolean ptySttySize;	/* reset TTY size after pty handshake */
209#endif
210#if OPT_REPORT_CCLASS
211    Boolean reportCClass;	/* show character-class information */
212#endif
213#if OPT_REPORT_COLORS
214    Boolean reportColors;	/* show color information as allocated */
215#endif
216#if OPT_REPORT_FONTS
217    Boolean reportFonts;	/* show bitmap-font information as loaded */
218#endif
219#if OPT_XRES_QUERY
220    Boolean reportXRes;		/* show vt100 resources after initialization */
221#endif
222#if OPT_REPORT_ICONS
223    Boolean reportIcons;	/* show icon information as loaded */
224#endif
225#if OPT_SAME_NAME
226    Boolean sameName;		/* Don't change the title or icon name if it is
227				 * the same.  This prevents flicker on the
228				 * screen at the cost of an extra request to
229				 * the server.
230				 */
231#endif
232#if OPT_SESSION_MGT
233    Boolean sessionMgt;
234#endif
235#if OPT_TOOLBAR
236    Boolean toolBar;
237#endif
238#if OPT_MAXIMIZE
239    Boolean maximized;
240    String fullscreen_s;	/* resource for "fullscreen" */
241    int fullscreen;		/* derived from fullscreen_s */
242#endif
243#if USE_DOUBLE_BUFFER
244    Boolean buffered;
245    int buffered_fps;
246#endif
247} XTERM_RESOURCE;
248
249extern Boolean guard_keyboard_type;
250extern XTERM_RESOURCE resource;
251
252#ifdef USE_IGNORE_RC
253extern int ignore_unused;
254#endif
255
256#endif /* included_data_h */
257