1190d7dceSmrg/* $XTermId: xterm.h,v 1.959 2025/01/05 21:15:01 tom Exp $ */ 2d522f475Smrg 30bd37d32Smrg/* 4190d7dceSmrg * Copyright 1999-2024,2025 by Thomas E. Dickey 50bd37d32Smrg * 60bd37d32Smrg * All Rights Reserved 70bd37d32Smrg * 80bd37d32Smrg * Permission is hereby granted, free of charge, to any person obtaining a 90bd37d32Smrg * copy of this software and associated documentation files (the 100bd37d32Smrg * "Software"), to deal in the Software without restriction, including 110bd37d32Smrg * without limitation the rights to use, copy, modify, merge, publish, 120bd37d32Smrg * distribute, sublicense, and/or sell copies of the Software, and to 130bd37d32Smrg * permit persons to whom the Software is furnished to do so, subject to 140bd37d32Smrg * the following conditions: 150bd37d32Smrg * 160bd37d32Smrg * The above copyright notice and this permission notice shall be included 170bd37d32Smrg * in all copies or substantial portions of the Software. 180bd37d32Smrg * 190bd37d32Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 200bd37d32Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 210bd37d32Smrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 220bd37d32Smrg * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 230bd37d32Smrg * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 240bd37d32Smrg * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 250bd37d32Smrg * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 260bd37d32Smrg * 270bd37d32Smrg * Except as contained in this notice, the name(s) of the above copyright 280bd37d32Smrg * holders shall not be used in advertising or otherwise to promote the 290bd37d32Smrg * sale, use or other dealings in this Software without prior written 300bd37d32Smrg * authorization. 310bd37d32Smrg */ 32d522f475Smrg 33d522f475Smrg/* 34d522f475Smrg * Common/useful definitions for XTERM application. 35d522f475Smrg * 36d522f475Smrg * This is also where we put the fallback definitions if we do not build using 37d522f475Smrg * the configure script. 38d522f475Smrg */ 39d522f475Smrg#ifndef included_xterm_h 40d522f475Smrg#define included_xterm_h 41a1f3da82Smrg/* *INDENT-OFF* */ 42d522f475Smrg 43d522f475Smrg#ifdef HAVE_CONFIG_H 44d522f475Smrg#include <xtermcfg.h> 45d522f475Smrg#endif 46d522f475Smrg 470bd37d32Smrg#undef bcopy 48d522f475Smrg#include <X11/Xos.h> 49d522f475Smrg 50d522f475Smrg#ifndef HAVE_CONFIG_H 51d522f475Smrg 52d522f475Smrg#define HAVE_LIB_XAW 1 53d522f475Smrg 54d522f475Smrg#ifdef CSRG_BASED 55d522f475Smrg/* Get definition of BSD */ 56d522f475Smrg#include <sys/param.h> 57d522f475Smrg#endif 58d522f475Smrg 59d522f475Smrg#ifndef DFT_TERMTYPE 60d522f475Smrg#define DFT_TERMTYPE "xterm" 61d522f475Smrg#endif 62d522f475Smrg 63d522f475Smrg#ifndef X_NOT_POSIX 64d522f475Smrg#define HAVE_WAITPID 1 65d522f475Smrg#define HAVE_SYS_WAIT_H 1 66d522f475Smrg#define HAVE_UNISTD_H 1 67d522f475Smrg#endif 68d522f475Smrg 69d522f475Smrg#define HAVE_STDLIB_H 1 70d522f475Smrg 71d522f475Smrg#if defined(sun) 72d522f475Smrg/* errno is declared in <errno.h> */ 73d522f475Smrg#else 74d522f475Smrg#define DECL_ERRNO 1 75d522f475Smrg#endif 76d522f475Smrg 77d522f475Smrg#undef DECL_PTSNAME /* ptsname() is normally in stdlib.h */ 78d522f475Smrg 79d522f475Smrg#ifndef NOPUTENV 80d522f475Smrg#define HAVE_PUTENV 1 81d522f475Smrg#endif 82d522f475Smrg 8301037d57Smrg#if defined(CSRG_BASED) || defined(__GNU__) || defined(__minix) 84d522f475Smrg#define USE_POSIX_TERMIOS 1 85d522f475Smrg#endif 86d522f475Smrg 87894e0ac8Smrg#ifdef __FreeBSD__ 88913cc679Smrg#if __FreeBSD_version >= 900000 89894e0ac8Smrg#define USE_SYSV_UTMP 1 90894e0ac8Smrg#define UTMPX_FOR_UTMP 1 91894e0ac8Smrg#define HAVE_UTMP_UT_HOST 1 92894e0ac8Smrg#define HAVE_UTMP_UT_XTIME 1 93894e0ac8Smrg#define ut_name ut_user 94894e0ac8Smrg#define ut_xtime ut_tv.tv_sec 95894e0ac8Smrg#endif 96894e0ac8Smrg#endif 97894e0ac8Smrg 98d522f475Smrg#ifdef __NetBSD__ 99d522f475Smrg#if __NetBSD_Version__ >= 106030000 /* 1.6C */ 100d522f475Smrg#define BSD_UTMPX 1 101d522f475Smrg#define ut_xtime ut_tv.tv_sec 102d522f475Smrg#endif 103d522f475Smrg#endif 104d522f475Smrg 105d522f475Smrg#if defined(hpux) && !defined(__hpux) 106d522f475Smrg#define __hpux 1 /* HPUX 11.0 does not define this */ 107d522f475Smrg#endif 108d522f475Smrg 109d522f475Smrg#if !defined(__SCO__) && (defined(SCO) || defined(sco) || defined(SCO325)) 110d522f475Smrg#define __SCO__ 1 111d522f475Smrg#endif 112d522f475Smrg 113d522f475Smrg#ifdef USE_POSIX_TERMIOS 114d522f475Smrg#define HAVE_TERMIOS_H 1 115d522f475Smrg#define HAVE_TCGETATTR 1 116d522f475Smrg#endif 117d522f475Smrg 11801037d57Smrg#if defined(__SCO__) || defined(__UNIXWARE__) || defined(__minix) 119d522f475Smrg#define USE_TERMCAP 1 120d522f475Smrg#endif 121d522f475Smrg 122d522f475Smrg#if defined(UTMP) 123d522f475Smrg#define HAVE_UTMP 1 124d522f475Smrg#endif 125d522f475Smrg 126190d7dceSmrg#if (defined(SVR4) || defined(__SCO__) || defined(BSD_UTMPX)) && !defined(__CYGWIN__) 127d522f475Smrg#define UTMPX_FOR_UTMP 1 128d522f475Smrg#endif 129d522f475Smrg 130d522f475Smrg#if !defined(ISC) && !defined(__QNX__) 131d522f475Smrg#define HAVE_UTMP_UT_HOST 1 132d522f475Smrg#endif 133d522f475Smrg 134190d7dceSmrg#if defined(UTMPX_FOR_UTMP) && !(defined(__hpux) || defined(__FreeBSD__)) 135d522f475Smrg#define HAVE_UTMP_UT_SESSION 1 136d522f475Smrg#endif 137d522f475Smrg 138980988aeSmrg#if !(defined(__linux__) && (!defined(__GLIBC__) || (__GLIBC__ < 2))) && !defined(SVR4) && !defined(__FreeBSD__) 139d522f475Smrg#define ut_xstatus ut_exit.e_exit 140d522f475Smrg#endif 141d522f475Smrg 142980988aeSmrg#if defined(SVR4) || defined(__SCO__) || defined(BSD_UTMPX) || (defined(__linux__) && defined(__GLIBC__) && (__GLIBC__ >= 2) && !(defined(__powerpc__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0))) 143d522f475Smrg#define HAVE_UTMP_UT_XTIME 1 144d522f475Smrg#endif 145d522f475Smrg 146980988aeSmrg#if defined(__linux__) || defined(__CYGWIN__) 147d522f475Smrg#define USE_LASTLOG 148d522f475Smrg#define HAVE_LASTLOG_H 149d522f475Smrg#define USE_STRUCT_LASTLOG 150d522f475Smrg#elif defined(BSD) && (BSD >= 199103) 151d522f475Smrg#ifdef BSD_UTMPX 152d522f475Smrg#define USE_LASTLOGX 153894e0ac8Smrg#elif defined(USE_SYSV_UTMP) 154d522f475Smrg#else 155d522f475Smrg#define USE_LASTLOG 156d522f475Smrg#define USE_STRUCT_LASTLOG 157d522f475Smrg#endif 158d522f475Smrg#endif 159d522f475Smrg 160d522f475Smrg#if defined(__OpenBSD__) 161d522f475Smrg#define DEFDELETE_DEL True 162d522f475Smrg#define DEF_BACKARO_ERASE True 163d522f475Smrg#define DEF_INITIAL_ERASE True 164d522f475Smrg#endif 165d522f475Smrg 166d522f475Smrg#if defined(__SCO__) || defined(__UNIXWARE__) 167d522f475Smrg#define DEFDELETE_DEL True 168d522f475Smrg#define OPT_SCO_FUNC_KEYS 1 169d522f475Smrg#endif 170d522f475Smrg 171980988aeSmrg#if defined(__SCO__) || defined(SVR4) || defined(_POSIX_VERSION) || defined(__QNX__) || defined(__hpux) || (defined(BSD) && (BSD >= 199103)) || defined(__CYGWIN__) 172d522f475Smrg#define USE_POSIX_WAIT 173d522f475Smrg#endif 174d522f475Smrg 175190d7dceSmrg#if defined(AIXV3) || defined(CRAY) || defined(__SCO__) || defined(SVR4) || (defined(SYSV) && defined(i386)) || defined(__hpux) || defined(__osf__) || defined(__linux__) || defined(macII) || defined(BSD_UTMPX) 176d522f475Smrg#define USE_SYSV_UTMP 177d522f475Smrg#endif 178d522f475Smrg 179190d7dceSmrg#if defined(__GNU__) || defined(__osf__) 180d522f475Smrg#define USE_TTY_GROUP 181d522f475Smrg#endif 182d522f475Smrg 183d522f475Smrg#if defined(__CYGWIN__) 184d522f475Smrg#define HAVE_NCURSES_TERM_H 1 185d522f475Smrg#endif 186d522f475Smrg 187d522f475Smrg#ifdef __osf__ 188d522f475Smrg#define TTY_GROUP_NAME "terminal" 189d522f475Smrg#endif 190d522f475Smrg 191d522f475Smrg#if defined(ut_xstatus) 192d522f475Smrg#define HAVE_UTMP_UT_XSTATUS 1 193d522f475Smrg#endif 194d522f475Smrg 195d522f475Smrg#if defined(XKB) 196d522f475Smrg#define HAVE_XKB_BELL_EXT 1 197d522f475Smrg#endif 198d522f475Smrg 199980988aeSmrg#if (defined(SVR4) && !defined(__CYGWIN__)) || defined(__linux__) || (defined(BSD) && (BSD >= 199103)) 200d522f475Smrg#define HAVE_POSIX_SAVED_IDS 201d522f475Smrg#endif 202d522f475Smrg 203190d7dceSmrg#if defined(__linux__) || defined(__GLIBC__) || (defined(SYSV) && (defined(CRAY) || defined(macII) || defined(__hpux) || defined(__osf__) || defined(__sgi))) || !(defined(SYSV) || defined(__QNX__) || defined(__INTERIX)) 204e0a2b6dfSmrg#define HAVE_INITGROUPS 205e0a2b6dfSmrg#endif 206e0a2b6dfSmrg 207980988aeSmrg#if defined(__linux__) 208980988aeSmrg#define HAVE_PTY_H 209980988aeSmrg#endif 210980988aeSmrg 211d1603babSmrg#if !defined(USG) && !defined(__minix) 212d1603babSmrg#define HAVE_SETITIMER 1 213d1603babSmrg#else 214d1603babSmrg#define HAVE_SETITIMER 0 215d1603babSmrg#endif 216d1603babSmrg 217980988aeSmrg#if defined(_POSIX_VERSION) || defined(SVR4) || defined(__convex__) || defined(__SCO__) || defined(__QNX__) 218980988aeSmrg#define HAVE_SETSID 1 219980988aeSmrg#endif 220980988aeSmrg 221d522f475Smrg#endif /* HAVE_CONFIG_H */ 222d522f475Smrg 223d522f475Smrg#ifndef HAVE_X11_DECKEYSYM_H 224d522f475Smrg#define HAVE_X11_DECKEYSYM_H 1 225d522f475Smrg#endif 226d522f475Smrg 227d522f475Smrg#ifndef HAVE_X11_SUNKEYSYM_H 228d522f475Smrg#define HAVE_X11_SUNKEYSYM_H 1 229d522f475Smrg#endif 230d522f475Smrg 231d522f475Smrg#ifndef HAVE_X11_XF86KEYSYM_H 232d522f475Smrg#define HAVE_X11_XF86KEYSYM_H 0 233d522f475Smrg#endif 234d522f475Smrg 235d4fba8b9Smrg#if defined(HAVE_X11_EXTENSIONS_XDBE_H) && defined(HAVE_XDBESWAPBUFFERS) 236d4fba8b9Smrg#define USE_DOUBLE_BUFFER 1 237d4fba8b9Smrg#else 238d4fba8b9Smrg#define USE_DOUBLE_BUFFER 0 239d4fba8b9Smrg#endif 240d4fba8b9Smrg 241d522f475Smrg/***====================================================================***/ 242d522f475Smrg 243d522f475Smrg/* if compiling with gcc -ansi -pedantic, we must fix POSIX definitions */ 244d522f475Smrg#if defined(SVR4) && defined(sun) 245d522f475Smrg#ifndef __EXTENSIONS__ 246d522f475Smrg#define __EXTENSIONS__ 1 247d522f475Smrg#endif 248d522f475Smrg#ifndef _POSIX_C_SOURCE 249d522f475Smrg#define _POSIX_C_SOURCE 1 250d522f475Smrg#endif 251d522f475Smrg#endif 252d522f475Smrg 253d522f475Smrg/***====================================================================***/ 254d522f475Smrg 255d522f475Smrg#ifdef HAVE_STDLIB_H 256d522f475Smrg#include <stdlib.h> 257d522f475Smrg#else 258d522f475Smrgextern char *calloc(); 259d522f475Smrgextern char *getenv(); 260d522f475Smrgextern char *malloc(); 261d522f475Smrgextern char *realloc(); 262d522f475Smrgextern void exit(); 263d522f475Smrgextern void free(); 264d522f475Smrg#endif 265d522f475Smrg 266d522f475Smrg#ifdef HAVE_UNISTD_H 267d522f475Smrg#include <unistd.h> 268190d7dceSmrg#undef HAVE_UNISTD_H 269d522f475Smrg#endif 270d522f475Smrg 271d522f475Smrg#ifdef HAVE_SYS_WAIT_H 272d522f475Smrg#include <sys/wait.h> 273d522f475Smrg#endif 274d522f475Smrg 275d522f475Smrg#include <errno.h> 276d522f475Smrg#if defined(DECL_ERRNO) && !defined(errno) 277d522f475Smrgextern int errno; 278d522f475Smrg#endif 279d522f475Smrg 280d4fba8b9Smrg#include <X11/Xlocale.h> 281d4fba8b9Smrg 2828f44fb3bSmrg#ifdef HAVE_STDNORETURN_H 2838f44fb3bSmrg#include <stdnoreturn.h> 2848f44fb3bSmrg#undef GCC_NORETURN 2858f44fb3bSmrg#define GCC_NORETURN STDC_NORETURN 2868f44fb3bSmrg#endif 2878f44fb3bSmrg 288d522f475Smrg/* 289d522f475Smrg * FIXME: Toggling logging from xterm hangs under Linux 2.0.29 with libc5 if 290d522f475Smrg * we use 'waitpid()', while 'wait()' seems to work properly. 291d522f475Smrg */ 292980988aeSmrg#ifdef __linux__ 293d522f475Smrg#undef HAVE_WAITPID 294d522f475Smrg#endif 295d522f475Smrg 296d522f475Smrg#ifndef OPT_WIDE_CHARS 297d522f475Smrg#define OPT_WIDE_CHARS 0 298d522f475Smrg#endif 299d522f475Smrg 300d522f475Smrg#if OPT_WIDE_CHARS 301d522f475Smrg#define HIDDEN_CHAR 0xffff 302d522f475Smrg#endif 303d522f475Smrg 304d522f475Smrg/***====================================================================***/ 305d522f475Smrg 3060bd37d32Smrg#define PROTO_XT_ACTIONS_ARGS \ 3070bd37d32Smrg (Widget w, XEvent *event, String *params, Cardinal *num_params) 3080bd37d32Smrg 3090bd37d32Smrg#define PROTO_XT_CALLBACK_ARGS \ 3100bd37d32Smrg (Widget gw, XtPointer closure, XtPointer data) 3110bd37d32Smrg 3120bd37d32Smrg#define PROTO_XT_CVT_SELECT_ARGS \ 3130bd37d32Smrg (Widget w, Atom *selection, Atom *target, Atom *type, XtPointer *value, unsigned long *length, int *format) 3140bd37d32Smrg 3150bd37d32Smrg#define PROTO_XT_EV_HANDLER_ARGS \ 3160bd37d32Smrg (Widget w, XtPointer closure, XEvent *event, Boolean *cont) 3170bd37d32Smrg 3180bd37d32Smrg#define PROTO_XT_SEL_CB_ARGS \ 3190bd37d32Smrg (Widget w, XtPointer client_data, Atom *selection, Atom *type, XtPointer value, unsigned long *length, int *format) 3200bd37d32Smrg 321d522f475Smrg#include <ptyx.h> 322d522f475Smrg 323d4fba8b9Smrg/***====================================================================***/ 324d4fba8b9Smrg 325d4fba8b9Smrg#ifndef GCC_PRINTFLIKE 326d4fba8b9Smrg#ifdef _X_ATTRIBUTE_PRINTF 327d4fba8b9Smrg#define GCC_PRINTFLIKE(f,n) _X_ATTRIBUTE_PRINTF(f,n) 328d4fba8b9Smrg#else 329d4fba8b9Smrg#define GCC_PRINTFLIKE(f,n) /* nothing */ 330d4fba8b9Smrg#endif 331d4fba8b9Smrg#endif 332d4fba8b9Smrg 333d4fba8b9Smrg#ifndef GCC_UNUSED 334d4fba8b9Smrg#ifdef _X_UNUSED 335d4fba8b9Smrg#define GCC_UNUSED _X_UNUSED 336d4fba8b9Smrg#else 337d4fba8b9Smrg#define GCC_UNUSED /* nothing */ 338d4fba8b9Smrg#endif 339d4fba8b9Smrg#endif 340d4fba8b9Smrg 341d4fba8b9Smrg#ifndef GCC_NORETURN 342d4fba8b9Smrg#ifdef _X_NORETURN 343d4fba8b9Smrg#define GCC_NORETURN _X_NORETURN 344d4fba8b9Smrg#else 345d4fba8b9Smrg#define GCC_NORETURN /* nothing */ 346d4fba8b9Smrg#endif 347d4fba8b9Smrg#endif 348d4fba8b9Smrg 349d4fba8b9Smrg/***====================================================================***/ 350d4fba8b9Smrg 351d4fba8b9Smrg#if defined(__GNUC__) && defined(_FORTIFY_SOURCE) 352d4fba8b9Smrg#define USE_IGNORE_RC 353d4fba8b9Smrg#define IGNORE_RC(func) ignore_unused = (int) func 354d4fba8b9Smrg#else 355d4fba8b9Smrg#define IGNORE_RC(func) (void) func 356d4fba8b9Smrg#endif /* gcc workarounds */ 357d522f475Smrg#if (XtSpecificationRelease >= 6) && !defined(NO_XPOLL_H) && !defined(sun) 358d522f475Smrg#include <X11/Xpoll.h> 359d522f475Smrg#define USE_XPOLL_H 1 360d522f475Smrg#else 361d522f475Smrg#define Select(n,r,w,e,t) select(n,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval *)t) 362d522f475Smrg#define XFD_COPYSET(src,dst) memcpy((dst)->fds_bits, (src)->fds_bits, sizeof(fd_set)) 363d522f475Smrg#endif 364d522f475Smrg 365d522f475Smrg#ifdef TIME_WITH_SYS_TIME 366d522f475Smrg# include <sys/time.h> 367d522f475Smrg# include <time.h> 368d522f475Smrg#else 369d522f475Smrg# ifdef HAVE_SYS_TIME_H 370d522f475Smrg# include <sys/time.h> 371d522f475Smrg# else 372d522f475Smrg# include <time.h> 373d522f475Smrg# endif 374d522f475Smrg#endif 375d522f475Smrg 376d522f475Smrg/* these may be needed for sig_atomic_t */ 377d522f475Smrg#include <sys/types.h> 378d522f475Smrg#include <signal.h> 379d522f475Smrg 380d522f475Smrg#ifdef USE_SYS_SELECT_H 381d522f475Smrg 382d522f475Smrg#if defined(USE_XPOLL_H) && defined(AIXV3) && defined(NFDBITS) 383d522f475Smrg#undef NFDBITS /* conflict between X11/Xpoll.h and sys/select.h */ 384d522f475Smrg#endif 385d522f475Smrg 386d522f475Smrg#include <sys/select.h> 387d522f475Smrg 388d522f475Smrg#endif /* USE_SYS_SELECT_H */ 389d522f475Smrg 390d522f475Smrg#include <setjmp.h> 391d522f475Smrg 392190d7dceSmrg#if !(defined(__linux__) && defined(__USE_GNU)) && !defined(__hpux) && !defined(_ALL_SOURCE) && !defined(__osf__) 393d522f475Smrgextern char **environ; 394d522f475Smrg#endif 395d522f475Smrg 396894e0ac8Smrg#ifndef _Xconst 397894e0ac8Smrg#define _Xconst const /* Solaris 7 workaround */ 398894e0ac8Smrg#endif /* _Xconst */ 399894e0ac8Smrg 400d522f475Smrg#define XK_Fn(n) (XK_F1 + (n) - 1) 401d522f475Smrg 402d522f475Smrg#define Maybe 2 403d522f475Smrg 40401037d57Smrg#define ALLOC_STRING(name) \ 405190d7dceSmrg if (name != NULL) \ 40601037d57Smrg name = x_strdup(name) 40701037d57Smrg#define FREE_STRING(name) \ 40801037d57Smrg free_string(name) 40901037d57Smrg 4102e4f8982Smrg/* strftime format and length of the result */ 4112e4f8982Smrg#define FMT_TIMESTAMP ".%Y.%m.%d.%H.%M.%S" 4122e4f8982Smrg#define LEN_TIMESTAMP sizeof(".YYYY.MM.DD.hh.mm.ss") 4132e4f8982Smrg 414d522f475Smrg/***====================================================================***/ 415d522f475Smrg 416d4fba8b9Smrg#if OPT_TRACE 417d4fba8b9Smrg#undef NDEBUG /* turn on assert's */ 418d4fba8b9Smrg#else 419d4fba8b9Smrg#ifndef NDEBUG 420d4fba8b9Smrg#define NDEBUG /* not debugging, don't do assert's */ 421d4fba8b9Smrg#endif 422d4fba8b9Smrg#endif 423d4fba8b9Smrg 424d4fba8b9Smrg#include <trace.h> 425d4fba8b9Smrg 426d4fba8b9Smrg#if OPT_TRACE && !defined(DEBUG) 427d4fba8b9Smrg#define DEBUG 1 428d4fba8b9Smrg#endif 429d4fba8b9Smrg 430d4fba8b9Smrg#ifdef DEBUG 431d4fba8b9Smrg#define if_DEBUG(code) if(debug) code 432d4fba8b9Smrg#else 433d4fba8b9Smrg#define if_DEBUG(code) /*nothing*/ 434d4fba8b9Smrg#endif 435d4fba8b9Smrg 436d4fba8b9Smrg#define DEBUG_MSG(text) if_DEBUG({ IGNORE_RC(write(2, text, sizeof(text) - 1)); }) 437d4fba8b9Smrg 438d4fba8b9Smrg/***====================================================================***/ 439d4fba8b9Smrg 440980988aeSmrg#define XtNactiveIcon "activeIcon" 441e39b573cSmrg#define XtNallowBoldFonts "allowBoldFonts" 442d522f475Smrg#define XtNallowC1Printable "allowC1Printable" 44320d2c4d2Smrg#define XtNallowColorOps "allowColorOps" 4442eaa94a1Schristos#define XtNallowFontOps "allowFontOps" 445913cc679Smrg#define XtNallowMouseOps "allowMouseOps" 4460bd37d32Smrg#define XtNallowPasteControls "allowPasteControls" 44720d2c4d2Smrg#define XtNallowScrollLock "allowScrollLock" 448d522f475Smrg#define XtNallowSendEvents "allowSendEvents" 4492eaa94a1Schristos#define XtNallowTcapOps "allowTcapOps" 450d522f475Smrg#define XtNallowTitleOps "allowTitleOps" 451d522f475Smrg#define XtNallowWindowOps "allowWindowOps" 452d522f475Smrg#define XtNaltIsNotMeta "altIsNotMeta" 453d522f475Smrg#define XtNaltSendsEscape "altSendsEscape" 4540bd37d32Smrg#define XtNalternateScroll "alternateScroll" 455d522f475Smrg#define XtNalwaysBoldMode "alwaysBoldMode" 456d522f475Smrg#define XtNalwaysHighlight "alwaysHighlight" 457d522f475Smrg#define XtNalwaysUseMods "alwaysUseMods" 458d522f475Smrg#define XtNanswerbackString "answerbackString" 459d522f475Smrg#define XtNappcursorDefault "appcursorDefault" 460d522f475Smrg#define XtNappkeypadDefault "appkeypadDefault" 461e0a2b6dfSmrg#define XtNassumeAllChars "assumeAllChars" 462636d5e9fSmrg#define XtNautoScrollLock "autoScrollLock" 463980988aeSmrg#define XtNautoWrap "autoWrap" 464d522f475Smrg#define XtNawaitInput "awaitInput" 465d522f475Smrg#define XtNbackarrowKey "backarrowKey" 466980988aeSmrg#define XtNbackarrowKeyIsErase "backarrowKeyIsErase" 467d522f475Smrg#define XtNbellIsUrgent "bellIsUrgent" 468d522f475Smrg#define XtNbellOnReset "bellOnReset" 469d522f475Smrg#define XtNbellSuppressTime "bellSuppressTime" 470d522f475Smrg#define XtNboldColors "boldColors" 471d522f475Smrg#define XtNboldFont "boldFont" 472d522f475Smrg#define XtNboldMode "boldMode" 473d522f475Smrg#define XtNbrokenLinuxOSC "brokenLinuxOSC" 474d522f475Smrg#define XtNbrokenSelections "brokenSelections" 475d522f475Smrg#define XtNbrokenStringTerm "brokenStringTerm" 476d4fba8b9Smrg#define XtNbuffered "buffered" 477d4fba8b9Smrg#define XtNbufferedFPS "bufferedFPS" 478d522f475Smrg#define XtNc132 "c132" 479d522f475Smrg#define XtNcacheDoublesize "cacheDoublesize" 4800bd37d32Smrg#define XtNcdXtraScroll "cdXtraScroll" 481d522f475Smrg#define XtNcharClass "charClass" 482d4fba8b9Smrg#define XtNchecksumExtension "checksumExtension" 483d522f475Smrg#define XtNcjkWidth "cjkWidth" 484d522f475Smrg#define XtNcolorAttrMode "colorAttrMode" 485d522f475Smrg#define XtNcolorBDMode "colorBDMode" 486d522f475Smrg#define XtNcolorBLMode "colorBLMode" 48701037d57Smrg#define XtNcolorITMode "colorITMode" 488d4fba8b9Smrg#define XtNcolorInnerBorder "colorInnerBorder" 489d522f475Smrg#define XtNcolorMode "colorMode" 490d522f475Smrg#define XtNcolorRVMode "colorRVMode" 491d522f475Smrg#define XtNcolorULMode "colorULMode" 492d522f475Smrg#define XtNcombiningChars "combiningChars" 493d522f475Smrg#define XtNctrlFKeys "ctrlFKeys" 494d522f475Smrg#define XtNcurses "curses" 495d1603babSmrg#define XtNcursorBar "cursorBar" 496d522f475Smrg#define XtNcursorBlink "cursorBlink" 497d4fba8b9Smrg#define XtNcursorBlinkXOR "cursorBlinkXOR" 498d522f475Smrg#define XtNcursorColor "cursorColor" 499d522f475Smrg#define XtNcursorOffTime "cursorOffTime" 500d522f475Smrg#define XtNcursorOnTime "cursorOnTime" 501980988aeSmrg#define XtNcursorTheme "cursorTheme" 50201037d57Smrg#define XtNcursorUnderLine "cursorUnderLine" 503d522f475Smrg#define XtNcutNewline "cutNewline" 504d522f475Smrg#define XtNcutToBeginningOfLine "cutToBeginningOfLine" 505d4fba8b9Smrg#define XtNdecGraphicsID "decGraphicsID" 506d522f475Smrg#define XtNdecTerminalID "decTerminalID" 507956cc18dSsnj#define XtNdefaultString "defaultString" 508d522f475Smrg#define XtNdeleteIsDEL "deleteIsDEL" 509d4fba8b9Smrg#define XtNdirectColor "directColor" 51020d2c4d2Smrg#define XtNdisallowedColorOps "disallowedColorOps" 51120d2c4d2Smrg#define XtNdisallowedFontOps "disallowedFontOps" 512913cc679Smrg#define XtNdisallowedMouseOps "disallowedMouseOps" 513d4fba8b9Smrg#define XtNdisallowedPasteControls "disallowedPasteControls" 51420d2c4d2Smrg#define XtNdisallowedTcapOps "disallowedTcapOps" 51520d2c4d2Smrg#define XtNdisallowedWindowOps "disallowedWindowOps" 516d522f475Smrg#define XtNdynamicColors "dynamicColors" 517d522f475Smrg#define XtNeightBitControl "eightBitControl" 518d522f475Smrg#define XtNeightBitInput "eightBitInput" 5190bd37d32Smrg#define XtNeightBitMeta "eightBitMeta" 520d522f475Smrg#define XtNeightBitOutput "eightBitOutput" 521956cc18dSsnj#define XtNeightBitSelectTypes "eightBitSelectTypes" 522913cc679Smrg#define XtNeraseSavedLines "eraseSavedLines" 523d522f475Smrg#define XtNfaceName "faceName" 524d522f475Smrg#define XtNfaceNameDoublesize "faceNameDoublesize" 525d522f475Smrg#define XtNfaceSize "faceSize" 526d1603babSmrg#define XtNfaintIsRelative "faintIsRelative" 527956cc18dSsnj#define XtNfastScroll "fastScroll" 528d522f475Smrg#define XtNfont1 "font1" 529d522f475Smrg#define XtNfont2 "font2" 530d522f475Smrg#define XtNfont3 "font3" 531d522f475Smrg#define XtNfont4 "font4" 532d522f475Smrg#define XtNfont5 "font5" 533d522f475Smrg#define XtNfont6 "font6" 534d4fba8b9Smrg#define XtNfont7 "font7" 535d522f475Smrg#define XtNfontDoublesize "fontDoublesize" 536956cc18dSsnj#define XtNfontWarnings "fontWarnings" 537d522f475Smrg#define XtNforceBoxChars "forceBoxChars" 53820d2c4d2Smrg#define XtNforcePackedFont "forcePackedFont" 539d4fba8b9Smrg#define XtNforceXftHeight "forceXftHeight" 540d522f475Smrg#define XtNformatOtherKeys "formatOtherKeys" 541d522f475Smrg#define XtNfreeBoldBox "freeBoldBox" 542a1f3da82Smrg#define XtNfullscreen "fullscreen" 543d522f475Smrg#define XtNhighlightColor "highlightColor" 544d522f475Smrg#define XtNhighlightColorMode "highlightColorMode" 545d522f475Smrg#define XtNhighlightReverse "highlightReverse" 546d522f475Smrg#define XtNhighlightSelection "highlightSelection" 547d522f475Smrg#define XtNhighlightTextColor "highlightTextColor" 548980988aeSmrg#define XtNhold "hold" 549980988aeSmrg#define XtNhpFunctionKeys "hpFunctionKeys" 550d522f475Smrg#define XtNhpLowerleftBugCompat "hpLowerleftBugCompat" 551d522f475Smrg#define XtNi18nSelections "i18nSelections" 552980988aeSmrg#define XtNiconBorderColor "iconBorderColor" 553980988aeSmrg#define XtNiconBorderWidth "iconBorderWidth" 554980988aeSmrg#define XtNiconFont "iconFont" 555980988aeSmrg#define XtNiconGeometry "iconGeometry" 5560bd37d32Smrg#define XtNiconHint "iconHint" 557980988aeSmrg#define XtNincrementalGraphics "incrementalGraphics" 55850027b5bSmrg#define XtNindicatorFormat "indicatorFormat" 559d522f475Smrg#define XtNinitialFont "initialFont" 560d522f475Smrg#define XtNinternalBorder "internalBorder" 561956cc18dSsnj#define XtNitalicULMode "italicULMode" 562d522f475Smrg#define XtNjumpScroll "jumpScroll" 5632e4f8982Smrg#define XtNkeepClipboard "keepClipboard" 564d522f475Smrg#define XtNkeepSelection "keepSelection" 565d522f475Smrg#define XtNkeyboardDialect "keyboardDialect" 566980988aeSmrg#define XtNkeyboardType "keyboardType" 567d1603babSmrg#define XtNlimitFontHeight "limitFontHeight" 568d1603babSmrg#define XtNlimitFontWidth "limitFontWidth" 569980988aeSmrg#define XtNlimitFontsets "limitFontsets" 570d522f475Smrg#define XtNlimitResize "limitResize" 571d4fba8b9Smrg#define XtNlimitResponse "limitResponse" 572d522f475Smrg#define XtNlocale "locale" 573d522f475Smrg#define XtNlocaleFilter "localeFilter" 574d522f475Smrg#define XtNlogFile "logFile" 575d522f475Smrg#define XtNlogInhibit "logInhibit" 576d522f475Smrg#define XtNlogging "logging" 577d522f475Smrg#define XtNloginShell "loginShell" 578d522f475Smrg#define XtNmarginBell "marginBell" 579980988aeSmrg#define XtNmaxBufSize "maxBufSize" 58001037d57Smrg#define XtNmaxGraphicSize "maxGraphicSize" 581980988aeSmrg#define XtNmaxStringParse "maxStringParse" 582d4fba8b9Smrg#define XtNmaximized "maximized" 583913cc679Smrg#define XtNmenuBar "menuBar" /* internal */ 584d522f475Smrg#define XtNmenuHeight "menuHeight" 585980988aeSmrg#define XtNmenuLocale "menuLocale" 586980988aeSmrg#define XtNmessages "messages" 587d522f475Smrg#define XtNmetaSendsEscape "metaSendsEscape" 588980988aeSmrg#define XtNminBufSize "minBufSize" 589d522f475Smrg#define XtNmkSamplePass "mkSamplePass" 590d522f475Smrg#define XtNmkSampleSize "mkSampleSize" 591d522f475Smrg#define XtNmkWidth "mkWidth" 592d522f475Smrg#define XtNmodifyCursorKeys "modifyCursorKeys" 593d522f475Smrg#define XtNmodifyFunctionKeys "modifyFunctionKeys" 5940bd37d32Smrg#define XtNmodifyKeyboard "modifyKeyboard" 595d522f475Smrg#define XtNmodifyKeypadKeys "modifyKeypadKeys" 596d522f475Smrg#define XtNmodifyOtherKeys "modifyOtherKeys" 597d522f475Smrg#define XtNmodifyStringKeys "modifyStringKeys" 598d522f475Smrg#define XtNmultiClickTime "multiClickTime" 599d522f475Smrg#define XtNmultiScroll "multiScroll" 600d522f475Smrg#define XtNnMarginBell "nMarginBell" 601d4fba8b9Smrg#define XtNnextEventDelay "nextEventDelay" 602190d7dceSmrg#define XtNnotMapped "notMapped" 603894e0ac8Smrg#define XtNnumColorRegisters "numColorRegisters" 604d522f475Smrg#define XtNnumLock "numLock" 605d522f475Smrg#define XtNoldXtermFKeys "oldXtermFKeys" 606980988aeSmrg#define XtNomitTranslation "omitTranslation" 607d522f475Smrg#define XtNpointerColor "pointerColor" 608d522f475Smrg#define XtNpointerColorBackground "pointerColorBackground" 609d4fba8b9Smrg#define XtNpointerFont "pointerFont" 610d522f475Smrg#define XtNpointerMode "pointerMode" 611d522f475Smrg#define XtNpointerShape "pointerShape" 612d522f475Smrg#define XtNpopOnBell "popOnBell" 6130bd37d32Smrg#define XtNprecompose "precompose" 614980988aeSmrg#define XtNpreferLatin1 "preferLatin1" 615d522f475Smrg#define XtNprintAttributes "printAttributes" 616980988aeSmrg#define XtNprintFileImmediate "printFileImmediate" 617980988aeSmrg#define XtNprintFileOnXError "printFileOnXError" 618980988aeSmrg#define XtNprintModeImmediate "printModeImmediate" 619980988aeSmrg#define XtNprintModeOnXError "printModeOnXError" 620980988aeSmrg#define XtNprintOptsImmediate "printOptsImmediate" 621980988aeSmrg#define XtNprintOptsOnXError "printOptsOnXError" 622190d7dceSmrg#define XtNprintRawChars "printRawChars" 623d522f475Smrg#define XtNprinterAutoClose "printerAutoClose" 624d522f475Smrg#define XtNprinterCommand "printerCommand" 625d522f475Smrg#define XtNprinterControlMode "printerControlMode" 626d522f475Smrg#define XtNprinterExtent "printerExtent" 627d522f475Smrg#define XtNprinterFormFeed "printerFormFeed" 62820d2c4d2Smrg#define XtNprinterNewLine "printerNewLine" 629e0a2b6dfSmrg#define XtNprivateColorRegisters "privateColorRegisters" 630980988aeSmrg#define XtNptyHandshake "ptyHandshake" 631980988aeSmrg#define XtNptyInitialErase "ptyInitialErase" 632980988aeSmrg#define XtNptySttySize "ptySttySize" 633d522f475Smrg#define XtNquietGrab "quietGrab" 63401037d57Smrg#define XtNregisDefaultFont "regisDefaultFont" 63501037d57Smrg#define XtNregisScreenSize "regisScreenSize" 636d522f475Smrg#define XtNrenderFont "renderFont" 637980988aeSmrg#define XtNreportCClass "reportCClass" 638980988aeSmrg#define XtNreportColors "reportColors" 639980988aeSmrg#define XtNreportFonts "reportFonts" 640980988aeSmrg#define XtNreportIcons "reportIcons" 641980988aeSmrg#define XtNreportXRes "reportXRes" 6428f44fb3bSmrg#define XtNresizeByPixel "resizeByPixel" 643d522f475Smrg#define XtNresizeGravity "resizeGravity" 6440bd37d32Smrg#define XtNretryInputMethod "retryInputMethod" 645d522f475Smrg#define XtNreverseWrap "reverseWrap" 646d522f475Smrg#define XtNrightScrollBar "rightScrollBar" 647980988aeSmrg#define XtNsameName "sameName" 648d522f475Smrg#define XtNsaveLines "saveLines" 6490bd37d32Smrg#define XtNscaleHeight "scaleHeight" 650980988aeSmrg#define XtNscoFunctionKeys "scoFunctionKeys" 651d522f475Smrg#define XtNscrollBar "scrollBar" 652d522f475Smrg#define XtNscrollBarBorder "scrollBarBorder" 653d522f475Smrg#define XtNscrollKey "scrollKey" 654d522f475Smrg#define XtNscrollLines "scrollLines" 655d522f475Smrg#define XtNscrollTtyOutput "scrollTtyOutput" 656d522f475Smrg#define XtNselectToClipboard "selectToClipboard" 657980988aeSmrg#define XtNsessionMgt "sessionMgt" 658d4fba8b9Smrg#define XtNshiftEscape "shiftEscape" 659d522f475Smrg#define XtNshiftFonts "shiftFonts" 660d522f475Smrg#define XtNshowBlinkAsBold "showBlinkAsBold" 661d522f475Smrg#define XtNshowMissingGlyphs "showMissingGlyphs" 662492d43a5Smrg#define XtNshowWrapMarks "showWrapMarks" 663d522f475Smrg#define XtNsignalInhibit "signalInhibit" 664e0a2b6dfSmrg#define XtNsixelScrolling "sixelScrolling" 665894e0ac8Smrg#define XtNsixelScrollsRight "sixelScrollsRight" 666980988aeSmrg#define XtNsunFunctionKeys "sunFunctionKeys" 667980988aeSmrg#define XtNsunKeyboard "sunKeyboard" 668980988aeSmrg#define XtNtcapFunctionKeys "tcapFunctionKeys" 669d522f475Smrg#define XtNtekGeometry "tekGeometry" 670d522f475Smrg#define XtNtekInhibit "tekInhibit" 671d522f475Smrg#define XtNtekSmall "tekSmall" 672d522f475Smrg#define XtNtekStartup "tekStartup" 673980988aeSmrg#define XtNtermName "termName" 674d522f475Smrg#define XtNtiXtraScroll "tiXtraScroll" 675d522f475Smrg#define XtNtiteInhibit "titeInhibit" 67620d2c4d2Smrg#define XtNtitleModes "titleModes" 677d522f475Smrg#define XtNtoolBar "toolBar" 678d522f475Smrg#define XtNtrimSelection "trimSelection" 679980988aeSmrg#define XtNttyModes "ttyModes" 680d522f475Smrg#define XtNunderLine "underLine" 681d4fba8b9Smrg#define XtNuseBorderClipping "useBorderClipping" 682d522f475Smrg#define XtNuseClipping "useClipping" 683980988aeSmrg#define XtNuseInsertMode "useInsertMode" 684d522f475Smrg#define XtNutf8 "utf8" 685e39b573cSmrg#define XtNutf8Fonts "utf8Fonts" 686d522f475Smrg#define XtNutf8Latin1 "utf8Latin1" 687956cc18dSsnj#define XtNutf8SelectTypes "utf8SelectTypes" 688d522f475Smrg#define XtNutf8Title "utf8Title" 689d4fba8b9Smrg#define XtNutf8Weblike "utf8Weblike" 690980988aeSmrg#define XtNutmpDisplayId "utmpDisplayId" 691980988aeSmrg#define XtNutmpInhibit "utmpInhibit" 692980988aeSmrg#define XtNvalidShells "validShells" 693d522f475Smrg#define XtNveryBoldColors "veryBoldColors" 694d522f475Smrg#define XtNvisualBell "visualBell" 695d522f475Smrg#define XtNvisualBellDelay "visualBellDelay" 6960bd37d32Smrg#define XtNvisualBellLine "visualBellLine" 697d522f475Smrg#define XtNvt100Graphics "vt100Graphics" 698980988aeSmrg#define XtNwaitForMap "waitForMap" 699d522f475Smrg#define XtNwideBoldFont "wideBoldFont" 700d522f475Smrg#define XtNwideChars "wideChars" 701d522f475Smrg#define XtNwideFont "wideFont" 702d1603babSmrg#define XtNxftMaxGlyphMemory "xftMaxGlyphMemory" 703d1603babSmrg#define XtNxftMaxUnrefFonts "xftMaxUnrefFonts" 704d1603babSmrg#define XtNxftTrackMemUsage "xftTrackMemUsage" 705d522f475Smrg#define XtNximFont "ximFont" 706913cc679Smrg#define XtNxmcAttributes "xmcAttributes" /* ncurses-testing */ 707913cc679Smrg#define XtNxmcGlitch "xmcGlitch" /* ncurses-testing */ 708913cc679Smrg#define XtNxmcInline "xmcInline" /* ncurses-testing */ 709913cc679Smrg#define XtNxmcMoveSGR "xmcMoveSGR" /* ncurses-testing */ 710980988aeSmrg#define XtNzIconBeep "zIconBeep" 711980988aeSmrg#define XtNzIconTitleFormat "zIconTitleFormat" 712d522f475Smrg 713980988aeSmrg#define XtCActiveIcon "ActiveIcon" 714e39b573cSmrg#define XtCAllowBoldFonts "AllowBoldFonts" 715d522f475Smrg#define XtCAllowC1Printable "AllowC1Printable" 71620d2c4d2Smrg#define XtCAllowColorOps "AllowColorOps" 7172eaa94a1Schristos#define XtCAllowFontOps "AllowFontOps" 718913cc679Smrg#define XtCAllowMouseOps "AllowMouseOps" 7190bd37d32Smrg#define XtCAllowPasteControls "AllowPasteControls" 72020d2c4d2Smrg#define XtCAllowScrollLock "AllowScrollLock" 721d522f475Smrg#define XtCAllowSendEvents "AllowSendEvents" 7222eaa94a1Schristos#define XtCAllowTcapOps "AllowTcapOps" 723d522f475Smrg#define XtCAllowTitleOps "AllowTitleOps" 724d522f475Smrg#define XtCAllowWindowOps "AllowWindowOps" 725d522f475Smrg#define XtCAltIsNotMeta "AltIsNotMeta" 726d522f475Smrg#define XtCAltSendsEscape "AltSendsEscape" 727d522f475Smrg#define XtCAlwaysBoldMode "AlwaysBoldMode" 728d522f475Smrg#define XtCAlwaysHighlight "AlwaysHighlight" 729d522f475Smrg#define XtCAlwaysUseMods "AlwaysUseMods" 730d522f475Smrg#define XtCAnswerbackString "AnswerbackString" 731d522f475Smrg#define XtCAppcursorDefault "AppcursorDefault" 732d522f475Smrg#define XtCAppkeypadDefault "AppkeypadDefault" 733e0a2b6dfSmrg#define XtCAssumeAllChars "AssumeAllChars" 734636d5e9fSmrg#define XtCAutoScrollLock "AutoScrollLock" 735980988aeSmrg#define XtCAutoWrap "AutoWrap" 736d522f475Smrg#define XtCAwaitInput "AwaitInput" 737d522f475Smrg#define XtCBackarrowKey "BackarrowKey" 738980988aeSmrg#define XtCBackarrowKeyIsErase "BackarrowKeyIsErase" 739d522f475Smrg#define XtCBellIsUrgent "BellIsUrgent" 740d522f475Smrg#define XtCBellOnReset "BellOnReset" 741d522f475Smrg#define XtCBellSuppressTime "BellSuppressTime" 742d522f475Smrg#define XtCBoldFont "BoldFont" 743d522f475Smrg#define XtCBoldMode "BoldMode" 744d522f475Smrg#define XtCBrokenLinuxOSC "BrokenLinuxOSC" 745d522f475Smrg#define XtCBrokenSelections "BrokenSelections" 746d522f475Smrg#define XtCBrokenStringTerm "BrokenStringTerm" 747d4fba8b9Smrg#define XtCBuffered "Buffered" 748d4fba8b9Smrg#define XtCBufferedFPS "BufferedFPS" 749d522f475Smrg#define XtCC132 "C132" 750d522f475Smrg#define XtCCacheDoublesize "CacheDoublesize" 7510bd37d32Smrg#define XtCCdXtraScroll "CdXtraScroll" 752d522f475Smrg#define XtCCharClass "CharClass" 753d4fba8b9Smrg#define XtCChecksumExtension "ChecksumExtension" 754a1f3da82Smrg#define XtCCjkWidth "CjkWidth" 755956cc18dSsnj#define XtCColorAttrMode "ColorAttrMode" 756d4fba8b9Smrg#define XtCColorInnerBorder "ColorInnerBorder" 757d522f475Smrg#define XtCColorMode "ColorMode" 758d522f475Smrg#define XtCColumn "Column" 759d522f475Smrg#define XtCCombiningChars "CombiningChars" 760d522f475Smrg#define XtCCtrlFKeys "CtrlFKeys" 761d522f475Smrg#define XtCCurses "Curses" 762d1603babSmrg#define XtCCursorBar "CursorBar" 763d522f475Smrg#define XtCCursorBlink "CursorBlink" 764d4fba8b9Smrg#define XtCCursorBlinkXOR "CursorBlinkXOR" 765d522f475Smrg#define XtCCursorOffTime "CursorOffTime" 766d522f475Smrg#define XtCCursorOnTime "CursorOnTime" 767980988aeSmrg#define XtCCursorTheme "CursorTheme" 76801037d57Smrg#define XtCCursorUnderLine "CursorUnderLine" 769d522f475Smrg#define XtCCutNewline "CutNewline" 770d522f475Smrg#define XtCCutToBeginningOfLine "CutToBeginningOfLine" 771d4fba8b9Smrg#define XtCDecGraphicsID "DecGraphicsID" 772d522f475Smrg#define XtCDecTerminalID "DecTerminalID" 773956cc18dSsnj#define XtCDefaultString "DefaultString" 774d522f475Smrg#define XtCDeleteIsDEL "DeleteIsDEL" 775d4fba8b9Smrg#define XtCDirectColor "DirectColor" 77620d2c4d2Smrg#define XtCDisallowedColorOps "DisallowedColorOps" 77720d2c4d2Smrg#define XtCDisallowedFontOps "DisallowedFontOps" 778913cc679Smrg#define XtCDisallowedMouseOps "DisallowedMouseOps" 779d4fba8b9Smrg#define XtCDisallowedPasteControls "DisallowedPasteControls" 78020d2c4d2Smrg#define XtCDisallowedTcapOps "DisallowedTcapOps" 78120d2c4d2Smrg#define XtCDisallowedWindowOps "DisallowedWindowOps" 782d522f475Smrg#define XtCDynamicColors "DynamicColors" 783d522f475Smrg#define XtCEightBitControl "EightBitControl" 784d522f475Smrg#define XtCEightBitInput "EightBitInput" 7850bd37d32Smrg#define XtCEightBitMeta "EightBitMeta" 786d522f475Smrg#define XtCEightBitOutput "EightBitOutput" 787956cc18dSsnj#define XtCEightBitSelectTypes "EightBitSelectTypes" 788913cc679Smrg#define XtCEraseSavedLines "EraseSavedLines" 789d522f475Smrg#define XtCFaceName "FaceName" 790d522f475Smrg#define XtCFaceNameDoublesize "FaceNameDoublesize" 791d522f475Smrg#define XtCFaceSize "FaceSize" 792d1603babSmrg#define XtCFaintIsRelative "FaintIsRelative" 793956cc18dSsnj#define XtCFastScroll "FastScroll" 794d522f475Smrg#define XtCFont1 "Font1" 795d522f475Smrg#define XtCFont2 "Font2" 796d522f475Smrg#define XtCFont3 "Font3" 797d522f475Smrg#define XtCFont4 "Font4" 798d522f475Smrg#define XtCFont5 "Font5" 799d522f475Smrg#define XtCFont6 "Font6" 800d4fba8b9Smrg#define XtCFont7 "Font7" 801d522f475Smrg#define XtCFontDoublesize "FontDoublesize" 802956cc18dSsnj#define XtCFontWarnings "FontWarnings" 803d522f475Smrg#define XtCForceBoxChars "ForceBoxChars" 80420d2c4d2Smrg#define XtCForcePackedFont "ForcePackedFont" 805d4fba8b9Smrg#define XtCForceXftHeight "ForceXftHeight" 806d522f475Smrg#define XtCFormatOtherKeys "FormatOtherKeys" 807d522f475Smrg#define XtCFreeBoldBox "FreeBoldBox" 808a1f3da82Smrg#define XtCFullscreen "Fullscreen" 809d522f475Smrg#define XtCHighlightColorMode "HighlightColorMode" 810d522f475Smrg#define XtCHighlightReverse "HighlightReverse" 811d522f475Smrg#define XtCHighlightSelection "HighlightSelection" 812980988aeSmrg#define XtCHold "Hold" 813980988aeSmrg#define XtCHpFunctionKeys "HpFunctionKeys" 814d522f475Smrg#define XtCHpLowerleftBugCompat "HpLowerleftBugCompat" 815d522f475Smrg#define XtCI18nSelections "I18nSelections" 816980988aeSmrg#define XtCIconFont "IconFont" 817980988aeSmrg#define XtCIconGeometry "IconGeometry" 8180bd37d32Smrg#define XtCIconHint "IconHint" 819980988aeSmrg#define XtCIncrementalGraphics "IncrementalGraphics" 82050027b5bSmrg#define XtCIndicatorFormat "IndicatorFormat" 821d522f475Smrg#define XtCInitialFont "InitialFont" 822980988aeSmrg#define XtCInternalBorder "InternalBorder" 823d522f475Smrg#define XtCJumpScroll "JumpScroll" 8242e4f8982Smrg#define XtCKeepClipboard "KeepClipboard" 825d522f475Smrg#define XtCKeepSelection "KeepSelection" 826d522f475Smrg#define XtCKeyboardDialect "KeyboardDialect" 827980988aeSmrg#define XtCKeyboardType "KeyboardType" 828d1603babSmrg#define XtCLimitFontHeight "LimitFontHeight" 829d1603babSmrg#define XtCLimitFontWidth "LimitFontWidth" 830980988aeSmrg#define XtCLimitFontsets "LimitFontsets" 831d522f475Smrg#define XtCLimitResize "LimitResize" 832d4fba8b9Smrg#define XtCLimitResponse "LimitResponse" 833d522f475Smrg#define XtCLocale "Locale" 834d522f475Smrg#define XtCLocaleFilter "LocaleFilter" 835d522f475Smrg#define XtCLogInhibit "LogInhibit" 836d522f475Smrg#define XtCLogfile "Logfile" 837d522f475Smrg#define XtCLogging "Logging" 838d522f475Smrg#define XtCLoginShell "LoginShell" 839d522f475Smrg#define XtCMarginBell "MarginBell" 840980988aeSmrg#define XtCMaxBufSize "MaxBufSize" 84101037d57Smrg#define XtCMaxGraphicSize "MaxGraphicSize" 842980988aeSmrg#define XtCMaxStringParse "MaxStringParse" 843d4fba8b9Smrg#define XtCMaximized "Maximized" 844913cc679Smrg#define XtCMenuBar "MenuBar" /* internal */ 845d522f475Smrg#define XtCMenuHeight "MenuHeight" 846980988aeSmrg#define XtCMenuLocale "MenuLocale" 847980988aeSmrg#define XtCMessages "Messages" 848d522f475Smrg#define XtCMetaSendsEscape "MetaSendsEscape" 849980988aeSmrg#define XtCMinBufSize "MinBufSize" 850e0a2b6dfSmrg#define XtCMkSamplePass "MkSamplePass" 851e0a2b6dfSmrg#define XtCMkSampleSize "MkSampleSize" 852a1f3da82Smrg#define XtCMkWidth "MkWidth" 853d522f475Smrg#define XtCModifyCursorKeys "ModifyCursorKeys" 854d522f475Smrg#define XtCModifyFunctionKeys "ModifyFunctionKeys" 8550bd37d32Smrg#define XtCModifyKeyboard "ModifyKeyboard" 856d522f475Smrg#define XtCModifyKeypadKeys "ModifyKeypadKeys" 857d522f475Smrg#define XtCModifyOtherKeys "ModifyOtherKeys" 858d522f475Smrg#define XtCModifyStringKeys "ModifyStringKeys" 859d522f475Smrg#define XtCMultiClickTime "MultiClickTime" 860d522f475Smrg#define XtCMultiScroll "MultiScroll" 861d4fba8b9Smrg#define XtCNextEventDelay "NextEventDelay" 862190d7dceSmrg#define XtCNotMapped "NotMapped" 863894e0ac8Smrg#define XtCNumColorRegisters "NumColorRegisters" 864d522f475Smrg#define XtCNumLock "NumLock" 865d522f475Smrg#define XtCOldXtermFKeys "OldXtermFKeys" 866980988aeSmrg#define XtCOmitTranslation "OmitTranslation" 867d4fba8b9Smrg#define XtCPointerFont "PointerFont" 868d522f475Smrg#define XtCPointerMode "PointerMode" 869d522f475Smrg#define XtCPopOnBell "PopOnBell" 8700bd37d32Smrg#define XtCPrecompose "Precompose" 871980988aeSmrg#define XtCPreferLatin1 "PreferLatin1" 872d522f475Smrg#define XtCPrintAttributes "PrintAttributes" 873980988aeSmrg#define XtCPrintFileImmediate "PrintFileImmediate" 874980988aeSmrg#define XtCPrintFileOnXError "PrintFileOnXError" 875980988aeSmrg#define XtCPrintModeImmediate "PrintModeImmediate" 876980988aeSmrg#define XtCPrintModeOnXError "PrintModeOnXError" 877980988aeSmrg#define XtCPrintOptsImmediate "PrintOptsImmediate" 878980988aeSmrg#define XtCPrintOptsOnXError "PrintOptsOnXError" 879190d7dceSmrg#define XtCPrintRawChars "PrintRawChars" 880d522f475Smrg#define XtCPrinterAutoClose "PrinterAutoClose" 881d522f475Smrg#define XtCPrinterCommand "PrinterCommand" 882d522f475Smrg#define XtCPrinterControlMode "PrinterControlMode" 883d522f475Smrg#define XtCPrinterExtent "PrinterExtent" 884d522f475Smrg#define XtCPrinterFormFeed "PrinterFormFeed" 88520d2c4d2Smrg#define XtCPrinterNewLine "PrinterNewLine" 886e0a2b6dfSmrg#define XtCPrivateColorRegisters "PrivateColorRegisters" 887980988aeSmrg#define XtCPtyHandshake "PtyHandshake" 888980988aeSmrg#define XtCPtyInitialErase "PtyInitialErase" 889980988aeSmrg#define XtCPtySttySize "PtySttySize" 890d522f475Smrg#define XtCQuietGrab "QuietGrab" 89101037d57Smrg#define XtCRegisDefaultFont "RegisDefaultFont" 89201037d57Smrg#define XtCRegisScreenSize "RegisScreenSize" 893d522f475Smrg#define XtCRenderFont "RenderFont" 894980988aeSmrg#define XtCReportCClass "ReportCClass" 895980988aeSmrg#define XtCReportColors "ReportColors" 896980988aeSmrg#define XtCReportFonts "ReportFonts" 897980988aeSmrg#define XtCReportIcons "ReportIcons" 898980988aeSmrg#define XtCReportXRes "ReportXRes" 8998f44fb3bSmrg#define XtCResizeByPixel "ResizeByPixel" 900d522f475Smrg#define XtCResizeGravity "ResizeGravity" 9010bd37d32Smrg#define XtCRetryInputMethod "RetryInputMethod" 902d522f475Smrg#define XtCReverseWrap "ReverseWrap" 903d522f475Smrg#define XtCRightScrollBar "RightScrollBar" 904980988aeSmrg#define XtCSameName "SameName" 905d522f475Smrg#define XtCSaveLines "SaveLines" 9060bd37d32Smrg#define XtCScaleHeight "ScaleHeight" 907980988aeSmrg#define XtCScoFunctionKeys "ScoFunctionKeys" 908d522f475Smrg#define XtCScrollBar "ScrollBar" 909d522f475Smrg#define XtCScrollBarBorder "ScrollBarBorder" 910d522f475Smrg#define XtCScrollCond "ScrollCond" 911d522f475Smrg#define XtCScrollLines "ScrollLines" 912d522f475Smrg#define XtCSelectToClipboard "SelectToClipboard" 913980988aeSmrg#define XtCSessionMgt "SessionMgt" 914d4fba8b9Smrg#define XtCShiftEscape "ShiftEscape" 915d522f475Smrg#define XtCShiftFonts "ShiftFonts" 916d522f475Smrg#define XtCShowBlinkAsBold "ShowBlinkAsBold" 917d522f475Smrg#define XtCShowMissingGlyphs "ShowMissingGlyphs" 918492d43a5Smrg#define XtCShowWrapMarks "ShowWrapMarks" 919d522f475Smrg#define XtCSignalInhibit "SignalInhibit" 920e0a2b6dfSmrg#define XtCSixelScrolling "SixelScrolling" 921894e0ac8Smrg#define XtCSixelScrollsRight "SixelScrollsRight" 922980988aeSmrg#define XtCSunFunctionKeys "SunFunctionKeys" 923980988aeSmrg#define XtCSunKeyboard "SunKeyboard" 924980988aeSmrg#define XtCTcapFunctionKeys "TcapFunctionKeys" 925d522f475Smrg#define XtCTekInhibit "TekInhibit" 926d522f475Smrg#define XtCTekSmall "TekSmall" 927d522f475Smrg#define XtCTekStartup "TekStartup" 928980988aeSmrg#define XtCTermName "TermName" 929d522f475Smrg#define XtCTiXtraScroll "TiXtraScroll" 930d522f475Smrg#define XtCTiteInhibit "TiteInhibit" 93120d2c4d2Smrg#define XtCTitleModes "TitleModes" 932d522f475Smrg#define XtCToolBar "ToolBar" 933d522f475Smrg#define XtCTrimSelection "TrimSelection" 934980988aeSmrg#define XtCTtyModes "TtyModes" 935d522f475Smrg#define XtCUnderLine "UnderLine" 936d4fba8b9Smrg#define XtCUseBorderClipping "UseBorderClipping" 937d522f475Smrg#define XtCUseClipping "UseClipping" 938980988aeSmrg#define XtCUseInsertMode "UseInsertMode" 939d522f475Smrg#define XtCUtf8 "Utf8" 940e39b573cSmrg#define XtCUtf8Fonts "Utf8Fonts" 941d522f475Smrg#define XtCUtf8Latin1 "Utf8Latin1" 942956cc18dSsnj#define XtCUtf8SelectTypes "Utf8SelectTypes" 943d522f475Smrg#define XtCUtf8Title "Utf8Title" 944d4fba8b9Smrg#define XtCUtf8Weblike "Utf8Weblike" 945980988aeSmrg#define XtCUtmpDisplayId "UtmpDisplayId" 946980988aeSmrg#define XtCUtmpInhibit "UtmpInhibit" 947d522f475Smrg#define XtCVT100Graphics "VT100Graphics" 948980988aeSmrg#define XtCValidShells "ValidShells" 949d522f475Smrg#define XtCVeryBoldColors "VeryBoldColors" 950d522f475Smrg#define XtCVisualBell "VisualBell" 951d522f475Smrg#define XtCVisualBellDelay "VisualBellDelay" 9520bd37d32Smrg#define XtCVisualBellLine "VisualBellLine" 953980988aeSmrg#define XtCWaitForMap "WaitForMap" 954d522f475Smrg#define XtCWideBoldFont "WideBoldFont" 955d522f475Smrg#define XtCWideChars "WideChars" 956d522f475Smrg#define XtCWideFont "WideFont" 957d1603babSmrg#define XtCXftMaxGlyphMemory "XftMaxGlyphMemory" 958d1603babSmrg#define XtCXftMaxUnrefFonts "XftMaxUnrefFonts" 959d1603babSmrg#define XtCXftTrackMemUsage "XftTrackMemUsage" 960d522f475Smrg#define XtCXimFont "XimFont" 961913cc679Smrg#define XtCXmcAttributes "XmcAttributes" /* ncurses-testing */ 962913cc679Smrg#define XtCXmcGlitch "XmcGlitch" /* ncurses-testing */ 963913cc679Smrg#define XtCXmcInline "XmcInline" /* ncurses-testing */ 964913cc679Smrg#define XtCXmcMoveSGR "XmcMoveSGR" /* ncurses-testing */ 965980988aeSmrg#define XtCZIconBeep "ZIconBeep" 966980988aeSmrg#define XtCZIconTitleFormat "ZIconTitleFormat" 967d522f475Smrg 968d522f475Smrg#if defined(NO_ACTIVE_ICON) && !defined(XtNgeometry) 969d522f475Smrg#define XtNgeometry "geometry" 970d522f475Smrg#define XtCGeometry "Geometry" 971d522f475Smrg#endif 972d522f475Smrg 973d522f475Smrg#if OPT_COLOR_CLASS 974d522f475Smrg#define XtCCursorColor "CursorColor" 975d522f475Smrg#define XtCPointerColor "PointerColor" 976d522f475Smrg#define XtCHighlightColor "HighlightColor" 977d522f475Smrg#define XtCHighlightTextColor "HighlightTextColor" 978d522f475Smrg#else 979d522f475Smrg#define XtCCursorColor XtCForeground 980d522f475Smrg#define XtCPointerColor XtCForeground 981d522f475Smrg#define XtCHighlightColor XtCForeground 982d522f475Smrg#define XtCHighlightTextColor XtCBackground 983d522f475Smrg#endif 984d522f475Smrg 985d522f475Smrg/***====================================================================***/ 986d522f475Smrg 987d522f475Smrg#ifdef __cplusplus 988d522f475Smrgextern "C" { 989d522f475Smrg#endif 990d522f475Smrg 991d522f475Smrgstruct XTERM_RESOURCE; 992d522f475Smrg 993d522f475Smrg/* Tekproc.c */ 994d522f475Smrg#if OPT_TEK4014 995956cc18dSsnjextern TekWidget getTekWidget(Widget /* w */); 996d522f475Smrgextern int TekGetFontSize (const char * /* param */); 997d522f475Smrgextern int TekInit (void); 998d522f475Smrgextern void ChangeTekColors (TekWidget /* tw */, TScreen * /* screen */, ScrnColors * /* pNew */); 999d522f475Smrgextern void HandleGINInput PROTO_XT_ACTIONS_ARGS; 1000d522f475Smrgextern void TCursorToggle (TekWidget /* tw */, int /* toggle */); 1001d522f475Smrgextern void TekCopy (TekWidget /* tw */); 1002d522f475Smrgextern void TekEnqMouse (TekWidget /* tw */, int /* c */); 1003980988aeSmrgextern void TekExpose (Widget /* w */, XEvent * /* event */, Region /* region */); 1004d522f475Smrgextern void TekGINoff (TekWidget /* tw */); 1005d522f475Smrgextern void TekRefresh (TekWidget /* tw */); 1006d522f475Smrgextern void TekRepaint (TekWidget /* xw */); 1007913cc679Smrgextern void TekReverseVideo (XtermWidget /* xw */, TekWidget /* tw */); 1008d522f475Smrgextern void TekRun (void); 1009980988aeSmrgextern void TekSetFontSize (TekWidget /* tw */, Bool /* fromMenu */, int /* newitem */); 1010913cc679Smrgextern void TekSetWinSize (TekWidget /* tw */); 1011d522f475Smrgextern void TekSimulatePageButton (TekWidget /* tw */, Bool /* reset */); 1012d522f475Smrg#endif 1013d522f475Smrg 1014d522f475Smrg/* button.c */ 1015492d43a5Smrg#define MotionOff( s, t ) if (!(screen->hide_pointer)) { \ 1016d522f475Smrg (s)->event_mask |= ButtonMotionMask; \ 1017d522f475Smrg (s)->event_mask &= ~PointerMotionMask; \ 1018d522f475Smrg XSelectInput(XtDisplay((t)), XtWindow((t)), (long) (s)->event_mask); } 1019d522f475Smrg 1020d522f475Smrg#define MotionOn( s, t ) { \ 1021d522f475Smrg (s)->event_mask &= ~ButtonMotionMask; \ 1022d522f475Smrg (s)->event_mask |= PointerMotionMask; \ 1023d522f475Smrg XSelectInput(XtDisplay((t)), XtWindow((t)), (long) (s)->event_mask); } 1024d522f475Smrg 1025980988aeSmrgextern Bool SendMousePosition (XtermWidget /* w */, XEvent* /* event */); 1026913cc679Smrgextern XtermMouseModes okSendMousePos(XtermWidget /* xw */); 1027d522f475Smrgextern void DiredButton PROTO_XT_ACTIONS_ARGS; 1028980988aeSmrgextern void DisownSelection (XtermWidget /* xw */); 1029980988aeSmrgextern void UnhiliteSelection (XtermWidget /* xw */); 10306879286fSmrgextern void HandleCopySelection PROTO_XT_ACTIONS_ARGS; 1031d522f475Smrgextern void HandleInsertSelection PROTO_XT_ACTIONS_ARGS; 1032d522f475Smrgextern void HandleKeyboardSelectEnd PROTO_XT_ACTIONS_ARGS; 1033d522f475Smrgextern void HandleKeyboardSelectExtend PROTO_XT_ACTIONS_ARGS; 1034d522f475Smrgextern void HandleKeyboardSelectStart PROTO_XT_ACTIONS_ARGS; 1035d522f475Smrgextern void HandleKeyboardStartExtend PROTO_XT_ACTIONS_ARGS; 1036d4fba8b9Smrgextern void HandlePointerMotion PROTO_XT_ACTIONS_ARGS; 1037d4fba8b9Smrgextern void HandlePointerButton PROTO_XT_ACTIONS_ARGS; 1038d522f475Smrgextern void HandleSelectEnd PROTO_XT_ACTIONS_ARGS; 1039d522f475Smrgextern void HandleSelectExtend PROTO_XT_ACTIONS_ARGS; 1040d522f475Smrgextern void HandleSelectSet PROTO_XT_ACTIONS_ARGS; 1041d522f475Smrgextern void HandleSelectStart PROTO_XT_ACTIONS_ARGS; 1042d522f475Smrgextern void HandleStartExtend PROTO_XT_ACTIONS_ARGS; 1043980988aeSmrgextern void ResizeSelection (TScreen * /* screen */, int /* rows */, int /* cols */); 1044980988aeSmrgextern void ScrollSelection (TScreen * /* screen */, int /* amount */, Bool /* always */); 1045190d7dceSmrgextern void TrackMouse (XtermWidget /* xw */, int /* func */, const CELL * /* start */, int /* firstrow */, int /* lastrow */); 1046d522f475Smrgextern void ViButton PROTO_XT_ACTIONS_ARGS; 1047d522f475Smrg 1048d4fba8b9Smrgextern void UnmapSelections (XtermWidget /* xw */); 1049d4fba8b9Smrgextern int xtermUtf8ToTextList (XtermWidget /* xw */, XTextProperty * /* text_prop */, char *** /* text_list */, int * /* text_list_count */); 1050d4fba8b9Smrgextern void xtermButtonInit (XtermWidget /* xw */); 105120d2c4d2Smrg 1052d522f475Smrg#if OPT_DEC_LOCATOR 1053980988aeSmrgextern void GetLocatorPosition (XtermWidget /* w */); 1054980988aeSmrgextern void InitLocatorFilter (XtermWidget /* w */); 1055d522f475Smrg#endif /* OPT_DEC_LOCATOR */ 1056d522f475Smrg 1057d522f475Smrg#if OPT_FOCUS_EVENT 1058d522f475Smrgextern void SendFocusButton(XtermWidget /* xw */, XFocusChangeEvent * /* event */); 1059d522f475Smrg#else 1060d522f475Smrg#define SendFocusBotton(xw, event) /* nothing */ 1061d522f475Smrg#endif 1062d522f475Smrg 1063d522f475Smrg#if OPT_PASTE64 1064980988aeSmrgextern void AppendToSelectionBuffer (TScreen * /* screen */, unsigned /* c */, String /* selection */); 1065d4fba8b9Smrgextern void ClearSelectionBuffer (TScreen * /* screen */, String /* selection */); 1066980988aeSmrgextern void CompleteSelection (XtermWidget /* xw */, String * /* args */, Cardinal /* len */); 1067980988aeSmrgextern void xtermGetSelection (Widget /* w */, Time /* ev_time */, String * /* params */, Cardinal /* num_params */, Atom * /* targets */); 1068d522f475Smrg#endif 1069d522f475Smrg 1070d522f475Smrg#if OPT_READLINE 1071d522f475Smrgextern void ReadLineButton PROTO_XT_ACTIONS_ARGS; 1072d522f475Smrg#endif 1073d522f475Smrg 1074913cc679Smrg#if OPT_REPORT_CCLASS 1075913cc679Smrgextern void report_char_class(XtermWidget); 1076913cc679Smrg#endif 1077913cc679Smrg 1078980988aeSmrg#define IsAscii1(n) (((n) >= 32 && (n) <= 126)) 1079980988aeSmrg 1080d522f475Smrg#if OPT_WIDE_CHARS 108120d2c4d2Smrg#define WideCells(n) (((IChar)(n) >= first_widechar) ? my_wcwidth((wchar_t) (n)) : 1) 1082d4fba8b9Smrg#define isWideFrg(n) (((n) == HIDDEN_CHAR) || (WideCells((n)) == 2)) 1083d4fba8b9Smrg#define isWide(n) (((IChar)(n) >= first_widechar) && isWideFrg(n)) 1084980988aeSmrg#define CharWidth(screen, n) (((n) < 256) \ 1085c48a5815Smrg ? (IsLatin1(n) ? 1 : 0) \ 1086c48a5815Smrg : my_wcwidth((wchar_t) (n))) 1087980988aeSmrg#define IsLatin1(n) (IsAscii1(n) || ((n) >= 160 && (n) <= 255)) 108820d2c4d2Smrg#else 108920d2c4d2Smrg#define WideCells(n) 1 1090c48a5815Smrg#define CharWidth(screen, n) (IsLatin1(n) ? 1 : 0) 1091980988aeSmrg#define IsLatin1(n) (IsAscii1(n) || ((n) >= 160)) 1092d522f475Smrg#endif 1093d522f475Smrg 1094d522f475Smrg/* cachedCgs.c */ 1095d522f475Smrgextern CgsEnum getCgsId(XtermWidget /*xw*/, VTwin * /*cgsWin*/, GC /*gc*/); 1096d522f475Smrgextern GC freeCgs(XtermWidget /*xw*/, VTwin * /*cgsWin*/, CgsEnum /*cgsId*/); 1097d522f475Smrgextern GC getCgsGC(XtermWidget /*xw*/, VTwin * /*cgsWin*/, CgsEnum /*cgsId*/); 1098d522f475Smrgextern Pixel getCgsBack(XtermWidget /*xw*/, VTwin * /*cgsWin*/, GC /*gc*/); 1099d522f475Smrgextern Pixel getCgsFore(XtermWidget /*xw*/, VTwin * /*cgsWin*/, GC /*gc*/); 1100d522f475Smrgextern XTermFonts * getCgsFont(XtermWidget /*xw*/, VTwin * /*cgsWin*/, GC /*gc*/); 1101d522f475Smrgextern void clrCgsFonts(XtermWidget /*xw*/, VTwin * /*cgsWin*/, XTermFonts * /*font*/); 1102d522f475Smrgextern void copyCgs(XtermWidget /*xw*/, VTwin * /*cgsWin*/, CgsEnum /*dstCgsId*/, CgsEnum /*srcCgsId*/); 1103d522f475Smrgextern void redoCgs(XtermWidget /*xw*/, Pixel /*fg*/, Pixel /*bg*/, CgsEnum /*cgsId*/); 1104d522f475Smrgextern void setCgsBack(XtermWidget /*xw*/, VTwin * /*cgsWin*/, CgsEnum /*cgsId*/, Pixel /*bg*/); 1105d522f475Smrgextern void setCgsCSet(XtermWidget /*xw*/, VTwin * /*cgsWin*/, CgsEnum /*cgsId*/, unsigned /*cset*/); 1106d522f475Smrgextern void setCgsFont(XtermWidget /*xw*/, VTwin * /*cgsWin*/, CgsEnum /*cgsId*/, XTermFonts * /*font*/); 1107d4fba8b9Smrgextern void setCgsFont2(XtermWidget /*xw*/, VTwin * /*cgsWin*/, CgsEnum /*cgsId*/, XTermFonts * /*font*/, unsigned /*which*/); 1108d522f475Smrgextern void setCgsFore(XtermWidget /*xw*/, VTwin * /*cgsWin*/, CgsEnum /*cgsId*/, Pixel /*fg*/); 1109980988aeSmrgextern void setCgsLine(XtermWidget /*xw*/, VTwin * /*cgsWin*/, CgsEnum /*cgsId*/, Pixel /*fg*/); 1110d522f475Smrgextern void swapCgs(XtermWidget /*xw*/, VTwin * /*cgsWin*/, CgsEnum /*dstCgsId*/, CgsEnum /*srcCgsId*/); 1111d522f475Smrg 1112d522f475Smrg#ifdef NO_LEAKS 1113d522f475Smrgextern void noleaks_cachedCgs (XtermWidget /* xw */); 1114d522f475Smrg#endif 1115d522f475Smrg 1116d522f475Smrg/* charproc.c */ 1117d522f475Smrgextern Bool CheckBufPtrs (TScreen * /* screen */); 1118492d43a5Smrgextern Bool set_cursor_gcs (XtermWidget /* xw */); 1119d4fba8b9Smrgextern char * vt100ResourceToString (XtermWidget /* xw */, const char * /* name */); 1120956cc18dSsnjextern int VTInit (XtermWidget /* xw */); 1121980988aeSmrgextern Bool FindFontSelection (XtermWidget /* xw */, const char * /* atom_name */, Bool /* justprobe */); 1122d4fba8b9Smrgextern void HideCursor (XtermWidget /* xw */); 1123d4fba8b9Smrgextern void RestartBlinking(XtermWidget /* xw */); 1124d4fba8b9Smrgextern void ShowCursor (XtermWidget /* xw */); 1125d1603babSmrgextern void SwitchBufPtrs (XtermWidget /* xw */, int /* toBuf */); 1126d522f475Smrgextern void ToggleAlternate (XtermWidget /* xw */); 1127a1f3da82Smrgextern void VTInitTranslations (void); 11288f44fb3bSmrgextern GCC_NORETURN void VTReset (XtermWidget /* xw */, int /* full */, int /* saved */); 1129956cc18dSsnjextern void VTRun (XtermWidget /* xw */); 1130980988aeSmrgextern void dotext (XtermWidget /* xw */, DECNRCM_codes /* charset */, IChar * /* buf */, Cardinal /* len */); 113101037d57Smrgextern void getKeymapResources(Widget /* w */, const char * /*mapName */, const char * /* mapClass */, const char * /* type */, void * /* result */, size_t /* size */); 1132d4fba8b9Smrgextern void initBorderGC (XtermWidget /* xw */, VTwin * /* win */); 11330bd37d32Smrgextern void lookupSelectUnit(XtermWidget /* xw */, Cardinal /* item */, String /* value */); 1134d522f475Smrgextern void releaseCursorGCs(XtermWidget /*xw*/); 1135d522f475Smrgextern void releaseWindowGCs(XtermWidget /*xw*/, VTwin * /*win*/); 1136d522f475Smrgextern void resetCharsets (TScreen * /* screen */); 1137d4fba8b9Smrgextern void resetMargins (XtermWidget /* xw */); 1138190d7dceSmrgextern void restoreCharsets (TScreen * /* screen */, const DECNRCM_codes * /* source */); 1139d4fba8b9Smrgextern void saveCharsets (TScreen * /* screen */, DECNRCM_codes * /* target */); 1140980988aeSmrgextern void set_max_col(TScreen * /* screen */, int /* cols */); 1141980988aeSmrgextern void set_max_row(TScreen * /* screen */, int /* rows */); 1142d1603babSmrgextern void unparse_disallowed_ops (XtermWidget /* xw */, char * /* value */); 1143d522f475Smrgextern void unparse_end (XtermWidget /* xw */); 1144980988aeSmrgextern void unparseputc (XtermWidget /* xw */, int /* c */); 1145980988aeSmrgextern void unparseputc1 (XtermWidget /* xw */, int /* c */); 1146d522f475Smrgextern void unparseputn (XtermWidget /* xw */, unsigned /* n */); 114720d2c4d2Smrgextern void unparseputs (XtermWidget /* xw */, const char * /* s */); 1148d522f475Smrgextern void unparseseq (XtermWidget /* xw */, ANSI * /* ap */); 1149980988aeSmrgextern void v_write (int /* f */, const Char * /* d */, size_t /* len */); 1150d1603babSmrgextern void xtermAddInput (Widget /* w */); 1151d4fba8b9Smrgextern void xtermDecodeSCS (XtermWidget /* xw */, int /* which */, int /* sgroup */, int /* prefix */, int /* suffix */); 1152d522f475Smrg 1153d522f475Smrg#if OPT_BLINK_CURS 1154d4fba8b9Smrgextern void ToggleCursorBlink(XtermWidget /* xw */); 1155d522f475Smrg#endif 1156d522f475Smrg 11570bd37d32Smrg#if OPT_BLINK_TEXT 115801037d57Smrgextern Bool LineHasBlinking(TScreen * /* screen */, CLineData * /* ld */); 11590bd37d32Smrg#endif 11600bd37d32Smrg 11610bd37d32Smrg#if OPT_INPUT_METHOD 11620bd37d32Smrgextern TInput *lookupTInput (XtermWidget /* xw */, Widget /* w */); 11630bd37d32Smrg#endif 11640bd37d32Smrg 1165d522f475Smrg#if OPT_ISO_COLORS 1166980988aeSmrgextern void SGR_Background (XtermWidget /* xw */, int /* color */); 1167980988aeSmrgextern void SGR_Foreground (XtermWidget /* xw */, int /* color */); 1168d4fba8b9Smrgextern void setExtendedColors (XtermWidget /* xw */); 1169d522f475Smrg#endif 1170d522f475Smrg 1171d522f475Smrg#ifdef NO_LEAKS 1172d522f475Smrgextern void noleaks_charproc (void); 1173d522f475Smrg#endif 1174d522f475Smrg 1175d522f475Smrg/* charsets.c */ 1176980988aeSmrgextern unsigned xtermCharSetIn (XtermWidget /* xw */, unsigned /* code */, DECNRCM_codes /* charset */); 1177980988aeSmrgextern Cardinal xtermCharSetOut (XtermWidget /* xw */, Cardinal /* length */, DECNRCM_codes /* charset */); 1178980988aeSmrgextern int xtermCharSetDec (XtermWidget /* xw */, IChar /* ch */, DECNRCM_codes /* cs */); 1179d522f475Smrg 1180d522f475Smrg/* cursor.c */ 11810bd37d32Smrgextern int CursorCol (XtermWidget /* xw */); 11820bd37d32Smrgextern int CursorRow (XtermWidget /* xw */); 1183d522f475Smrgextern void AdjustSavedCursor (XtermWidget /* xw */, int /* adjust */); 11840bd37d32Smrgextern void CarriageReturn (XtermWidget /* xw */); 11850bd37d32Smrgextern void CursorBack (XtermWidget /* xw */, int /* n */); 11860bd37d32Smrgextern void CursorDown (TScreen * /* screen */, int /* n */); 11870bd37d32Smrgextern void CursorForward (XtermWidget /* xw */, int /* n */); 11880bd37d32Smrgextern void CursorNextLine (XtermWidget /* xw */, int /* count */); 11890bd37d32Smrgextern void CursorPrevLine (XtermWidget /* xw */, int /* count */); 119050027b5bSmrgextern void CursorRestore2 (XtermWidget /* xw */, SavedCursor * /* sc */); 1191980988aeSmrgextern void CursorRestore (XtermWidget /* xw */); 119250027b5bSmrgextern void CursorSave2 (XtermWidget /* xw */, SavedCursor * /* sc */); 1193980988aeSmrgextern void CursorSave (XtermWidget /* xw */); 1194980988aeSmrgextern void CursorSet (TScreen * /* screen */, int /* row */, int /* col */, unsigned /* flags */); 1195980988aeSmrgextern void CursorUp (TScreen * /* screen */, int /* n */); 1196980988aeSmrgextern void RevIndex (XtermWidget /* xw */, int /* amount */); 1197980988aeSmrgextern void xtermIndex (XtermWidget /* xw */, int /* amount */); 1198d522f475Smrg 1199d522f475Smrg#if OPT_TRACE 1200980988aeSmrgextern int set_cur_col(TScreen * /* screen */, int /* value */); 1201980988aeSmrgextern int set_cur_row(TScreen * /* screen */, int /* value */); 1202d522f475Smrg#else 1203d522f475Smrg#define set_cur_col(screen, value) screen->cur_col = value 120450027b5bSmrg#define set_cur_row(screen, value) \ 120550027b5bSmrg do { \ 120650027b5bSmrg int row_value = value; \ 120750027b5bSmrg if_STATUS_LINE(screen, { \ 120850027b5bSmrg row_value = LastRowNumber(screen); \ 120950027b5bSmrg }); \ 121050027b5bSmrg screen->cur_row = row_value; \ 121150027b5bSmrg } while (0) 1212d522f475Smrg#endif 1213d522f475Smrg 1214d4fba8b9Smrg/* cursorfont.c */ 1215980988aeSmrgextern Cursor CreateAlternateCursorFontCursor(Display * /* dpy */, char const * /* cursorfont */, unsigned int /* which */); 1216d4fba8b9Smrgextern int CursorFontIndexFromShapeName(char const * /* shapename */); 1217d4fba8b9Smrg 1218d522f475Smrg/* doublechr.c */ 1219980988aeSmrgextern void xterm_DECDHL (XtermWidget /* xw */, Bool /* top */); 1220d522f475Smrgextern void xterm_DECSWL (XtermWidget /* xw */); 1221d522f475Smrgextern void xterm_DECDWL (XtermWidget /* xw */); 12220bd37d32Smrgextern void xterm_ResetDouble(XtermWidget /* xw */); 1223d522f475Smrg#if OPT_DEC_CHRSET 1224d4fba8b9Smrgextern GC xterm_DoubleGC(XTermDraw * /* params */, GC /* old_gc */, int * /* inxp */); 1225d4fba8b9Smrg#if OPT_RENDERFONT 1226d1603babSmrgextern XTermXftFonts * xterm_DoubleFT(XTermDraw * /* params */, unsigned /* chrset */, unsigned /* attr_flags */); 1227d4fba8b9Smrgextern void freeall_DoubleFT(XtermWidget /* xw */); 1228d4fba8b9Smrg#endif 1229d522f475Smrg#endif 1230d522f475Smrg 1231d522f475Smrg/* input.c */ 1232956cc18dSsnjextern unsigned xtermParamToState (XtermWidget /* xw */, unsigned /* param */); 1233956cc18dSsnjextern unsigned xtermStateToParam (XtermWidget /* xw */, unsigned /* state */); 1234d522f475Smrgextern Bool xtermDeleteIsDEL (XtermWidget /* xw */); 1235d522f475Smrgextern void Input (XtermWidget /* xw */, XKeyEvent */* event */, Bool /* eightbit */); 1236980988aeSmrgextern void StringInput (XtermWidget /* xw */, const Char * /* string */, size_t /* nbytes */); 1237d522f475Smrg 1238d522f475Smrg#if OPT_NUM_LOCK 1239d522f475Smrgextern void VTInitModifiers(XtermWidget /* xw */); 1240d4fba8b9Smrg#else 1241d4fba8b9Smrg#define VTInitModifiers(xw) /* nothing */ 1242d522f475Smrg#endif 1243d522f475Smrg 1244956cc18dSsnj/* linedata.c */ 1245956cc18dSsnjextern LineData *getLineData(TScreen * /* screen */, int /* row */); 124601037d57Smrgextern void copyLineData(LineData * /* dst */, CLineData * /* src */); 1247956cc18dSsnjextern void initLineData(XtermWidget /* xw */); 1248956cc18dSsnj 1249956cc18dSsnjextern CellData *newCellData(XtermWidget /* xw */, Cardinal /* count */); 1250d4fba8b9Smrgextern void saveCellData(TScreen * /* screen */, CellData * /* data */, Cardinal /* cell */, CLineData * /* ld */, XTermRect * /* limits */, int /* column */); 1251d4fba8b9Smrgextern void restoreCellData(TScreen * /* screen */, const CellData * /* data */, Cardinal /* cell */, LineData * /* ld */, XTermRect * /* limits */, int /* column */); 1252956cc18dSsnj 1253d522f475Smrg/* main.c */ 1254d522f475Smrg#define ENVP_ARG /**/ 1255d522f475Smrg 1256980988aeSmrgextern int main (int /* argc */, char ** /* argv */ ENVP_ARG); 1257980988aeSmrgextern int xtermDisabledChar(void); 1258980988aeSmrgextern int GetBytesAvailable (Display * /* dpy */); 1259980988aeSmrgextern int kill_process_group (int /* pid */, int /* sig */); 1260d522f475Smrgextern int nonblocking_wait (void); 1261980988aeSmrgextern Atom CachedInternAtom(Display * /* display */, const char * /* name */); 1262d522f475Smrg 1263d1603babSmrgextern int get_tty_erase(int /* fd */, int /* default_erase */, const char * /* tag */); 1264d1603babSmrgextern int get_tty_lnext(int /* fd */, int /* default_lnext */, const char * /* tag */); 1265d1603babSmrg 1266d522f475Smrg#if OPT_PTY_HANDSHAKE 1267d522f475Smrgextern void first_map_occurred (void); 1268d522f475Smrg#else 1269d522f475Smrg#define first_map_occurred() /* nothing */ 1270d522f475Smrg#endif 1271d522f475Smrg 12728f44fb3bSmrgextern GCC_NORETURN void Exit (int /* n */); 1273d522f475Smrg 1274d522f475Smrg#ifndef SIG_ATOMIC_T 1275d522f475Smrg#define SIG_ATOMIC_T int 1276d522f475Smrg#endif 1277d522f475Smrg 1278d522f475Smrg#if OPT_WIDE_CHARS 127920d2c4d2Smrgextern unsigned first_widechar; 1280d522f475Smrgextern int (*my_wcwidth)(wchar_t); 1281d522f475Smrg#endif 1282d522f475Smrg 1283d522f475Smrg/* menu.c */ 1284d522f475Smrgextern void do_hangup PROTO_XT_CALLBACK_ARGS; 1285d522f475Smrgextern void repairSizeHints (void); 1286913cc679Smrgextern void show_8bit_control (Bool /* value */); 1287d522f475Smrg 1288d522f475Smrg/* misc.c */ 1289e39b573cSmrg 1290e39b573cSmrg#define TIMESTAMP_LEN 20 /* length of TIMESTAMP_FMT */ 1291e39b573cSmrg 129220d2c4d2Smrgextern Bool AllocateTermColor(XtermWidget, ScrnColors *, int, const char *, Bool); 1293d4fba8b9Smrgextern Boolean allocateBestRGB(XtermWidget /* xw */, XColor * /* def */); 1294d4fba8b9Smrgextern Boolean validProgram(const char * /* pathname */); 12950bd37d32Smrgextern Boolean xtermGetWinAttrs(Display * /* dpy */, Window /* win */, XWindowAttributes * /* attrs */); 12960bd37d32Smrgextern Boolean xtermGetWinProp(Display * /* dpy */, Window /* win */, Atom /* property */, long /* long_offset */, long /* long_length */, Atom /* req_type */, Atom * /* actual_type_return */, int * /* actual_format_return */, unsigned long * /* nitems_return */, unsigned long * /* bytes_after_return */, unsigned char ** /* prop_return */); 1297d4fba8b9Smrgextern Boolean xtermIsIconified (XtermWidget /* xw */); 1298913cc679Smrgextern Cursor make_colored_cursor (unsigned /* cursorindex */, unsigned long /* fg */, unsigned long /* bg */); 1299d4fba8b9Smrgextern FILE * create_printfile(XtermWidget /* xw */, const char * /* suffix */); 1300d522f475Smrgextern OptionHelp * sortedOpts(OptionHelp *, XrmOptionDescRec *, Cardinal); 13010bd37d32Smrgextern String xtermEnvLocale (void); 1302d4fba8b9Smrgextern Widget xtermOpenApplication (XtAppContext * /* app_context_return */, String /* application_class */, XrmOptionDescRec */* options */, Cardinal /* num_options */, int * /* argc_in_out */, char **/* argv_in_out */, String * /* fallback_resources */, WidgetClass /* widget_class */, ArgList /* args */, Cardinal /* num_args */); 1303d4fba8b9Smrgextern Window WMFrameWindow (XtermWidget /* xw */); 13040bd37d32Smrgextern XtInputMask xtermAppPending (void); 1305190d7dceSmrgextern XrmOptionDescRec * sortedOptDescs (const XrmOptionDescRec *, Cardinal); 13060bd37d32Smrgextern XtermWidget getXtermWidget (Widget /* w */); 1307c48a5815Smrgextern XVisualInfo *getVisualInfo (XtermWidget /* xw */); 1308894e0ac8Smrgextern char *udk_lookup (XtermWidget /* xw */, int /* keycode */, int * /* len */); 1309d522f475Smrgextern char *xtermEnvEncoding (void); 1310913cc679Smrgextern char *xtermFindShell (char * /* leaf */, Bool /* warning */); 1311d4fba8b9Smrgextern char *xtermFormatSGR (XtermWidget /* xw */, char * /* target */, unsigned /* attrs */, int /* fg */, int /* bg */); 1312d522f475Smrgextern const char *SysErrorMsg (int /* n */); 1313d522f475Smrgextern const char *SysReasonMsg (int /* n */); 13140bd37d32Smrgextern int ResetAnsiColorRequest (XtermWidget, char *, int); 1315d522f475Smrgextern int XStrCmp (char * /* s1 */, char * /* s2 */); 1316913cc679Smrgextern int creat_as (uid_t /* uid */, gid_t /* gid */, Bool /* append */, char * /* pathname */, unsigned /* mode */); 13170bd37d32Smrgextern int getVisualDepth (XtermWidget /* xw */); 1318d4fba8b9Smrgextern int ignore_x11_error(Display * /* dpy */, XErrorEvent * /* event */); 1319913cc679Smrgextern int open_userfile (uid_t /* uid */, gid_t /* gid */, char * /* path */, Bool /* append */); 132050027b5bSmrgextern int update_winsize (TScreen * /* screen */, int /* rows */, int /* cols */, int /* height */, int /* width */); 1321d522f475Smrgextern int xerror (Display * /* d */, XErrorEvent * /* ev */); 1322d522f475Smrgextern int xioerror (Display * /* dpy */); 13230bd37d32Smrgextern int xtermClosestColor (XtermWidget /* xw */, int /* red */, int /* green */, int /* blue */); 1324913cc679Smrgextern int xtermResetIds (TScreen * /* screen */); 1325913cc679Smrgextern void Bell (XtermWidget /* xw */, int /* which */, int /* percent */); 13260bd37d32Smrgextern void ChangeGroup(XtermWidget /* xw */, const char * /* attribute */, char * /* value */); 1327956cc18dSsnjextern void ChangeIconName (XtermWidget /* xw */, char * /* name */); 1328956cc18dSsnjextern void ChangeTitle (XtermWidget /* xw */, char * /* name */); 1329d522f475Smrgextern void ChangeXprop (char * /* name */); 13308f44fb3bSmrgextern GCC_NORETURN void Cleanup (int /* code */); 1331d522f475Smrgextern void HandleBellPropertyChange PROTO_XT_EV_HANDLER_ARGS; 1332d522f475Smrgextern void HandleEightBitKeyPressed PROTO_XT_ACTIONS_ARGS; 1333d522f475Smrgextern void HandleEnterWindow PROTO_XT_EV_HANDLER_ARGS; 1334d522f475Smrgextern void HandleFocusChange PROTO_XT_EV_HANDLER_ARGS; 1335d522f475Smrgextern void HandleInterpret PROTO_XT_ACTIONS_ARGS; 1336d522f475Smrgextern void HandleKeyPressed PROTO_XT_ACTIONS_ARGS; 1337d522f475Smrgextern void HandleLeaveWindow PROTO_XT_EV_HANDLER_ARGS; 1338d522f475Smrgextern void HandleSpawnTerminal PROTO_XT_ACTIONS_ARGS; 1339d522f475Smrgextern void HandleStringEvent PROTO_XT_ACTIONS_ARGS; 13400bd37d32Smrgextern void NormalExit (void); 1341913cc679Smrgextern void Panic (const char * /* s */, int /* a */); 1342d522f475Smrgextern void Redraw (void); 1343894e0ac8Smrgextern void ReverseOldColors (XtermWidget /* xw */); 13448f44fb3bSmrgextern GCC_NORETURN void SysError (int /* i */); 1345d522f475Smrgextern void VisualBell (void); 1346e0a2b6dfSmrgextern void cleanup_colored_cursor (void); 1347d4fba8b9Smrgextern void do_ansi_rqm (XtermWidget /* xw */, int /* nparam */, int * /* params */); 1348913cc679Smrgextern void do_dcs (XtermWidget /* xw */, Char * /* buf */, size_t /* len */); 1349d4fba8b9Smrgextern void do_dec_rqm (XtermWidget /* xw */, int /* nparam */, int * /* params */); 1350913cc679Smrgextern void do_osc (XtermWidget /* xw */, Char * /* buf */, size_t /* len */, int /* final */); 1351d4fba8b9Smrgextern void do_xevents (XtermWidget /* xw */); 1352d522f475Smrgextern void end_tek_mode (void); 1353d522f475Smrgextern void end_vt_mode (void); 135401037d57Smrgextern void free_string(String value); 1355d522f475Smrgextern void hide_tek_window (void); 1356d522f475Smrgextern void hide_vt_window (void); 13578f44fb3bSmrgextern GCC_NORETURN void ice_error (IceConn /* iceConn */); 13582e4f8982Smrgextern void init_colored_cursor (Display * /* dpy */); 1359190d7dceSmrgextern void parse_ansi_params(ANSI * /* params */, const char ** /* string */); 1360894e0ac8Smrgextern void reset_decudk (XtermWidget /* xw */); 1361913cc679Smrgextern void set_tek_visibility (Bool /* on */); 1362913cc679Smrgextern void set_vt_visibility (Bool /* on */); 1363913cc679Smrgextern void switch_modes (Bool /* tovt */); 1364d522f475Smrgextern void timestamp_filename(char * /* dst */, const char * /* src */); 1365d4fba8b9Smrgextern void xevents (XtermWidget /* xw */); 13668f44fb3bSmrgextern GCC_NORETURN void xt_error (String /* message */); 1367956cc18dSsnjextern void xtermBell(XtermWidget /* xw */, int /* which */, int /* percent */); 1368d522f475Smrgextern void xtermCopyEnv (char ** /* oldenv */); 13698f44fb3bSmrgextern void xtermDisplayPointer (XtermWidget /* xw */); 1370d4fba8b9Smrgextern void xtermDeiconify (XtermWidget /* xw */); 13710bd37d32Smrgextern void xtermEmbedWindow (Window /* winToEmbedInfo */); 1372d4fba8b9Smrgextern void xtermIconify (XtermWidget /* xw */); 1373d4fba8b9Smrgextern void xtermLoadIcon (XtermWidget /* xw */, const char * /* icon_hint */); 13740bd37d32Smrgextern void xtermPerror (const char * /*fmt*/,...) GCC_PRINTFLIKE(1,2); 137520d2c4d2Smrgextern void xtermSetenv (const char * /* var */, const char * /* value */); 13768f44fb3bSmrgextern void xtermSetupPointer (XtermWidget /* xw */, const char * /* theShape */); 1377913cc679Smrgextern void xtermSetWinSize (XtermWidget /* xw */); 1378d522f475Smrgextern void xtermShowPointer (XtermWidget /* xw */, Bool /* enable */); 13790bd37d32Smrgextern void xtermUnsetenv (const char * /* var */); 13800bd37d32Smrgextern void xtermWarning (const char * /*fmt*/,...) GCC_PRINTFLIKE(1,2); 1381d522f475Smrg 1382980988aeSmrgextern Boolean xtermPopTitle(TScreen * /* screen */, int /* which */, SaveTitle * /* item */); 1383980988aeSmrgextern void xtermPushTitle(TScreen * /* screen */, int /* which */, SaveTitle * /* item */); 1384980988aeSmrgextern void xtermFreeTitle(SaveTitle *item); 1385190d7dceSmrgextern void xtermReportTitleStack(XtermWidget /* xw */); 1386980988aeSmrg 1387d522f475Smrg#if OPT_DABBREV 1388d522f475Smrgextern void HandleDabbrevExpand PROTO_XT_ACTIONS_ARGS; 1389d522f475Smrg#endif 1390d522f475Smrg 1391d4fba8b9Smrg#if OPT_DIRECT_COLOR 1392d4fba8b9Smrgextern int getDirectColor(XtermWidget /* xw */, int /* red */, int /* green */, int /* blue */); 1393d4fba8b9Smrg#endif /* OPT_DIRECT_COLOR */ 1394d4fba8b9Smrg 1395d4fba8b9Smrg#if USE_DOUBLE_BUFFER 1396d4fba8b9Smrgextern void xtermFlushDbe(XtermWidget /* xw */); 1397d4fba8b9Smrgextern void xtermTimedDbe(XtermWidget /* xw */); 1398d4fba8b9Smrg#define xtermNeedSwap(xw,why) TScreenOf(xw)->needSwap |= (why) 1399d4fba8b9Smrg#else 1400d4fba8b9Smrg#define xtermFlushDbe(xw) /* nothing */ 1401d4fba8b9Smrg#define xtermTimedDbe(xw) /* nothing */ 1402d4fba8b9Smrg#define xtermNeedSwap(xw,why) /* nothing */ 1403d4fba8b9Smrg#endif /* USE_DOUBLE_BUFFER */ 1404d4fba8b9Smrg 14052e4f8982Smrg#if OPT_EXEC_XTERM 14062e4f8982Smrgextern char *ProcGetCWD(pid_t /* pid */); 14072e4f8982Smrg#else 14082e4f8982Smrg#define ProcGetCWD(pid) NULL 14092e4f8982Smrg#endif 14102e4f8982Smrg 1411c48a5815Smrg#if OPT_ISO_COLORS 1412c48a5815Smrgextern Boolean AllocOneColor(XtermWidget /* xw */, XColor * /* def */); 1413c48a5815Smrgextern Boolean QueryOneColor(XtermWidget /* xw */, XColor * /* def */); 1414c48a5815Smrg#else 1415c48a5815Smrg#define AllocOneColor(xw, def) ((def)->pixel = 0) 1416c48a5815Smrg#define QueryOneColor(xw, def) ((def)->red = (def)->green = (def)->blue = 0) 1417c48a5815Smrg#endif 1418c48a5815Smrg 1419d522f475Smrg#if OPT_MAXIMIZE 1420980988aeSmrgextern int QueryMaximize (XtermWidget /* xw */, unsigned * /* width */, unsigned * /* height */); 1421d522f475Smrgextern void HandleDeIconify PROTO_XT_ACTIONS_ARGS; 1422d522f475Smrgextern void HandleIconify PROTO_XT_ACTIONS_ARGS; 1423d522f475Smrgextern void HandleMaximize PROTO_XT_ACTIONS_ARGS; 1424d522f475Smrgextern void HandleRestoreSize PROTO_XT_ACTIONS_ARGS; 1425980988aeSmrgextern void RequestMaximize (XtermWidget /* xw */, int /* maximize */); 1426d4fba8b9Smrg#endif 1427d4fba8b9Smrg 1428d4fba8b9Smrg#if OPT_REPORT_ICONS 1429d4fba8b9Smrgextern void report_icons(const char *fmt,...) GCC_PRINTFLIKE(1,2); 1430d4fba8b9Smrg#define ReportIcons(params) report_icons params 1431d4fba8b9Smrg#else 1432d4fba8b9Smrg#define ReportIcons(params) TRACE(params) 1433d522f475Smrg#endif 1434d522f475Smrg 143520d2c4d2Smrg#if OPT_SCROLL_LOCK 143620d2c4d2Smrgextern void GetScrollLock (TScreen * /* screen */); 143720d2c4d2Smrgextern void HandleScrollLock PROTO_XT_ACTIONS_ARGS; 143820d2c4d2Smrgextern void ShowScrollLock (TScreen * /* screen */, Bool /* enable */); 143920d2c4d2Smrgextern void SetScrollLock (TScreen * /* screen */, Bool /* enable */); 144020d2c4d2Smrgextern void xtermShowLED (TScreen * /* screen */, Cardinal /* led_number */, Bool /* enable */); 144120d2c4d2Smrgextern void xtermClearLEDs (TScreen * /* screen */); 144220d2c4d2Smrg#else 144320d2c4d2Smrg#define ShowScrollLock(screen, enable) /* nothing */ 144420d2c4d2Smrg#define SetScrollLock(screen, enable) /* nothing */ 144520d2c4d2Smrg#define GetScrollLock(screen) /* nothing */ 144620d2c4d2Smrg#endif 144720d2c4d2Smrg 14480bd37d32Smrg#if OPT_SELECTION_OPS 14490bd37d32Smrgextern void HandleExecFormatted PROTO_XT_ACTIONS_ARGS; 14500bd37d32Smrgextern void HandleExecSelectable PROTO_XT_ACTIONS_ARGS; 14510bd37d32Smrgextern void HandleInsertFormatted PROTO_XT_ACTIONS_ARGS; 14520bd37d32Smrgextern void HandleInsertSelectable PROTO_XT_ACTIONS_ARGS; 14530bd37d32Smrg#endif 14540bd37d32Smrg 14550bd37d32Smrg#if OPT_SESSION_MGT 14560bd37d32Smrgextern void xtermCloseSession (void); 14570bd37d32Smrgextern void xtermOpenSession (void); 1458636d5e9fSmrgextern void xtermUpdateRestartCommand(XtermWidget /* xw */); 14590bd37d32Smrg#else 14600bd37d32Smrg#define xtermCloseSession() /* nothing */ 14610bd37d32Smrg#define xtermOpenSession() /* nothing */ 1462636d5e9fSmrg#define xtermUpdateRestartCommand(xw) /* nothing */ 14630bd37d32Smrg#endif 14640bd37d32Smrg 1465d522f475Smrg#if OPT_WIDE_CHARS 1466d522f475Smrgextern Bool xtermEnvUTF8(void); 1467d522f475Smrg#else 1468d522f475Smrg#define xtermEnvUTF8() False 1469d522f475Smrg#endif 1470d522f475Smrg 1471d4fba8b9Smrg#if OPT_XTERM_SGR 1472d4fba8b9Smrgextern void xtermPushSGR (XtermWidget /* xw */, int /* value */); 1473d4fba8b9Smrgextern void xtermPopSGR (XtermWidget /* xw */); 1474d4fba8b9Smrgextern void xtermReportSGR (XtermWidget /* xw */, XTermRect * /* value */); 1475d4fba8b9Smrgextern void xtermPushColors (XtermWidget /* xw */, int /* value */); 1476d4fba8b9Smrgextern void xtermPopColors (XtermWidget /* xw */, int /* value */); 1477d4fba8b9Smrgextern void xtermReportColors (XtermWidget /* xw */); 1478d4fba8b9Smrg#endif 1479d4fba8b9Smrg 1480d522f475Smrg#ifdef ALLOWLOGGING 148120d2c4d2Smrgextern void StartLog (XtermWidget /* xw */); 148220d2c4d2Smrgextern void CloseLog (XtermWidget /* xw */); 148320d2c4d2Smrgextern void FlushLog (XtermWidget /* xw */); 1484d522f475Smrg#else 148520d2c4d2Smrg#define FlushLog(xw) /*nothing*/ 1486d522f475Smrg#endif 1487d522f475Smrg 1488d522f475Smrg/* print.c */ 1489956cc18dSsnjextern Bool xtermHasPrinter (XtermWidget /* xw */); 1490e39b573cSmrgextern PrinterFlags *getPrinterFlags (XtermWidget /* xw */, String * /* params */, Cardinal * /* param_count */); 1491956cc18dSsnjextern int xtermPrinterControl (XtermWidget /* xw */, int /* chr */); 1492956cc18dSsnjextern void setPrinterControlMode (XtermWidget /* xw */, int /* mode */); 1493956cc18dSsnjextern void xtermAutoPrint (XtermWidget /* xw */, unsigned /* chr */); 1494980988aeSmrgextern void xtermMediaControl (XtermWidget /* xw */, int /* param */, int /* private_seq */); 1495980988aeSmrgextern void xtermPrintScreen (XtermWidget /* xw */, Bool /* use_DECPEX */, PrinterFlags * /* p */); 149620d2c4d2Smrgextern void xtermPrintEverything (XtermWidget /* xw */, PrinterFlags * /* p */); 1497e39b573cSmrgextern void xtermPrintImmediately (XtermWidget /* xw */, String /* filename */, int /* opts */, int /* attributes */); 1498e39b573cSmrgextern void xtermPrintOnXError (XtermWidget /* xw */, int /* n */); 1499d522f475Smrg 15002e4f8982Smrg#if OPT_SCREEN_DUMPS 15012e4f8982Smrg/* html.c */ 15022e4f8982Smrgextern void xtermDumpHtml (XtermWidget /* xw */); 1503d4fba8b9Smrgextern char *PixelToCSSColor(XtermWidget /* xw */, Pixel /* p */); 15042e4f8982Smrg/* svg.c */ 15052e4f8982Smrgextern void xtermDumpSvg (XtermWidget /* xw */); 15062e4f8982Smrg#endif 15072e4f8982Smrg 1508d522f475Smrg/* ptydata.c */ 1509d522f475Smrg#define PtySelect fd_set 1510d522f475Smrg 1511894e0ac8Smrgextern Bool decodeUtf8 (TScreen * /* screen */, PtyData * /* data */); 151220d2c4d2Smrgextern int readPtyData (XtermWidget /* xw */, PtySelect * /* select_mask */, PtyData * /* data */); 1513980988aeSmrgextern void fillPtyData (XtermWidget /* xw */, PtyData * /* data */, const char * /* value */, size_t /* length */); 1514d522f475Smrgextern void initPtyData (PtyData ** /* data */); 151520d2c4d2Smrgextern void trimPtyData (XtermWidget /* xw */, PtyData * /* data */); 1516d522f475Smrg 1517d522f475Smrg#ifdef NO_LEAKS 1518d522f475Smrgextern void noleaks_ptydata ( void ); 1519d522f475Smrg#endif 1520d522f475Smrg 1521d522f475Smrg#if OPT_WIDE_CHARS 1522d4fba8b9Smrgextern Boolean isValidUTF8 (Char * /* lp */); 1523980988aeSmrgextern Char *convertToUTF8 (Char * /* lp */, unsigned /* c */); 1524d4fba8b9Smrgextern Char *convertFromUTF8 (Char * /* lp */, unsigned * /* cp */); 1525d522f475Smrgextern IChar nextPtyData (TScreen * /* screen */, PtyData * /* data */); 1526d4fba8b9Smrgextern PtyData * fakePtyData (PtyData * /* result */, Char * /* next */, Char * /* last */); 1527980988aeSmrgextern void switchPtyData (TScreen * /* screen */, int /* f */); 1528980988aeSmrgextern void writePtyData (int /* f */, IChar * /* d */, size_t /* len */); 1529956cc18dSsnj 1530d4fba8b9Smrg#define morePtyData(screen, data) \ 1531956cc18dSsnj (((data)->last > (data)->next) \ 1532956cc18dSsnj ? (((screen)->utf8_inparse && !(data)->utf_size) \ 1533894e0ac8Smrg ? decodeUtf8(screen, data) \ 1534956cc18dSsnj : True) \ 1535956cc18dSsnj : False) 1536d4fba8b9Smrg 1537d4fba8b9Smrg#define skipPtyData(data, result) \ 1538d4fba8b9Smrg do { \ 1539d4fba8b9Smrg result = (data)->utf_data; \ 1540d4fba8b9Smrg (data)->next += (data)->utf_size; \ 1541d4fba8b9Smrg (data)->utf_size = 0; \ 1542d4fba8b9Smrg } while (0) 1543d522f475Smrg#else 1544d522f475Smrg#define morePtyData(screen, data) ((data)->last > (data)->next) 1545a1f3da82Smrg#define nextPtyData(screen, data) (IChar) (*((data)->next++) & \ 1546a1f3da82Smrg (screen->output_eight_bits \ 1547a1f3da82Smrg ? 0xff \ 1548a1f3da82Smrg : 0x7f)) 1549d522f475Smrg#define writePtyData(f,d,len) v_write(f,d,len) 1550d522f475Smrg#endif 1551d522f475Smrg 1552d522f475Smrg/* screen.c */ 15530bd37d32Smrg 15540bd37d32Smrg/* 15550bd37d32Smrg * See http://standards.freedesktop.org/wm-spec/wm-spec-latest.html 15560bd37d32Smrg */ 15570bd37d32Smrg#define _NET_WM_STATE_REMOVE 0 /* remove/unset property */ 15580bd37d32Smrg#define _NET_WM_STATE_ADD 1 /* add/set property */ 15590bd37d32Smrg#define _NET_WM_STATE_TOGGLE 2 /* toggle property */ 15600bd37d32Smrg 1561980988aeSmrgextern Bool non_blank_line (TScreen */* screen */, int /* row */, int /* col */, int /* len */); 156250027b5bSmrgextern Char * allocScrnData (TScreen * /* screen */, unsigned /* nrow */, unsigned /* ncol */, Bool /* bottom */); 1563980988aeSmrgextern ScrnBuf allocScrnBuf (XtermWidget /* xw */, unsigned /* nrow */, unsigned /* ncol */, ScrnPtr * /* addr */); 1564956cc18dSsnjextern ScrnBuf scrnHeadAddr (TScreen * /* screen */, ScrnBuf /* base */, unsigned /* offset */); 1565980988aeSmrgextern size_t ScrnPointers (TScreen * /* screen */, size_t /* len */); 1566980988aeSmrgextern void ClearBufRows (XtermWidget /* xw */, int /* first */, int /* last */); 1567d522f475Smrgextern void ClearCells (XtermWidget /* xw */, int /* flags */, unsigned /* len */, int /* row */, int /* col */); 1568d4fba8b9Smrgextern void CopyCells (TScreen * /* screen */, LineData * /* src */, LineData * /* dst */, int /* col */, int /* len */, Bool /* down */); 15690bd37d32Smrgextern void FullScreen (XtermWidget /* xw */, int /* mode */); 1570d4fba8b9Smrgextern void FreeMarkGCs (XtermWidget /* xw */); 1571980988aeSmrgextern void ResetHiddenHint (XtermWidget /* xw */); 1572980988aeSmrgextern void ScreenResize (XtermWidget /* xw */, int /* width */, int /* height */, unsigned * /* flags */); 1573956cc18dSsnjextern void ScrnAllocBuf (XtermWidget /* xw */); 1574d522f475Smrgextern void ScrnClearCells (XtermWidget /* xw */, int /* row */, int /* col */, unsigned /* len */); 1575980988aeSmrgextern void ScrnDeleteChar (XtermWidget /* xw */, unsigned /* n */); 1576980988aeSmrgextern void ScrnDeleteCol (XtermWidget /* xw */, unsigned /* n */); 1577980988aeSmrgextern void ScrnDeleteLine (XtermWidget /* xw */, ScrnBuf /* sb */, int /* n */, int /* last */, unsigned /* where */); 1578d522f475Smrgextern void ScrnDisownSelection (XtermWidget /* xw */); 1579d522f475Smrgextern void ScrnFillRectangle (XtermWidget /* xw */, XTermRect *, int , unsigned /* flags */, Bool /* keepColors */); 1580980988aeSmrgextern void ScrnInsertChar (XtermWidget /* xw */, unsigned /* n */); 1581980988aeSmrgextern void ScrnInsertCol (XtermWidget /* xw */, unsigned /* n */); 1582980988aeSmrgextern void ScrnInsertLine (XtermWidget /* xw */, ScrnBuf /* sb */, int /* last */, int /* where */, unsigned /* n */); 1583980988aeSmrgextern void ScrnRefresh (XtermWidget /* xw */, int /* toprow */, int /* leftcol */, int /* nrows */, int /* ncols */, Bool /* force */); 1584980988aeSmrgextern void ScrnUpdate (XtermWidget /* xw */, int /* toprow */, int /* leftcol */, int /* nrows */, int /* ncols */, Bool /* force */); 1585980988aeSmrgextern void ScrnWriteText (XtermWidget /* xw */, Cardinal /* offset */, Cardinal /* length */, unsigned /* flags */, CellColor /* cur_fg_bg */); 158601037d57Smrgextern void ShowWrapMarks (XtermWidget /* xw */, int /* row */, CLineData * /* ld */); 158750027b5bSmrgextern void setupLineData (TScreen * /* screen */, ScrnBuf /* base */, Char * /* data */, unsigned /* nrow */, unsigned /* ncol */, Bool /* bottom */); 1588d522f475Smrgextern void xtermParseRect (XtermWidget /* xw */, int, int *, XTermRect *); 1589d522f475Smrg 1590d522f475Smrg#if OPT_TRACE && OPT_TRACE_FLAGS 1591956cc18dSsnjextern int LineTstFlag(LineData /* ld */, int /* flag */); 1592956cc18dSsnjextern void LineClrFlag(LineData /* ld */, int /* flag */); 1593956cc18dSsnjextern void LineSetFlag(LineData /* ld */, int /* flag */); 1594d522f475Smrg#else 1595d522f475Smrg 1596956cc18dSsnj#define LineFlags(ld) GetLineFlags(ld) 1597956cc18dSsnj 1598956cc18dSsnj#define LineClrFlag(ld, flag) SetLineFlags(ld, (GetLineFlags(ld) & ~ (flag))) 1599956cc18dSsnj#define LineSetFlag(ld, flag) SetLineFlags(ld, (GetLineFlags(ld) | (flag))) 1600956cc18dSsnj#define LineTstFlag(ld, flag) ((GetLineFlags(ld) & flag) != 0) 1601d522f475Smrg 1602d522f475Smrg#endif /* OPT_TRACE && OPT_TRACE_FLAGS */ 1603d522f475Smrg 1604956cc18dSsnj#define LineClrBlinked(ld) LineClrFlag(ld, LINEBLINKED) 1605956cc18dSsnj#define LineSetBlinked(ld) LineSetFlag(ld, LINEBLINKED) 1606956cc18dSsnj#define LineTstBlinked(ld) LineTstFlag(ld, LINEBLINKED) 1607d522f475Smrg 1608956cc18dSsnj#define LineClrWrapped(ld) LineClrFlag(ld, LINEWRAPPED) 1609956cc18dSsnj#define LineSetWrapped(ld) LineSetFlag(ld, LINEWRAPPED) 1610956cc18dSsnj#define LineTstWrapped(ld) LineTstFlag(ld, LINEWRAPPED) 1611d522f475Smrg 1612d522f475Smrg#define ScrnHaveSelection(screen) \ 1613d522f475Smrg ((screen)->startH.row != (screen)->endH.row \ 1614d522f475Smrg || (screen)->startH.col != (screen)->endH.col) 1615d522f475Smrg 16160bd37d32Smrg#define ScrnAreRowsInSelection(screen, first, last) \ 1617d522f475Smrg ((last) >= (screen)->startH.row && (first) <= (screen)->endH.row) 1618d522f475Smrg 16190bd37d32Smrg#define ScrnIsRowInSelection(screen, line) \ 1620d522f475Smrg ((line) >= (screen)->startH.row && (line) <= (screen)->endH.row) 1621d522f475Smrg 16220bd37d32Smrg#define ScrnHaveRowMargins(screen) \ 1623d522f475Smrg ((screen)->top_marg != 0 \ 1624d522f475Smrg || ((screen)->bot_marg != screen->max_row)) 1625d522f475Smrg 16260bd37d32Smrg#define ScrnIsRowInMargins(screen, line) \ 1627d522f475Smrg ((line) >= (screen)->top_marg && (line) <= (screen)->bot_marg) 1628d522f475Smrg 16290bd37d32Smrg#define ScrnHaveColMargins(screen) \ 16300bd37d32Smrg ((screen)->rgt_marg > (screen)->max_col) 16310bd37d32Smrg 16320bd37d32Smrg#define ScrnIsColInMargins(screen, col) \ 16330bd37d32Smrg ((col) >= (screen)->lft_marg && (col) <= (screen)->rgt_marg) 16340bd37d32Smrg 1635d4fba8b9Smrg/* 1636d4fba8b9Smrg * If the vertical scrolling margins are active, they will be something other 1637d4fba8b9Smrg * than the first/last row of the visible screen, as well as being distinct. 1638d4fba8b9Smrg */ 1639d4fba8b9Smrg#define IsTopBottomMode(xw) (ScrnTopMargin(xw) < ScrnBottomMargin(xw)) 1640d4fba8b9Smrg#define ScrnTopMargin(xw) TScreenOf(xw)->top_marg 1641d4fba8b9Smrg#define ScrnBottomMargin(xw) TScreenOf(xw)->bot_marg 1642d4fba8b9Smrg 1643d4fba8b9Smrg/* 1644d4fba8b9Smrg * Left/right horizontal scrolling margins are only active when DECLRMM is. 1645d4fba8b9Smrg */ 16460bd37d32Smrg#define IsLeftRightMode(xw) ((xw)->flags & LEFT_RIGHT) 16470bd37d32Smrg#define ScrnLeftMargin(xw) (IsLeftRightMode(xw) \ 16480bd37d32Smrg ? TScreenOf(xw)->lft_marg \ 16490bd37d32Smrg : 0) 16500bd37d32Smrg#define ScrnRightMargin(xw) (IsLeftRightMode(xw) \ 16510bd37d32Smrg ? TScreenOf(xw)->rgt_marg \ 16520bd37d32Smrg : MaxCols(TScreenOf(xw)) - 1) 16530bd37d32Smrg 1654d522f475Smrg#if OPT_DEC_RECTOPS 1655d522f475Smrgextern void ScrnCopyRectangle (XtermWidget /* xw */, XTermRect *, int, int *); 1656d522f475Smrgextern void ScrnMarkRectangle (XtermWidget /* xw */, XTermRect *, Bool, int, int *); 1657d522f475Smrgextern void ScrnWipeRectangle (XtermWidget /* xw */, XTermRect *); 16580bd37d32Smrgextern void xtermCheckRect(XtermWidget /* xw */, int /* nparam */, int */* params */, int * /* result */); 1659d522f475Smrg#endif 1660d522f475Smrg 1661d522f475Smrg#if OPT_WIDE_CHARS 1662d522f475Smrgextern void ChangeToWide(XtermWidget /* xw */); 1663d522f475Smrg#endif 1664d522f475Smrg 1665956cc18dSsnj/* scrollback.c */ 1666956cc18dSsnjextern LineData *getScrollback (TScreen * /* screen */, int /* row */); 1667956cc18dSsnjextern LineData *addScrollback (TScreen * /* screen */); 16680bd37d32Smrgextern void deleteScrollback (TScreen * /* screen */); 1669956cc18dSsnj 1670d522f475Smrg/* scrollbar.c */ 1671d522f475Smrgextern void DoResizeScreen (XtermWidget /* xw */); 1672d522f475Smrgextern void HandleScrollBack PROTO_XT_ACTIONS_ARGS; 1673d522f475Smrgextern void HandleScrollForward PROTO_XT_ACTIONS_ARGS; 1674d4fba8b9Smrgextern void HandleScrollTo PROTO_XT_ACTIONS_ARGS; 1675980988aeSmrgextern void ResizeScrollBar (XtermWidget /* xw */); 1676980988aeSmrgextern void ScrollBarDrawThumb (XtermWidget /* xw */, int /* mode */); 1677980988aeSmrgextern void ScrollBarOff (XtermWidget /* xw */); 1678980988aeSmrgextern void ScrollBarOn (XtermWidget /* xw */, Bool /* init */); 1679980988aeSmrgextern void ScrollBarReverseVideo (Widget /* scrollWidget */); 1680980988aeSmrgextern void ToggleScrollBar (XtermWidget /* xw */); 1681980988aeSmrgextern void WindowScroll (XtermWidget /* xw */, int /* top */, Bool /* always */); 1682d522f475Smrg 1683d522f475Smrg#ifdef SCROLLBAR_RIGHT 1684980988aeSmrgextern void updateRightScrollbar(XtermWidget /* xw */); 1685d522f475Smrg#else 1686d522f475Smrg#define updateRightScrollbar(xw) /* nothing */ 1687d522f475Smrg#endif 1688d522f475Smrg 1689d522f475Smrg/* tabs.c */ 1690d522f475Smrgextern Bool TabToNextStop (XtermWidget /* xw */); 1691d522f475Smrgextern Bool TabToPrevStop (XtermWidget /* xw */); 1692d4fba8b9Smrgextern void TabClear (Tabs /* tabs */, int /* col */); 1693d4fba8b9Smrgextern void TabReset (Tabs /* tabs */); 1694d4fba8b9Smrgextern void TabSet (Tabs /* tabs */, int /* col */); 1695d4fba8b9Smrgextern void TabZonk (Tabs /* tabs */); 1696d4fba8b9Smrgextern Bool TabIsSet (Tabs /* tabs */, int /* col */); 1697d522f475Smrg 1698d522f475Smrg/* util.c */ 1699980988aeSmrgextern Boolean AssignFgColor (XtermWidget /* xw */, Pixel /* bg */); 1700980988aeSmrgextern Boolean AssignBgColor (XtermWidget /* xw */, Pixel /* bg */); 1701d4fba8b9Smrgextern Boolean isDefaultBackground (const char * /* name */); 1702d4fba8b9Smrgextern Boolean isDefaultForeground (const char * /* name */); 1703d4fba8b9Smrgextern CgsEnum whichXtermCgs (XtermWidget /* xw */, unsigned /* attr_flags */, Bool /* hilite */); 1704980988aeSmrgextern GC updatedXtermGC (XtermWidget /* xw */, unsigned /* flags */, CellColor /* fg_bg */, Bool /* hilite */); 1705d4fba8b9Smrgextern Pixel getXtermBackground (XtermWidget /* xw */, unsigned /* flags */, int /* color */); 1706d4fba8b9Smrgextern Pixel getXtermForeground (XtermWidget /* xw */, unsigned /* flags */, int /* color */); 1707d4fba8b9Smrgextern char * xtermSetLocale (int /* category */, String /* after */); 1708d522f475Smrgextern int ClearInLine (XtermWidget /* xw */, int /* row */, int /* col */, unsigned /* len */); 1709d522f475Smrgextern int HandleExposure (XtermWidget /* xw */, XEvent * /* event */); 17100bd37d32Smrgextern int dimRound (double /* value */); 1711190d7dceSmrgextern int drawXtermText (const XTermDraw * /* param */, GC /* gc */, int /* x */, int /* y */, const IChar * /* text */, Cardinal /* len */); 1712d4fba8b9Smrgextern int extendedBoolean (const char * /* value */, const FlagList * /* table */, Cardinal /* limit */); 1713980988aeSmrgextern void ChangeColors (XtermWidget /* xw */, ScrnColors * /* pNew */); 171450027b5bSmrgextern void ClearLine (XtermWidget /* xw */); 1715d522f475Smrgextern void ClearRight (XtermWidget /* xw */, int /* n */); 1716d522f475Smrgextern void ClearScreen (XtermWidget /* xw */); 1717d522f475Smrgextern void DeleteChar (XtermWidget /* xw */, unsigned /* n */); 1718c48a5815Smrgextern void DeleteLine (XtermWidget /* xw */, int /* n */, Bool /* canSave */); 1719d522f475Smrgextern void FlushScroll (XtermWidget /* xw */); 1720980988aeSmrgextern void GetColors (XtermWidget /* xw */, ScrnColors * /* pColors */); 1721d522f475Smrgextern void InsertChar (XtermWidget /* xw */, unsigned /* n */); 1722980988aeSmrgextern void InsertLine (XtermWidget /* xw */, int /* n */); 1723980988aeSmrgextern void RevScroll (XtermWidget /* xw */, int /* amount */); 1724d4fba8b9Smrgextern void ReverseVideo (XtermWidget /* xw */); 1725980988aeSmrgextern void WriteText (XtermWidget /* xw */, Cardinal /* offset */, Cardinal /* len */); 1726d522f475Smrgextern void decode_keyboard_type (XtermWidget /* xw */, struct XTERM_RESOURCE * /* rp */); 1727980988aeSmrgextern void decode_wcwidth (XtermWidget /* xw */); 1728c48a5815Smrgextern void do_cd_xtra_scroll (XtermWidget /* xw */, int /* param */); 1729980988aeSmrgextern void do_erase_display (XtermWidget /* xw */, int /* param */, int /* mode */); 1730980988aeSmrgextern void do_erase_char (XtermWidget /* xw */, int /* param */, int /* mode */); 1731980988aeSmrgextern void do_erase_line (XtermWidget /* xw */, int /* param */, int /* mode */); 17320bd37d32Smrgextern void do_ti_xtra_scroll (XtermWidget /* xw */); 1733d522f475Smrgextern void getXtermSizeHints (XtermWidget /* xw */); 1734980988aeSmrgextern void recolor_cursor (TScreen * /* screen */, Cursor /* cursor */, unsigned long /* fg */, unsigned long /* bg */); 1735980988aeSmrgextern void resetXtermGC (XtermWidget /* xw */, unsigned /* flags */, Bool /* hilite */); 1736980988aeSmrgextern void scrolling_copy_area (XtermWidget /* xw */, int /* firstline */, int /* nlines */, int /* amount */); 1737980988aeSmrgextern void set_keyboard_type (XtermWidget /* xw */, xtermKeyboardType /* type */, Bool /* set */); 1738980988aeSmrgextern void toggle_keyboard_type (XtermWidget /* xw */, xtermKeyboardType /* type */); 1739d522f475Smrgextern void update_keyboard_type (void); 1740d522f475Smrgextern void xtermClear (XtermWidget /* xw */); 1741d4fba8b9Smrgextern void xtermClear2 (XtermWidget /* xw */, int /* x */, int /* y */, unsigned /* width */, unsigned /* height */); 17420bd37d32Smrgextern void xtermColIndex (XtermWidget /* xw */, Bool /* toLeft */); 17430bd37d32Smrgextern void xtermColScroll (XtermWidget /* xw */, int /* amount */, Bool /* toLeft */, int /* at_col */); 1744d522f475Smrgextern void xtermRepaint (XtermWidget /* xw */); 1745d4fba8b9Smrgextern void xtermResetLocale (int /* category */, char * /* before */); 1746d522f475Smrgextern void xtermScroll (XtermWidget /* xw */, int /* amount */); 17470bd37d32Smrgextern void xtermScrollLR (XtermWidget /* xw */, int /* amount */, Bool /* toLeft */); 1748980988aeSmrgextern void xtermSizeHints (XtermWidget /* xw */, int /* scrollbarWidth */); 1749d522f475Smrg 175001037d57Smrgstruct Xinerama_geometry { 175101037d57Smrg int x; 175201037d57Smrg int y; 175301037d57Smrg unsigned w; 175401037d57Smrg unsigned h; 175501037d57Smrg int scr_x; 175601037d57Smrg int scr_y; 175701037d57Smrg int scr_w; 175801037d57Smrg int scr_h; 175901037d57Smrg}; 176001037d57Smrgextern int XParseXineramaGeometry(Display * /* display */, char * /* parsestring */, struct Xinerama_geometry * /* ret */); 176101037d57Smrg 1762d522f475Smrg#if OPT_ISO_COLORS 1763d522f475Smrg 1764980988aeSmrgextern Pixel extract_fg (XtermWidget /* xw */, CellColor /* color */, unsigned /* flags */); 1765980988aeSmrgextern Pixel extract_bg (XtermWidget /* xw */, CellColor /* color */, unsigned /* flags */); 1766d4fba8b9Smrgextern CellColor makeColorPair (XtermWidget /* xw */); 1767980988aeSmrgextern void ClearCurBackground (XtermWidget /* xw */, int /* top */, int /* left */, unsigned /* height */, unsigned /* width */, unsigned /* fw */); 1768d522f475Smrg 1769d4fba8b9Smrg#define xtermColorPair(xw) makeColorPair(xw) 1770d522f475Smrg 177120d2c4d2Smrg#define GET_COLOR_RES(xw, res) xtermGetColorRes(xw, &(res)) 1772d522f475Smrg#define SET_COLOR_RES(res,color) (res)->value = color 1773d522f475Smrg#define EQL_COLOR_RES(res,color) (res)->value == color 1774d522f475Smrg#define T_COLOR(v,n) (v)->Tcolors[n].value 177520d2c4d2Smrgextern Pixel xtermGetColorRes(XtermWidget /* xw */, ColorRes * /* res */); 1776d522f475Smrg 1777956cc18dSsnj#define ExtractForeground(color) (unsigned) GetCellColorFG(color) 1778956cc18dSsnj#define ExtractBackground(color) (unsigned) GetCellColorBG(color) 1779d522f475Smrg 1780d4fba8b9Smrg#if OPT_RENDERFONT 1781d4fba8b9Smrgextern void discardRenderDraw(TScreen * /* screen */); 1782d4fba8b9Smrg#else 1783d4fba8b9Smrg#define discardRenderDraw(screen) /* nothing */ 1784d4fba8b9Smrg#endif 1785d4fba8b9Smrg 178601037d57Smrg#if OPT_WIDE_ATTRS 178701037d57Smrg#define MapToWideColorMode(fg, screen, flags) \ 178801037d57Smrg (((screen)->colorITMode && ((flags) & ATR_ITALIC)) \ 178901037d57Smrg ? COLOR_IT \ 179001037d57Smrg : fg) 179101037d57Smrg#else 179201037d57Smrg#define MapToWideColorMode(fg, screen, flags) fg 179301037d57Smrg#endif 179401037d57Smrg 179520d2c4d2Smrg#define MapToColorMode(fg, screen, flags) \ 179620d2c4d2Smrg (((screen)->colorBLMode && ((flags) & BLINK)) \ 179720d2c4d2Smrg ? COLOR_BL \ 1798a1f3da82Smrg : (((screen)->colorBDMode && ((flags) & BOLD)) \ 1799a1f3da82Smrg ? COLOR_BD \ 1800a1f3da82Smrg : (((screen)->colorULMode && ((flags) & UNDERLINE)) \ 1801a1f3da82Smrg ? COLOR_UL \ 180201037d57Smrg : MapToWideColorMode(fg, screen, flags)))) 180320d2c4d2Smrg 1804d522f475Smrg#define checkVeryBoldAttr(flags, fg, code, attr) \ 1805d522f475Smrg if ((flags & FG_COLOR) != 0 \ 1806d522f475Smrg && (screen->veryBoldColors & attr) == 0 \ 1807d522f475Smrg && (flags & attr) != 0 \ 1808d522f475Smrg && (fg == code)) \ 180920d2c4d2Smrg UIntClr(flags, attr) 1810d522f475Smrg 181101037d57Smrg#if OPT_WIDE_ATTRS 181201037d57Smrg#define checkVeryBoldWideAttr(flags, fg, it, atr) \ 181301037d57Smrg checkVeryBoldAttr(flags, fg, it, atr) 181401037d57Smrg#else 181501037d57Smrg#define checkVeryBoldWideAttr(flags, fg, it, atr) (void) flags 181601037d57Smrg#endif 181701037d57Smrg 1818d522f475Smrg#define checkVeryBoldColors(flags, fg) \ 1819d522f475Smrg checkVeryBoldAttr(flags, fg, COLOR_RV, INVERSE); \ 1820d522f475Smrg checkVeryBoldAttr(flags, fg, COLOR_UL, UNDERLINE); \ 1821d522f475Smrg checkVeryBoldAttr(flags, fg, COLOR_BD, BOLD); \ 182201037d57Smrg checkVeryBoldAttr(flags, fg, COLOR_BL, BLINK); \ 182301037d57Smrg checkVeryBoldWideAttr(flags, fg, COLOR_IT, ATR_ITALIC) 1824d522f475Smrg 1825d522f475Smrg#else /* !OPT_ISO_COLORS */ 1826d522f475Smrg 182720d2c4d2Smrg#define MapToColorMode(fg, screen, flags) fg 182820d2c4d2Smrg 18290bd37d32Smrg#define ClearCurBackground(xw, top, left, height, width, fw) \ 18300bd37d32Smrg XClearArea (TScreenOf(xw)->display, \ 18310bd37d32Smrg VDrawable(TScreenOf(xw)), \ 18320bd37d32Smrg CursorX2(TScreenOf(xw), left, fw), \ 1833d4fba8b9Smrg CursorY2(TScreenOf(xw), top), \ 1834894e0ac8Smrg ((width) * (unsigned) fw), \ 1835894e0ac8Smrg ((height) * (unsigned) FontHeight(TScreenOf(xw))), \ 18360bd37d32Smrg False) 1837d522f475Smrg 1838894e0ac8Smrg#define extract_fg(xw, color, flags) (unsigned) (xw)->cur_foreground 1839894e0ac8Smrg#define extract_bg(xw, color, flags) (unsigned) (xw)->cur_background 1840d522f475Smrg 1841d522f475Smrg /* FIXME: Reverse-Video? */ 1842c48a5815Smrg#define T_COLOR(v,n) (v)->Tcolors[n].value 1843d522f475Smrg#define xtermColorPair(xw) 0 1844d522f475Smrg 1845d522f475Smrg#define checkVeryBoldColors(flags, fg) /* nothing */ 1846d4fba8b9Smrg#define discardRenderDraw(screen) /* nothing */ 1847d522f475Smrg 1848d522f475Smrg#endif /* OPT_ISO_COLORS */ 1849d522f475Smrg 1850d4fba8b9Smrg#define getXtermFG(xw, flags, color) getXtermForeground(xw, flags, color) 1851d4fba8b9Smrg#define getXtermBG(xw, flags, color) getXtermBackground(xw, flags, color) 1852d4fba8b9Smrg 18530bd37d32Smrg#if OPT_ZICONBEEP 18540bd37d32Smrgextern void initZIconBeep(void); 18550bd37d32Smrgextern void resetZIconBeep(XtermWidget /* xw */); 1856980988aeSmrgextern Boolean showZIconBeep(XtermWidget /* xw */, const char * /* name */); 18570bd37d32Smrg#else 18580bd37d32Smrg#define initZIconBeep() /* nothing */ 1859d4fba8b9Smrg#define resetZIconBeep(xw) /* nothing */ 18600bd37d32Smrg#define showZIconBeep(xw, name) False 18610bd37d32Smrg#endif 18620bd37d32Smrg 1863d522f475Smrg#define XTERM_CELL(row,col) getXtermCell(screen, ROW2INX(screen, row), col) 1864d522f475Smrg 1865980988aeSmrgextern unsigned getXtermCell (TScreen * /* screen */, int /* row */, int /* col */); 18660bd37d32Smrgextern unsigned getXtermCombining(TScreen * /* screen */, int /* row */, int /* col */, int /* off */); 1867980988aeSmrgextern void putXtermCell (TScreen * /* screen */, int /* row */, int /* col */, int /* ch */); 1868d522f475Smrg 18690bd37d32Smrg#define IsCellCombined(screen, row, col) (getXtermCombining(screen, row, col, 0) != 0) 18700bd37d32Smrg 1871d522f475Smrg#if OPT_HIGHLIGHT_COLOR 1872d522f475Smrg#define isNotForeground(xw, fg, bg, sel) \ 187320d2c4d2Smrg (Boolean) ((sel) != T_COLOR(TScreenOf(xw), TEXT_FG) \ 18742eaa94a1Schristos && (sel) != (fg) \ 18752eaa94a1Schristos && (sel) != (bg) \ 18762eaa94a1Schristos && (sel) != (xw)->dft_foreground) 1877d522f475Smrg#define isNotBackground(xw, fg, bg, sel) \ 187820d2c4d2Smrg (Boolean) ((sel) != T_COLOR(TScreenOf(xw), TEXT_BG) \ 18792eaa94a1Schristos && (sel) != (fg) \ 18802eaa94a1Schristos && (sel) != (bg) \ 18812eaa94a1Schristos && (sel) != (xw)->dft_background) 1882d522f475Smrg#endif 1883d522f475Smrg 1884980988aeSmrg#define setXtermLineAttributes(dpy, gc, width, style) \ 1885980988aeSmrg XSetLineAttributes(dpy, gc, (unsigned) width, style, CapProjecting, JoinMiter); 1886980988aeSmrg 1887980988aeSmrg#define resetXtermLineAttributes(dpy, gc) \ 1888980988aeSmrg setXtermLineAttributes(dpy, gc, 0, LineSolid); 1889980988aeSmrg 1890d522f475Smrg#if OPT_WIDE_CHARS 1891d522f475Smrgextern int DamagedCells(TScreen * /* screen */, unsigned /* n */, int * /* klp */, int * /* krp */, int /* row */, int /* col */); 1892d522f475Smrgextern int DamagedCurCells(TScreen * /* screen */, unsigned /* n */, int * /* klp */, int * /* krp */); 1893d522f475Smrgextern unsigned AsciiEquivs(unsigned /* ch */); 1894980988aeSmrgextern void addXtermCombining (TScreen * /* screen */, int /* row */, int /* col */, unsigned /* ch */); 1895956cc18dSsnjextern void allocXtermChars(ScrnPtr * /* buffer */, Cardinal /* length */); 1896d522f475Smrg#endif 1897d522f475Smrg 1898d522f475Smrg#if OPT_XMC_GLITCH 1899980988aeSmrgextern void Mark_XMC (XtermWidget /* xw */, int /* param */); 1900d522f475Smrgextern void Jump_XMC (XtermWidget /* xw */); 1901d522f475Smrgextern void Resolve_XMC (XtermWidget /* xw */); 1902d522f475Smrg#endif 1903d522f475Smrg 1904d522f475Smrg#if OPT_WIDE_CHARS 1905980988aeSmrgunsigned visual_width(const IChar * /* str */, Cardinal /* len */); 1906d522f475Smrg#else 1907d522f475Smrg#define visual_width(a, b) (b) 1908d522f475Smrg#endif 1909d522f475Smrg 191001037d57Smrg#define BtoS(b) ((b) ? "on" : "off") 191101037d57Smrg#define MtoS(b) (((b) == Maybe) ? "maybe" : BtoS(b)) 1912d522f475Smrg#define NonNull(s) ((s) ? (s) : "<null>") 1913d522f475Smrg 191420d2c4d2Smrg#define UIntSet(dst,bits) dst = dst | (unsigned) (bits) 191520d2c4d2Smrg#define UIntClr(dst,bits) dst = dst & (unsigned) ~(bits) 191620d2c4d2Smrg 1917d522f475Smrg#ifdef __cplusplus 1918d522f475Smrg } 1919d522f475Smrg#endif 1920a1f3da82Smrg/* *INDENT-ON* */ 1921d522f475Smrg 1922a1f3da82Smrg#endif /* included_xterm_h */ 1923