2014-01-02 08:14:50 -07:00
/* $XTermId: xterm.h,v 1.724 2013/11/23 00:25:35 tom Exp $ */
2006-11-26 04:11:12 -07:00
2011-09-17 05:51:57 -06:00
/*
2013-03-09 07:45:38 -07:00
* Copyright 1999 - 2012 , 2013 by Thomas E . Dickey
2011-09-17 05:51:57 -06:00
*
* All Rights Reserved
*
* Permission is hereby granted , free of charge , to any person obtaining a
* copy of this software and associated documentation files ( the
* " Software " ) , to deal in the Software without restriction , including
* without limitation the rights to use , copy , modify , merge , publish ,
* distribute , sublicense , and / or sell copies of the Software , and to
* permit persons to whom the Software is furnished to do so , subject to
* the following conditions :
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software .
*
* THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS
* OR IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY , FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT .
* IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER ( S ) BE LIABLE FOR ANY
* CLAIM , DAMAGES OR OTHER LIABILITY , WHETHER IN AN ACTION OF CONTRACT ,
* TORT OR OTHERWISE , ARISING FROM , OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE .
*
* Except as contained in this notice , the name ( s ) of the above copyright
* holders shall not be used in advertising or otherwise to promote the
* sale , use or other dealings in this Software without prior written
* authorization .
*/
2006-11-26 04:11:12 -07:00
/*
* Common / useful definitions for XTERM application .
*
* This is also where we put the fallback definitions if we do not build using
* the configure script .
*/
# ifndef included_xterm_h
# define included_xterm_h
2011-03-07 13:41:27 -07:00
/* *INDENT-OFF* */
2006-11-26 04:11:12 -07:00
# ifdef HAVE_CONFIG_H
# include <xtermcfg.h>
# endif
2011-03-07 13:41:27 -07:00
# ifndef GCC_PRINTFLIKE
# define GCC_PRINTFLIKE(f,n) /* nothing */
# endif
2006-11-26 04:11:12 -07:00
# ifndef GCC_UNUSED
# define GCC_UNUSED /* nothing */
# endif
# ifndef GCC_NORETURN
# define GCC_NORETURN /* nothing */
# endif
2009-10-31 08:11:57 -06:00
# if defined(__GNUC__) && defined(_FORTIFY_SOURCE)
# define USE_IGNORE_RC
2010-05-08 06:20:46 -06:00
# define IGNORE_RC(func) ignore_unused = (int) func
2009-10-31 08:11:57 -06:00
# else
# define IGNORE_RC(func) (void) func
# endif /* gcc workarounds */
2013-01-04 09:40:18 -07:00
# undef bcopy
2006-11-26 04:11:12 -07:00
# include <X11/Xos.h>
# ifndef HAVE_CONFIG_H
# define HAVE_LIB_XAW 1
# ifdef CSRG_BASED
/* Get definition of BSD */
# include <sys/param.h>
# endif
# ifndef DFT_TERMTYPE
# define DFT_TERMTYPE "xterm"
# endif
# ifndef X_NOT_POSIX
# define HAVE_WAITPID 1
# define HAVE_SYS_WAIT_H 1
# define HAVE_UNISTD_H 1
# endif
# define HAVE_STDLIB_H 1
# if defined(sun)
/* errno is declared in <errno.h> */
# else
# define DECL_ERRNO 1
# endif
# undef DECL_PTSNAME /* ptsname() is normally in stdlib.h */
# ifndef NOPUTENV
# define HAVE_PUTENV 1
# endif
# if defined(CSRG_BASED) || defined(__GNU__)
# define USE_POSIX_TERMIOS 1
# endif
# ifdef __NetBSD__
# if __NetBSD_Version__ >= 106030000 /* 1.6C */
# define BSD_UTMPX 1
# define ut_xtime ut_tv.tv_sec
# endif
# endif
# if defined(hpux) && !defined(__hpux)
# define __hpux 1 /* HPUX 11.0 does not define this */
# endif
# if !defined(__SCO__) && (defined(SCO) || defined(sco) || defined(SCO325))
# define __SCO__ 1
# endif
# ifdef USE_POSIX_TERMIOS
# define HAVE_TERMIOS_H 1
# define HAVE_TCGETATTR 1
# endif
2013-03-09 07:45:38 -07:00
# if defined(__SCO__) || defined(__UNIXWARE__)
2006-11-26 04:11:12 -07:00
# define USE_TERMCAP 1
# endif
# if defined(UTMP)
# define HAVE_UTMP 1
# endif
# if (defined(__MVS__) || defined(SVR4) || defined(__SCO__) || defined(BSD_UTMPX)) && !defined(__CYGWIN__)
# define UTMPX_FOR_UTMP 1
# endif
# if !defined(ISC) && !defined(__QNX__)
# define HAVE_UTMP_UT_HOST 1
# endif
# if defined(UTMPX_FOR_UTMP) && !(defined(__MVS__) || defined(__hpux))
# define HAVE_UTMP_UT_SESSION 1
# endif
# if !(defined(linux) && (!defined(__GLIBC__) || (__GLIBC__ < 2))) && !defined(SVR4)
# define ut_xstatus ut_exit.e_exit
# endif
# if defined(SVR4) || defined(__SCO__) || defined(BSD_UTMPX) || (defined(linux) && defined(__GLIBC__) && (__GLIBC__ >= 2) && !(defined(__powerpc__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0)))
# define HAVE_UTMP_UT_XTIME 1
# endif
# if defined(linux) || defined(__CYGWIN__)
# define USE_LASTLOG
# define HAVE_LASTLOG_H
# define USE_STRUCT_LASTLOG
# elif defined(BSD) && (BSD >= 199103)
# ifdef BSD_UTMPX
# define USE_LASTLOGX
# else
# define USE_LASTLOG
# define USE_STRUCT_LASTLOG
# endif
# endif
# if defined(__OpenBSD__)
2007-06-15 13:34:50 -06:00
# define USE_UTMP_SETGID True
# define DEFDELETE_DEL True
# define DEF_BACKARO_ERASE True
# define DEF_INITIAL_ERASE True
2013-01-04 09:40:18 -07:00
# define SIG_ATOMIC_T volatile sig_atomic_t
2006-11-26 04:11:12 -07:00
# endif
# if defined(__SCO__) || defined(__UNIXWARE__)
2007-06-15 13:34:50 -06:00
# define DEFDELETE_DEL True
2006-11-26 04:11:12 -07:00
# define OPT_SCO_FUNC_KEYS 1
# endif
# if defined(__SCO__) || defined(SVR4) || defined(_POSIX_SOURCE) || defined(__QNX__) || defined(__hpux) || (defined(BSD) && (BSD >= 199103)) || defined(__CYGWIN__)
# define USE_POSIX_WAIT
# endif
# if defined(AIXV3) || defined(CRAY) || defined(__SCO__) || defined(SVR4) || (defined(SYSV) && defined(i386)) || defined(__MVS__) || defined(__hpux) || defined(__osf__) || defined(linux) || defined(macII) || defined(BSD_UTMPX)
# define USE_SYSV_UTMP
# endif
# if defined(__GNU__) || defined(__MVS__) || defined(__osf__)
# define USE_TTY_GROUP
# endif
# if defined(__CYGWIN__)
# define HAVE_NCURSES_TERM_H 1
# endif
# ifdef __osf__
# define TTY_GROUP_NAME "terminal"
# endif
# if defined(__MVS__)
# undef ut_xstatus
# define ut_name ut_user
# define ut_xstatus ut_exit.ut_e_exit
# define ut_xtime ut_tv.tv_sec
# endif
# if defined(ut_xstatus)
# define HAVE_UTMP_UT_XSTATUS 1
# endif
# if defined(XKB)
# define HAVE_XKB_BELL_EXT 1
# endif
# if (defined(SVR4) && !defined(__CYGWIN__)) || defined(linux) || (defined(BSD) && (BSD >= 199103))
# define HAVE_POSIX_SAVED_IDS
# endif
# endif /* HAVE_CONFIG_H */
2007-08-25 12:58:42 -06:00
# ifndef HAVE_X11_DECKEYSYM_H
# define HAVE_X11_DECKEYSYM_H 1
# endif
# ifndef HAVE_X11_SUNKEYSYM_H
# define HAVE_X11_SUNKEYSYM_H 1
# endif
# ifndef HAVE_X11_XF86KEYSYM_H
# define HAVE_X11_XF86KEYSYM_H 0
# endif
2006-11-26 04:11:12 -07:00
/***====================================================================***/
/* if compiling with gcc -ansi -pedantic, we must fix POSIX definitions */
# if defined(SVR4) && defined(sun)
# ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
# endif
# ifndef _POSIX_C_SOURCE
# define _POSIX_C_SOURCE 1
# endif
# endif
/***====================================================================***/
# ifdef HAVE_STDLIB_H
# include <stdlib.h>
# else
extern char * calloc ( ) ;
extern char * getenv ( ) ;
extern char * malloc ( ) ;
extern char * realloc ( ) ;
extern void exit ( ) ;
extern void free ( ) ;
# endif
# ifdef HAVE_UNISTD_H
# include <unistd.h>
# endif
# ifdef HAVE_SYS_WAIT_H
# include <sys/wait.h>
# endif
# include <errno.h>
# if defined(DECL_ERRNO) && !defined(errno)
extern int errno ;
# endif
/*
* FIXME : Toggling logging from xterm hangs under Linux 2.0 .29 with libc5 if
* we use ' waitpid ( ) ' , while ' wait ( ) ' seems to work properly .
*/
# ifdef linux
# undef HAVE_WAITPID
# endif
# ifndef OPT_WIDE_CHARS
# define OPT_WIDE_CHARS 0
# endif
# if OPT_WIDE_CHARS
# define HIDDEN_CHAR 0xffff
# endif
/***====================================================================***/
2013-03-09 07:45:38 -07:00
# define PROTO_XT_ACTIONS_ARGS \
( Widget w , XEvent * event , String * params , Cardinal * num_params )
# define PROTO_XT_CALLBACK_ARGS \
( Widget gw , XtPointer closure , XtPointer data )
# define PROTO_XT_CVT_SELECT_ARGS \
( Widget w , Atom * selection , Atom * target , Atom * type , XtPointer * value , unsigned long * length , int * format )
# define PROTO_XT_EV_HANDLER_ARGS \
( Widget w , XtPointer closure , XEvent * event , Boolean * cont )
# define PROTO_XT_SEL_CB_ARGS \
( Widget w , XtPointer client_data , Atom * selection , Atom * type , XtPointer value , unsigned long * length , int * format )
2006-11-26 04:11:12 -07:00
# include <ptyx.h>
# if (XtSpecificationRelease >= 6) && !defined(NO_XPOLL_H) && !defined(sun)
# include <X11/Xpoll.h>
# define USE_XPOLL_H 1
# else
# define Select(n,r,w,e,t) select(n,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval *)t)
# define XFD_COPYSET(src,dst) memcpy((dst)->fds_bits, (src)->fds_bits, sizeof(fd_set))
# if defined(__MVS__) && !defined(TIME_WITH_SYS_TIME)
# define TIME_WITH_SYS_TIME
# endif
# endif
# ifdef TIME_WITH_SYS_TIME
# include <sys / time.h>
# include <time.h>
# else
# ifdef HAVE_SYS_TIME_H
# include <sys / time.h>
# else
# include <time.h>
# endif
# endif
/* these may be needed for sig_atomic_t */
# include <sys/types.h>
# include <signal.h>
# ifdef USE_SYS_SELECT_H
# if defined(USE_XPOLL_H) && defined(AIXV3) && defined(NFDBITS)
# undef NFDBITS /* conflict between X11/Xpoll.h and sys/select.h */
# endif
# include <sys/select.h>
# endif /* USE_SYS_SELECT_H */
# include <setjmp.h>
2007-08-25 12:58:42 -06:00
# if !defined(VMS) && !(defined(linux) && defined(__USE_GNU)) && !defined(__hpux) && !defined(_ALL_SOURCE) && !defined(__osf__)
2006-11-26 04:11:12 -07:00
extern char * * environ ;
# endif
2007-06-15 13:34:50 -06:00
# define XK_Fn(n) (XK_F1 + (n) - 1)
2008-02-16 02:40:00 -07:00
# define Maybe 2
2006-11-26 04:11:12 -07:00
/***====================================================================***/
2011-06-07 13:21:06 -06:00
# define XtNallowBoldFonts "allowBoldFonts"
2006-11-26 04:11:12 -07:00
# define XtNallowC1Printable "allowC1Printable"
2010-03-25 16:03:51 -06:00
# define XtNallowColorOps "allowColorOps"
2009-01-06 13:10:20 -07:00
# define XtNallowFontOps "allowFontOps"
2013-06-02 13:55:50 -06:00
# define XtNallowPasteControls "allowPasteControls"
2010-05-08 06:20:46 -06:00
# define XtNallowScrollLock "allowScrollLock"
2006-11-26 04:11:12 -07:00
# define XtNallowSendEvents "allowSendEvents"
2009-01-06 13:10:20 -07:00
# define XtNallowTcapOps "allowTcapOps"
2007-08-25 12:58:42 -06:00
# define XtNallowTitleOps "allowTitleOps"
2006-11-26 04:11:12 -07:00
# define XtNallowWindowOps "allowWindowOps"
2007-06-15 13:34:50 -06:00
# define XtNaltIsNotMeta "altIsNotMeta"
# define XtNaltSendsEscape "altSendsEscape"
2013-01-04 09:40:18 -07:00
# define XtNalternateScroll "alternateScroll"
2007-06-15 13:34:50 -06:00
# define XtNalwaysBoldMode "alwaysBoldMode"
2006-11-26 04:11:12 -07:00
# define XtNalwaysHighlight "alwaysHighlight"
# define XtNalwaysUseMods "alwaysUseMods"
# define XtNanswerbackString "answerbackString"
# define XtNappcursorDefault "appcursorDefault"
# define XtNappkeypadDefault "appkeypadDefault"
2014-01-02 08:14:50 -07:00
# define XtNassumeAllChars "assumeAllChars"
2006-11-26 04:11:12 -07:00
# define XtNautoWrap "autoWrap"
# define XtNawaitInput "awaitInput"
# define XtNbackarrowKey "backarrowKey"
2007-06-15 13:34:50 -06:00
# define XtNbellIsUrgent "bellIsUrgent"
2006-11-26 04:11:12 -07:00
# define XtNbellOnReset "bellOnReset"
# define XtNbellSuppressTime "bellSuppressTime"
# define XtNboldColors "boldColors"
# define XtNboldFont "boldFont"
# define XtNboldMode "boldMode"
# define XtNbrokenLinuxOSC "brokenLinuxOSC"
# define XtNbrokenSelections "brokenSelections"
# define XtNbrokenStringTerm "brokenStringTerm"
# define XtNc132 "c132"
# define XtNcacheDoublesize "cacheDoublesize"
2013-01-04 09:40:18 -07:00
# define XtNcdXtraScroll "cdXtraScroll"
2006-11-26 04:11:12 -07:00
# define XtNcharClass "charClass"
# define XtNcjkWidth "cjkWidth"
# define XtNcolorAttrMode "colorAttrMode"
# define XtNcolorBDMode "colorBDMode"
# define XtNcolorBLMode "colorBLMode"
# define XtNcolorMode "colorMode"
# define XtNcolorRVMode "colorRVMode"
# define XtNcolorULMode "colorULMode"
# define XtNcombiningChars "combiningChars"
# define XtNctrlFKeys "ctrlFKeys"
# define XtNcurses "curses"
# define XtNcursorBlink "cursorBlink"
# define XtNcursorColor "cursorColor"
# define XtNcursorOffTime "cursorOffTime"
# define XtNcursorOnTime "cursorOnTime"
2008-09-23 13:08:55 -06:00
# define XtNcursorUnderline "cursorUnderLine"
2006-11-26 04:11:12 -07:00
# define XtNcutNewline "cutNewline"
# define XtNcutToBeginningOfLine "cutToBeginningOfLine"
# define XtNdecTerminalID "decTerminalID"
2009-04-04 09:10:44 -06:00
# define XtNdefaultString "defaultString"
2006-11-26 04:11:12 -07:00
# define XtNdeleteIsDEL "deleteIsDEL"
2010-03-25 16:03:51 -06:00
# define XtNdisallowedColorOps "disallowedColorOps"
# define XtNdisallowedFontOps "disallowedFontOps"
# define XtNdisallowedTcapOps "disallowedTcapOps"
# define XtNdisallowedWindowOps "disallowedWindowOps"
2006-11-26 04:11:12 -07:00
# define XtNdynamicColors "dynamicColors"
# define XtNeightBitControl "eightBitControl"
# define XtNeightBitInput "eightBitInput"
2012-04-14 03:02:46 -06:00
# define XtNeightBitMeta "eightBitMeta"
2006-11-26 04:11:12 -07:00
# define XtNeightBitOutput "eightBitOutput"
2009-04-04 09:10:44 -06:00
# define XtNeightBitSelectTypes "eightBitSelectTypes"
2006-11-26 04:11:12 -07:00
# define XtNfaceName "faceName"
# define XtNfaceNameDoublesize "faceNameDoublesize"
# define XtNfaceSize "faceSize"
2009-09-05 09:58:09 -06:00
# define XtNfastScroll "fastScroll"
2006-11-26 04:11:12 -07:00
# define XtNfont1 "font1"
# define XtNfont2 "font2"
# define XtNfont3 "font3"
# define XtNfont4 "font4"
# define XtNfont5 "font5"
# define XtNfont6 "font6"
# define XtNfontDoublesize "fontDoublesize"
# define XtNfontStyle "fontStyle"
2009-03-09 16:13:04 -06:00
# define XtNfontWarnings "fontWarnings"
2006-11-26 04:11:12 -07:00
# define XtNforceBoxChars "forceBoxChars"
2009-10-31 08:11:57 -06:00
# define XtNforcePackedFont "forcePackedFont"
2008-08-25 12:05:56 -06:00
# define XtNformatOtherKeys "formatOtherKeys"
2006-11-26 04:11:12 -07:00
# define XtNfreeBoldBox "freeBoldBox"
2011-03-07 13:41:27 -07:00
# define XtNfullscreen "fullscreen"
2006-11-26 04:11:12 -07:00
# define XtNhighlightColor "highlightColor"
2008-02-16 02:40:00 -07:00
# define XtNhighlightColorMode "highlightColorMode"
2007-08-25 12:58:42 -06:00
# define XtNhighlightReverse "highlightReverse"
2006-11-26 04:11:12 -07:00
# define XtNhighlightSelection "highlightSelection"
2007-06-15 13:34:50 -06:00
# define XtNhighlightTextColor "highlightTextColor"
2006-11-26 04:11:12 -07:00
# define XtNhpLowerleftBugCompat "hpLowerleftBugCompat"
# define XtNi18nSelections "i18nSelections"
2013-01-04 09:40:18 -07:00
# define XtNiconHint "iconHint"
2007-06-15 13:34:50 -06:00
# define XtNinitialFont "initialFont"
2006-11-26 04:11:12 -07:00
# define XtNinternalBorder "internalBorder"
2009-04-04 09:10:44 -06:00
# define XtNitalicULMode "italicULMode"
2006-11-26 04:11:12 -07:00
# define XtNjumpScroll "jumpScroll"
2008-02-16 02:40:00 -07:00
# define XtNkeepSelection "keepSelection"
2006-11-26 04:11:12 -07:00
# define XtNkeyboardDialect "keyboardDialect"
# define XtNlimitResize "limitResize"
# define XtNlocale "locale"
# define XtNlocaleFilter "localeFilter"
# define XtNlogFile "logFile"
# define XtNlogInhibit "logInhibit"
# define XtNlogging "logging"
# define XtNloginShell "loginShell"
# define XtNmarginBell "marginBell"
2009-04-04 09:10:44 -06:00
# define XtNmaximized "maximized"
2006-11-26 04:11:12 -07:00
# define XtNmenuBar "menuBar"
# define XtNmenuHeight "menuHeight"
# define XtNmetaSendsEscape "metaSendsEscape"
2007-08-25 12:58:42 -06:00
# define XtNmkSamplePass "mkSamplePass"
# define XtNmkSampleSize "mkSampleSize"
2006-11-26 04:11:12 -07:00
# define XtNmkWidth "mkWidth"
# define XtNmodifyCursorKeys "modifyCursorKeys"
# define XtNmodifyFunctionKeys "modifyFunctionKeys"
2013-01-04 09:40:18 -07:00
# define XtNmodifyKeyboard "modifyKeyboard"
2006-11-26 04:11:12 -07:00
# define XtNmodifyKeypadKeys "modifyKeypadKeys"
# define XtNmodifyOtherKeys "modifyOtherKeys"
# define XtNmodifyStringKeys "modifyStringKeys"
# define XtNmultiClickTime "multiClickTime"
# define XtNmultiScroll "multiScroll"
# define XtNnMarginBell "nMarginBell"
# define XtNnumLock "numLock"
# define XtNoldXtermFKeys "oldXtermFKeys"
# define XtNpointerColor "pointerColor"
# define XtNpointerColorBackground "pointerColorBackground"
2008-08-25 12:05:56 -06:00
# define XtNpointerMode "pointerMode"
2006-11-26 04:11:12 -07:00
# define XtNpointerShape "pointerShape"
# define XtNpopOnBell "popOnBell"
2012-06-07 14:20:23 -06:00
# define XtNprecompose "precompose"
2006-11-26 04:11:12 -07:00
# define XtNprintAttributes "printAttributes"
# define XtNprinterAutoClose "printerAutoClose"
# define XtNprinterCommand "printerCommand"
# define XtNprinterControlMode "printerControlMode"
# define XtNprinterExtent "printerExtent"
# define XtNprinterFormFeed "printerFormFeed"
2010-03-25 16:03:51 -06:00
# define XtNprinterNewLine "printerNewLine"
2014-01-02 08:14:50 -07:00
# define XtNprivateColorRegisters "privateColorRegisters"
2008-02-16 02:40:00 -07:00
# define XtNquietGrab "quietGrab"
2006-11-26 04:11:12 -07:00
# define XtNrenderFont "renderFont"
# define XtNresizeGravity "resizeGravity"
2012-06-07 14:20:23 -06:00
# define XtNretryInputMethod "retryInputMethod"
2006-11-26 04:11:12 -07:00
# define XtNreverseWrap "reverseWrap"
# define XtNrightScrollBar "rightScrollBar"
# define XtNsaveLines "saveLines"
2011-09-17 05:51:57 -06:00
# define XtNscaleHeight "scaleHeight"
2006-11-26 04:11:12 -07:00
# define XtNscrollBar "scrollBar"
# define XtNscrollBarBorder "scrollBarBorder"
# define XtNscrollKey "scrollKey"
# define XtNscrollLines "scrollLines"
# define XtNscrollPos "scrollPos"
# define XtNscrollTtyOutput "scrollTtyOutput"
# define XtNselectToClipboard "selectToClipboard"
# define XtNshiftFonts "shiftFonts"
# define XtNshowBlinkAsBold "showBlinkAsBold"
# define XtNshowMissingGlyphs "showMissingGlyphs"
2010-10-23 13:14:52 -06:00
# define XtNshowWrapMarks "showWrapMarks"
2006-11-26 04:11:12 -07:00
# define XtNsignalInhibit "signalInhibit"
2013-08-26 14:06:09 -06:00
# define XtNsixelScrolling "sixelScrolling"
2006-11-26 04:11:12 -07:00
# define XtNtekGeometry "tekGeometry"
# define XtNtekInhibit "tekInhibit"
# define XtNtekSmall "tekSmall"
# define XtNtekStartup "tekStartup"
# define XtNtiXtraScroll "tiXtraScroll"
# define XtNtiteInhibit "titeInhibit"
2010-03-25 16:03:51 -06:00
# define XtNtitleModes "titleModes"
2006-11-26 04:11:12 -07:00
# define XtNtoolBar "toolBar"
# define XtNtrimSelection "trimSelection"
# define XtNunderLine "underLine"
2007-06-15 13:34:50 -06:00
# define XtNuseClipping "useClipping"
2006-11-26 04:11:12 -07:00
# define XtNutf8 "utf8"
2011-06-07 13:21:06 -06:00
# define XtNutf8Fonts "utf8Fonts"
2006-11-26 04:11:12 -07:00
# define XtNutf8Latin1 "utf8Latin1"
2009-04-04 09:10:44 -06:00
# define XtNutf8SelectTypes "utf8SelectTypes"
2006-11-26 04:11:12 -07:00
# define XtNutf8Title "utf8Title"
# define XtNveryBoldColors "veryBoldColors"
# define XtNvisualBell "visualBell"
# define XtNvisualBellDelay "visualBellDelay"
2012-04-14 03:02:46 -06:00
# define XtNvisualBellLine "visualBellLine"
2006-11-26 04:11:12 -07:00
# define XtNvt100Graphics "vt100Graphics"
# define XtNwideBoldFont "wideBoldFont"
# define XtNwideChars "wideChars"
# define XtNwideFont "wideFont"
# define XtNximFont "ximFont"
# define XtNxmcAttributes "xmcAttributes"
# define XtNxmcGlitch "xmcGlitch"
# define XtNxmcInline "xmcInline"
# define XtNxmcMoveSGR "xmcMoveSGR"
2011-06-07 13:21:06 -06:00
# define XtCAllowBoldFonts "AllowBoldFonts"
2006-11-26 04:11:12 -07:00
# define XtCAllowC1Printable "AllowC1Printable"
2010-03-25 16:03:51 -06:00
# define XtCAllowColorOps "AllowColorOps"
2009-01-06 13:10:20 -07:00
# define XtCAllowFontOps "AllowFontOps"
2013-06-02 13:55:50 -06:00
# define XtCAllowPasteControls "AllowPasteControls"
2010-05-08 06:20:46 -06:00
# define XtCAllowScrollLock "AllowScrollLock"
2006-11-26 04:11:12 -07:00
# define XtCAllowSendEvents "AllowSendEvents"
2009-01-06 13:10:20 -07:00
# define XtCAllowTcapOps "AllowTcapOps"
2007-08-25 12:58:42 -06:00
# define XtCAllowTitleOps "AllowTitleOps"
2006-11-26 04:11:12 -07:00
# define XtCAllowWindowOps "AllowWindowOps"
2007-06-15 13:34:50 -06:00
# define XtCAltIsNotMeta "AltIsNotMeta"
# define XtCAltSendsEscape "AltSendsEscape"
# define XtCAlwaysBoldMode "AlwaysBoldMode"
2006-11-26 04:11:12 -07:00
# define XtCAlwaysHighlight "AlwaysHighlight"
# define XtCAlwaysUseMods "AlwaysUseMods"
# define XtCAnswerbackString "AnswerbackString"
# define XtCAppcursorDefault "AppcursorDefault"
# define XtCAppkeypadDefault "AppkeypadDefault"
2014-01-02 08:14:50 -07:00
# define XtCAssumeAllChars "AssumeAllChars"
2006-11-26 04:11:12 -07:00
# define XtCAutoWrap "AutoWrap"
# define XtCAwaitInput "AwaitInput"
# define XtCBackarrowKey "BackarrowKey"
2007-06-15 13:34:50 -06:00
# define XtCBellIsUrgent "BellIsUrgent"
2006-11-26 04:11:12 -07:00
# define XtCBellOnReset "BellOnReset"
# define XtCBellSuppressTime "BellSuppressTime"
# define XtCBoldFont "BoldFont"
# define XtCBoldMode "BoldMode"
# define XtCBrokenLinuxOSC "BrokenLinuxOSC"
# define XtCBrokenSelections "BrokenSelections"
# define XtCBrokenStringTerm "BrokenStringTerm"
# define XtCC132 "C132"
# define XtCCacheDoublesize "CacheDoublesize"
2013-01-04 09:40:18 -07:00
# define XtCCdXtraScroll "CdXtraScroll"
2006-11-26 04:11:12 -07:00
# define XtCCharClass "CharClass"
2011-03-07 13:41:27 -07:00
# define XtCCjkWidth "CjkWidth"
2009-04-04 09:10:44 -06:00
# define XtCColorAttrMode "ColorAttrMode"
2006-11-26 04:11:12 -07:00
# define XtCColorMode "ColorMode"
# define XtCColumn "Column"
# define XtCCombiningChars "CombiningChars"
# define XtCCtrlFKeys "CtrlFKeys"
# define XtCCurses "Curses"
# define XtCCursorBlink "CursorBlink"
# define XtCCursorOffTime "CursorOffTime"
# define XtCCursorOnTime "CursorOnTime"
2008-09-23 13:08:55 -06:00
# define XtCCursorUnderline "CursorUnderLine"
2006-11-26 04:11:12 -07:00
# define XtCCutNewline "CutNewline"
# define XtCCutToBeginningOfLine "CutToBeginningOfLine"
# define XtCDecTerminalID "DecTerminalID"
2009-04-04 09:10:44 -06:00
# define XtCDefaultString "DefaultString"
2006-11-26 04:11:12 -07:00
# define XtCDeleteIsDEL "DeleteIsDEL"
2010-03-25 16:03:51 -06:00
# define XtCDisallowedColorOps "DisallowedColorOps"
# define XtCDisallowedFontOps "DisallowedFontOps"
# define XtCDisallowedTcapOps "DisallowedTcapOps"
# define XtCDisallowedWindowOps "DisallowedWindowOps"
2006-11-26 04:11:12 -07:00
# define XtCDynamicColors "DynamicColors"
# define XtCEightBitControl "EightBitControl"
# define XtCEightBitInput "EightBitInput"
2012-04-14 03:02:46 -06:00
# define XtCEightBitMeta "EightBitMeta"
2006-11-26 04:11:12 -07:00
# define XtCEightBitOutput "EightBitOutput"
2009-04-04 09:10:44 -06:00
# define XtCEightBitSelectTypes "EightBitSelectTypes"
2006-11-26 04:11:12 -07:00
# define XtCFaceName "FaceName"
# define XtCFaceNameDoublesize "FaceNameDoublesize"
# define XtCFaceSize "FaceSize"
2009-09-05 09:58:09 -06:00
# define XtCFastScroll "FastScroll"
2006-11-26 04:11:12 -07:00
# define XtCFont1 "Font1"
# define XtCFont2 "Font2"
# define XtCFont3 "Font3"
# define XtCFont4 "Font4"
# define XtCFont5 "Font5"
# define XtCFont6 "Font6"
# define XtCFontDoublesize "FontDoublesize"
# define XtCFontStyle "FontStyle"
2009-03-09 16:13:04 -06:00
# define XtCFontWarnings "FontWarnings"
2006-11-26 04:11:12 -07:00
# define XtCForceBoxChars "ForceBoxChars"
2009-10-31 08:11:57 -06:00
# define XtCForcePackedFont "ForcePackedFont"
2008-08-25 12:05:56 -06:00
# define XtCFormatOtherKeys "FormatOtherKeys"
2006-11-26 04:11:12 -07:00
# define XtCFreeBoldBox "FreeBoldBox"
2011-03-07 13:41:27 -07:00
# define XtCFullscreen "Fullscreen"
2008-02-16 02:40:00 -07:00
# define XtCHighlightColorMode "HighlightColorMode"
2007-08-25 12:58:42 -06:00
# define XtCHighlightReverse "HighlightReverse"
2006-11-26 04:11:12 -07:00
# define XtCHighlightSelection "HighlightSelection"
# define XtCHpLowerleftBugCompat "HpLowerleftBugCompat"
# define XtCI18nSelections "I18nSelections"
2013-01-04 09:40:18 -07:00
# define XtCIconHint "IconHint"
2007-06-15 13:34:50 -06:00
# define XtCInitialFont "InitialFont"
2006-11-26 04:11:12 -07:00
# define XtCJumpScroll "JumpScroll"
2008-02-16 02:40:00 -07:00
# define XtCKeepSelection "KeepSelection"
2006-11-26 04:11:12 -07:00
# define XtCKeyboardDialect "KeyboardDialect"
# define XtCLimitResize "LimitResize"
# define XtCLocale "Locale"
# define XtCLocaleFilter "LocaleFilter"
# define XtCLogInhibit "LogInhibit"
# define XtCLogfile "Logfile"
# define XtCLogging "Logging"
# define XtCLoginShell "LoginShell"
# define XtCMarginBell "MarginBell"
2009-04-04 09:10:44 -06:00
# define XtCMaximized "Maximized"
2006-11-26 04:11:12 -07:00
# define XtCMenuBar "MenuBar"
# define XtCMenuHeight "MenuHeight"
# define XtCMetaSendsEscape "MetaSendsEscape"
2013-08-26 14:06:09 -06:00
# define XtCMkSamplePass "MkSamplePass"
# define XtCMkSampleSize "MkSampleSize"
2011-03-07 13:41:27 -07:00
# define XtCMkWidth "MkWidth"
2006-11-26 04:11:12 -07:00
# define XtCModifyCursorKeys "ModifyCursorKeys"
# define XtCModifyFunctionKeys "ModifyFunctionKeys"
2013-01-04 09:40:18 -07:00
# define XtCModifyKeyboard "ModifyKeyboard"
2006-11-26 04:11:12 -07:00
# define XtCModifyKeypadKeys "ModifyKeypadKeys"
# define XtCModifyOtherKeys "ModifyOtherKeys"
# define XtCModifyStringKeys "ModifyStringKeys"
# define XtCMultiClickTime "MultiClickTime"
# define XtCMultiScroll "MultiScroll"
# define XtCNumLock "NumLock"
# define XtCOldXtermFKeys "OldXtermFKeys"
2008-02-16 02:40:00 -07:00
# define XtCPointerMode "PointerMode"
2006-11-26 04:11:12 -07:00
# define XtCPopOnBell "PopOnBell"
2012-06-07 14:20:23 -06:00
# define XtCPrecompose "Precompose"
2006-11-26 04:11:12 -07:00
# define XtCPrintAttributes "PrintAttributes"
# define XtCPrinterAutoClose "PrinterAutoClose"
# define XtCPrinterCommand "PrinterCommand"
# define XtCPrinterControlMode "PrinterControlMode"
# define XtCPrinterExtent "PrinterExtent"
# define XtCPrinterFormFeed "PrinterFormFeed"
2010-03-25 16:03:51 -06:00
# define XtCPrinterNewLine "PrinterNewLine"
2014-01-02 08:14:50 -07:00
# define XtCPrivateColorRegisters "PrivateColorRegisters"
2008-02-16 02:40:00 -07:00
# define XtCQuietGrab "QuietGrab"
2006-11-26 04:11:12 -07:00
# define XtCRenderFont "RenderFont"
# define XtCResizeGravity "ResizeGravity"
2012-06-07 14:20:23 -06:00
# define XtCRetryInputMethod "RetryInputMethod"
2006-11-26 04:11:12 -07:00
# define XtCReverseWrap "ReverseWrap"
# define XtCRightScrollBar "RightScrollBar"
# define XtCSaveLines "SaveLines"
2011-09-17 05:51:57 -06:00
# define XtCScaleHeight "ScaleHeight"
2006-11-26 04:11:12 -07:00
# define XtCScrollBar "ScrollBar"
# define XtCScrollBarBorder "ScrollBarBorder"
# define XtCScrollCond "ScrollCond"
# define XtCScrollLines "ScrollLines"
# define XtCScrollPos "ScrollPos"
# define XtCSelectToClipboard "SelectToClipboard"
# define XtCShiftFonts "ShiftFonts"
# define XtCShowBlinkAsBold "ShowBlinkAsBold"
# define XtCShowMissingGlyphs "ShowMissingGlyphs"
2010-10-23 13:14:52 -06:00
# define XtCShowWrapMarks "ShowWrapMarks"
2006-11-26 04:11:12 -07:00
# define XtCSignalInhibit "SignalInhibit"
2013-08-26 14:06:09 -06:00
# define XtCSixelScrolling "SixelScrolling"
2006-11-26 04:11:12 -07:00
# define XtCTekInhibit "TekInhibit"
# define XtCTekSmall "TekSmall"
# define XtCTekStartup "TekStartup"
# define XtCTiXtraScroll "TiXtraScroll"
# define XtCTiteInhibit "TiteInhibit"
2010-03-25 16:03:51 -06:00
# define XtCTitleModes "TitleModes"
2006-11-26 04:11:12 -07:00
# define XtCToolBar "ToolBar"
# define XtCTrimSelection "TrimSelection"
# define XtCUnderLine "UnderLine"
2007-06-15 13:34:50 -06:00
# define XtCUseClipping "UseClipping"
2006-11-26 04:11:12 -07:00
# define XtCUtf8 "Utf8"
2011-06-07 13:21:06 -06:00
# define XtCUtf8Fonts "Utf8Fonts"
2006-11-26 04:11:12 -07:00
# define XtCUtf8Latin1 "Utf8Latin1"
2009-04-04 09:10:44 -06:00
# define XtCUtf8SelectTypes "Utf8SelectTypes"
2006-11-26 04:11:12 -07:00
# define XtCUtf8Title "Utf8Title"
# define XtCVT100Graphics "VT100Graphics"
# define XtCVeryBoldColors "VeryBoldColors"
# define XtCVisualBell "VisualBell"
# define XtCVisualBellDelay "VisualBellDelay"
2012-04-14 03:02:46 -06:00
# define XtCVisualBellLine "VisualBellLine"
2006-11-26 04:11:12 -07:00
# define XtCWideBoldFont "WideBoldFont"
# define XtCWideChars "WideChars"
# define XtCWideFont "WideFont"
# define XtCXimFont "XimFont"
# define XtCXmcAttributes "XmcAttributes"
# define XtCXmcGlitch "XmcGlitch"
# define XtCXmcInline "XmcInline"
# define XtCXmcMoveSGR "XmcMoveSGR"
# if defined(NO_ACTIVE_ICON) && !defined(XtNgeometry)
# define XtNgeometry "geometry"
# define XtCGeometry "Geometry"
# endif
# if OPT_COLOR_CLASS
# define XtCCursorColor "CursorColor"
# define XtCPointerColor "PointerColor"
# define XtCHighlightColor "HighlightColor"
2007-06-15 13:34:50 -06:00
# define XtCHighlightTextColor "HighlightTextColor"
2006-11-26 04:11:12 -07:00
# else
# define XtCCursorColor XtCForeground
# define XtCPointerColor XtCForeground
# define XtCHighlightColor XtCForeground
2007-06-15 13:34:50 -06:00
# define XtCHighlightTextColor XtCBackground
2006-11-26 04:11:12 -07:00
# endif
/***====================================================================***/
# ifdef __cplusplus
extern " C " {
# endif
struct XTERM_RESOURCE ;
/* Tekproc.c */
2007-06-15 13:34:50 -06:00
# if OPT_TEK4014
2009-04-04 09:10:44 -06:00
extern TekWidget getTekWidget ( Widget /* w */ ) ;
2007-06-15 13:34:50 -06:00
extern int TekGetFontSize ( const char * /* param */ ) ;
2006-11-26 04:11:12 -07:00
extern int TekInit ( void ) ;
extern int TekPtyData ( void ) ;
2007-06-15 13:34:50 -06:00
extern void ChangeTekColors ( TekWidget /* tw */ , TScreen * /* screen */ , ScrnColors * /* pNew */ ) ;
extern void HandleGINInput PROTO_XT_ACTIONS_ARGS ;
extern void TCursorToggle ( TekWidget /* tw */ , int /* toggle */ ) ;
extern void TekCopy ( TekWidget /* tw */ ) ;
extern void TekEnqMouse ( TekWidget /* tw */ , int /* c */ ) ;
2006-11-26 04:11:12 -07:00
extern void TekExpose ( Widget /* w */ , XEvent * /* event */ , Region /* region */ ) ;
2007-06-15 13:34:50 -06:00
extern void TekGINoff ( TekWidget /* tw */ ) ;
extern void TekRefresh ( TekWidget /* tw */ ) ;
extern void TekRepaint ( TekWidget /* xw */ ) ;
extern void TekReverseVideo ( TekWidget /* tw */ ) ;
2006-11-26 04:11:12 -07:00
extern void TekRun ( void ) ;
2009-09-05 09:58:09 -06:00
extern void TekSetFontSize ( TekWidget /* tw */ , Bool /* fromMenu */ , int /* newitem */ ) ;
2007-06-15 13:34:50 -06:00
extern void TekSimulatePageButton ( TekWidget /* tw */ , Bool /* reset */ ) ;
# endif
2006-11-26 04:11:12 -07:00
/* button.c */
2010-10-23 13:14:52 -06:00
# define MotionOff( s, t ) if (!(screen->hide_pointer)) { \
2006-11-26 04:11:12 -07:00
( s ) - > event_mask | = ButtonMotionMask ; \
( s ) - > event_mask & = ~ PointerMotionMask ; \
XSelectInput ( XtDisplay ( ( t ) ) , XtWindow ( ( t ) ) , ( long ) ( s ) - > event_mask ) ; }
# define MotionOn( s, t ) { \
( s ) - > event_mask & = ~ ButtonMotionMask ; \
( s ) - > event_mask | = PointerMotionMask ; \
XSelectInput ( XtDisplay ( ( t ) ) , XtWindow ( ( t ) ) , ( long ) ( s ) - > event_mask ) ; }
extern Bool SendMousePosition ( XtermWidget /* w */ , XEvent * /* event */ ) ;
extern void DiredButton PROTO_XT_ACTIONS_ARGS ;
extern void DisownSelection ( XtermWidget /* termw */ ) ;
2008-02-16 02:40:00 -07:00
extern void UnhiliteSelection ( XtermWidget /* termw */ ) ;
2010-11-29 13:10:09 -07:00
extern void HandleCopySelection PROTO_XT_ACTIONS_ARGS ;
2006-11-26 04:11:12 -07:00
extern void HandleInsertSelection PROTO_XT_ACTIONS_ARGS ;
extern void HandleKeyboardSelectEnd PROTO_XT_ACTIONS_ARGS ;
extern void HandleKeyboardSelectExtend PROTO_XT_ACTIONS_ARGS ;
extern void HandleKeyboardSelectStart PROTO_XT_ACTIONS_ARGS ;
extern void HandleKeyboardStartExtend PROTO_XT_ACTIONS_ARGS ;
extern void HandleSelectEnd PROTO_XT_ACTIONS_ARGS ;
extern void HandleSelectExtend PROTO_XT_ACTIONS_ARGS ;
extern void HandleSelectSet PROTO_XT_ACTIONS_ARGS ;
extern void HandleSelectStart PROTO_XT_ACTIONS_ARGS ;
extern void HandleStartExtend PROTO_XT_ACTIONS_ARGS ;
extern void ResizeSelection ( TScreen * /* screen */ , int /* rows */ , int /* cols */ ) ;
extern void ScrollSelection ( TScreen * /* screen */ , int /* amount */ , Bool /* always */ ) ;
2010-03-25 16:03:51 -06:00
extern void TrackMouse ( XtermWidget /* xw */ , int /* func */ , CELL * /* start */ , int /* firstrow */ , int /* lastrow */ ) ;
2006-11-26 04:11:12 -07:00
extern void ViButton PROTO_XT_ACTIONS_ARGS ;
2010-03-25 16:03:51 -06:00
extern int xtermUtf8ToTextList ( XtermWidget /* xw */ , XTextProperty * /* text_prop */ , char * * * /* text_list */ , int * /* text_list_count */ ) ;
2006-11-26 04:11:12 -07:00
# if OPT_DEC_LOCATOR
extern void GetLocatorPosition ( XtermWidget /* w */ ) ;
extern void InitLocatorFilter ( XtermWidget /* w */ ) ;
# endif /* OPT_DEC_LOCATOR */
2007-06-15 13:34:50 -06:00
# if OPT_FOCUS_EVENT
extern void SendFocusButton ( XtermWidget /* xw */ , XFocusChangeEvent * /* event */ ) ;
# else
# define SendFocusBotton(xw, event) /* nothing */
# endif
2006-11-26 04:11:12 -07:00
# if OPT_PASTE64
extern void AppendToSelectionBuffer ( TScreen * /* screen */ , unsigned /* c */ ) ;
extern void ClearSelectionBuffer ( TScreen * /* screen */ ) ;
2010-03-25 16:03:51 -06:00
extern void CompleteSelection ( XtermWidget /* xw */ , String * /* args */ , Cardinal /* len */ ) ;
2006-11-26 04:11:12 -07:00
extern void xtermGetSelection ( Widget /* w */ , Time /* ev_time */ , String * /* params */ , Cardinal /* num_params */ , Atom * /* targets */ ) ;
# endif
# if OPT_READLINE
extern void ReadLineButton PROTO_XT_ACTIONS_ARGS ;
# endif
# if OPT_WIDE_CHARS
extern Bool iswide ( int /* i */ ) ;
2010-05-08 06:20:46 -06:00
# define WideCells(n) (((IChar)(n) >= first_widechar) ? my_wcwidth((wchar_t) (n)) : 1)
# define isWide(n) (((IChar)(n) >= first_widechar) && iswide(n))
2009-10-31 08:11:57 -06:00
# else
# define WideCells(n) 1
2006-11-26 04:11:12 -07:00
# endif
2007-06-15 13:34:50 -06:00
/* cachedCgs.c */
extern CgsEnum getCgsId ( XtermWidget /*xw*/ , VTwin * /*cgsWin*/ , GC /*gc*/ ) ;
extern GC freeCgs ( XtermWidget /*xw*/ , VTwin * /*cgsWin*/ , CgsEnum /*cgsId*/ ) ;
extern GC getCgsGC ( XtermWidget /*xw*/ , VTwin * /*cgsWin*/ , CgsEnum /*cgsId*/ ) ;
extern Pixel getCgsBack ( XtermWidget /*xw*/ , VTwin * /*cgsWin*/ , GC /*gc*/ ) ;
extern Pixel getCgsFore ( XtermWidget /*xw*/ , VTwin * /*cgsWin*/ , GC /*gc*/ ) ;
2008-02-16 02:40:00 -07:00
extern XTermFonts * getCgsFont ( XtermWidget /*xw*/ , VTwin * /*cgsWin*/ , GC /*gc*/ ) ;
extern void clrCgsFonts ( XtermWidget /*xw*/ , VTwin * /*cgsWin*/ , XTermFonts * /*font*/ ) ;
2007-06-15 13:34:50 -06:00
extern void copyCgs ( XtermWidget /*xw*/ , VTwin * /*cgsWin*/ , CgsEnum /*dstCgsId*/ , CgsEnum /*srcCgsId*/ ) ;
extern void redoCgs ( XtermWidget /*xw*/ , Pixel /*fg*/ , Pixel /*bg*/ , CgsEnum /*cgsId*/ ) ;
extern void setCgsBack ( XtermWidget /*xw*/ , VTwin * /*cgsWin*/ , CgsEnum /*cgsId*/ , Pixel /*bg*/ ) ;
extern void setCgsCSet ( XtermWidget /*xw*/ , VTwin * /*cgsWin*/ , CgsEnum /*cgsId*/ , unsigned /*cset*/ ) ;
2008-02-16 02:40:00 -07:00
extern void setCgsFont ( XtermWidget /*xw*/ , VTwin * /*cgsWin*/ , CgsEnum /*cgsId*/ , XTermFonts * /*font*/ ) ;
2007-06-15 13:34:50 -06:00
extern void setCgsFore ( XtermWidget /*xw*/ , VTwin * /*cgsWin*/ , CgsEnum /*cgsId*/ , Pixel /*fg*/ ) ;
extern void swapCgs ( XtermWidget /*xw*/ , VTwin * /*cgsWin*/ , CgsEnum /*dstCgsId*/ , CgsEnum /*srcCgsId*/ ) ;
2007-08-25 12:58:42 -06:00
# ifdef NO_LEAKS
extern void noleaks_cachedCgs ( XtermWidget /* xw */ ) ;
# endif
2006-11-26 04:11:12 -07:00
/* charproc.c */
2008-08-25 12:05:56 -06:00
extern Bool CheckBufPtrs ( TScreen * /* screen */ ) ;
2010-10-05 13:37:23 -06:00
extern Bool set_cursor_gcs ( XtermWidget /* xw */ ) ;
2009-09-05 09:58:09 -06:00
extern int VTInit ( XtermWidget /* xw */ ) ;
2008-02-16 02:40:00 -07:00
extern void FindFontSelection ( XtermWidget /* xw */ , const char * /* atom_name */ , Bool /* justprobe */ ) ;
2006-11-26 04:11:12 -07:00
extern void HideCursor ( void ) ;
2009-10-31 08:11:57 -06:00
extern void RestartBlinking ( TScreen * /* screen */ ) ;
2006-11-26 04:11:12 -07:00
extern void ShowCursor ( void ) ;
2010-03-25 16:03:51 -06:00
extern void SwitchBufPtrs ( TScreen * /* screen */ , int /* toBuf */ ) ;
2006-11-26 04:11:12 -07:00
extern void ToggleAlternate ( XtermWidget /* xw */ ) ;
2011-03-07 13:41:27 -07:00
extern void VTInitTranslations ( void ) ;
2011-08-18 13:47:42 -06:00
extern void VTReset ( XtermWidget /* xw */ , int /* full */ , int /* saved */ ) GCC_NORETURN ;
2009-09-05 09:58:09 -06:00
extern void VTRun ( XtermWidget /* xw */ ) ;
2006-11-26 04:11:12 -07:00
extern void dotext ( XtermWidget /* xw */ , int /* charset */ , IChar * /* buf */ , Cardinal /* len */ ) ;
2012-04-14 03:02:46 -06:00
extern void lookupSelectUnit ( XtermWidget /* xw */ , Cardinal /* item */ , String /* value */ ) ;
2007-06-15 13:34:50 -06:00
extern void releaseCursorGCs ( XtermWidget /*xw*/ ) ;
extern void releaseWindowGCs ( XtermWidget /*xw*/ , VTwin * /*win*/ ) ;
2006-11-26 04:11:12 -07:00
extern void resetCharsets ( TScreen * /* screen */ ) ;
extern void set_max_col ( TScreen * /* screen */ , int /* cols */ ) ;
extern void set_max_row ( TScreen * /* screen */ , int /* rows */ ) ;
2012-06-07 14:20:23 -06:00
extern void set_lr_margins ( TScreen * /* screen */ , int /* left */ , int /* right */ ) ;
2006-11-26 04:11:12 -07:00
extern void set_tb_margins ( TScreen * /* screen */ , int /* top */ , int /* bottom */ ) ;
extern void unparse_end ( XtermWidget /* xw */ ) ;
extern void unparseputc ( XtermWidget /* xw */ , int /* c */ ) ;
extern void unparseputc1 ( XtermWidget /* xw */ , int /* c */ ) ;
extern void unparseputn ( XtermWidget /* xw */ , unsigned /* n */ ) ;
2009-10-31 08:11:57 -06:00
extern void unparseputs ( XtermWidget /* xw */ , const char * /* s */ ) ;
2006-11-26 04:11:12 -07:00
extern void unparseseq ( XtermWidget /* xw */ , ANSI * /* ap */ ) ;
2010-10-23 13:14:52 -06:00
extern void v_write ( int /* f */ , const Char * /* d */ , unsigned /* len */ ) ;
2006-11-26 04:11:12 -07:00
extern void xtermAddInput ( Widget /* w */ ) ;
# if OPT_BLINK_CURS
extern void ToggleCursorBlink ( TScreen * /* screen */ ) ;
# endif
2012-06-07 14:20:23 -06:00
# if OPT_BLINK_TEXT
extern Bool LineHasBlinking ( TScreen * /* screen */ , LineData * /* ld */ ) ;
# endif
2012-04-14 03:02:46 -06:00
# if OPT_INPUT_METHOD
extern TInput * lookupTInput ( XtermWidget /* xw */ , Widget /* w */ ) ;
# endif
2006-11-26 04:11:12 -07:00
# if OPT_ISO_COLORS
extern void SGR_Background ( XtermWidget /* xw */ , int /* color */ ) ;
extern void SGR_Foreground ( XtermWidget /* xw */ , int /* color */ ) ;
# endif
# ifdef NO_LEAKS
extern void noleaks_charproc ( void ) ;
# endif
/* charsets.c */
2014-01-02 08:14:50 -07:00
extern unsigned xtermCharSetIn ( TScreen * /* screen */ , unsigned /* code */ , int /* charset */ ) ;
2008-08-25 12:05:56 -06:00
extern int xtermCharSetOut ( XtermWidget /* xw */ , IChar * /* buf */ , IChar * /* ptr */ , int /* charset */ ) ;
2006-11-26 04:11:12 -07:00
/* cursor.c */
2012-06-07 14:20:23 -06:00
extern int CursorCol ( XtermWidget /* xw */ ) ;
extern int CursorRow ( XtermWidget /* xw */ ) ;
2008-08-25 12:05:56 -06:00
extern void AdjustSavedCursor ( XtermWidget /* xw */ , int /* adjust */ ) ;
2012-06-07 14:20:23 -06:00
extern void CarriageReturn ( XtermWidget /* xw */ ) ;
extern void CursorBack ( XtermWidget /* xw */ , int /* n */ ) ;
extern void CursorDown ( TScreen * /* screen */ , int /* n */ ) ;
extern void CursorForward ( XtermWidget /* xw */ , int /* n */ ) ;
extern void CursorNextLine ( XtermWidget /* xw */ , int /* count */ ) ;
extern void CursorPrevLine ( XtermWidget /* xw */ , int /* count */ ) ;
2006-11-26 04:11:12 -07:00
extern void CursorRestore ( XtermWidget /* xw */ ) ;
extern void CursorSave ( XtermWidget /* xw */ ) ;
extern void CursorSet ( TScreen * /* screen */ , int /* row */ , int /* col */ , unsigned /* flags */ ) ;
extern void CursorUp ( TScreen * /* screen */ , int /* n */ ) ;
extern void RevIndex ( XtermWidget /* xw */ , int /* amount */ ) ;
extern void xtermIndex ( XtermWidget /* xw */ , int /* amount */ ) ;
# if OPT_TRACE
extern int set_cur_col ( TScreen * /* screen */ , int /* value */ ) ;
extern int set_cur_row ( TScreen * /* screen */ , int /* value */ ) ;
# else
# define set_cur_col(screen, value) screen->cur_col = value
# define set_cur_row(screen, value) screen->cur_row = value
# endif
/* doublechr.c */
2007-06-15 13:34:50 -06:00
extern void xterm_DECDHL ( XtermWidget /* xw */ , Bool /* top */ ) ;
extern void xterm_DECSWL ( XtermWidget /* xw */ ) ;
extern void xterm_DECDWL ( XtermWidget /* xw */ ) ;
2012-06-07 14:20:23 -06:00
extern void xterm_ResetDouble ( XtermWidget /* xw */ ) ;
2006-11-26 04:11:12 -07:00
# if OPT_DEC_CHRSET
2007-06-15 13:34:50 -06:00
extern int xterm_Double_index ( XtermWidget /* xw */ , unsigned /* chrset */ , unsigned /* flags */ ) ;
2008-02-16 02:40:00 -07:00
extern GC xterm_DoubleGC ( XtermWidget /* xw */ , unsigned /* chrset */ , unsigned /* flags */ , GC /* old_gc */ , int * /* inxp */ ) ;
2006-11-26 04:11:12 -07:00
# endif
/* input.c */
2009-03-09 16:13:04 -06:00
extern unsigned xtermParamToState ( XtermWidget /* xw */ , unsigned /* param */ ) ;
extern unsigned xtermStateToParam ( XtermWidget /* xw */ , unsigned /* state */ ) ;
2006-11-26 04:11:12 -07:00
extern Bool xtermDeleteIsDEL ( XtermWidget /* xw */ ) ;
extern void Input ( XtermWidget /* xw */ , XKeyEvent */ * event */ , Bool /* eightbit */ ) ;
2010-08-22 07:38:11 -06:00
extern void StringInput ( XtermWidget /* xw */ , const Char * /* string */ , size_t /* nbytes */ ) ;
2006-11-26 04:11:12 -07:00
# if OPT_NUM_LOCK
extern void VTInitModifiers ( XtermWidget /* xw */ ) ;
# endif
2009-09-05 09:58:09 -06:00
/* linedata.c */
extern LineData * getLineData ( TScreen * /* screen */ , int /* row */ ) ;
extern void copyLineData ( LineData * /* dst */ , LineData * /* src */ ) ;
extern void initLineData ( XtermWidget /* xw */ ) ;
extern CellData * newCellData ( XtermWidget /* xw */ , Cardinal /* count */ ) ;
extern void saveCellData ( TScreen * /* screen */ , CellData * /* data */ , Cardinal /* cell */ , LineData * /* ld */ , int /* column */ ) ;
extern void restoreCellData ( TScreen * /* screen */ , CellData * /* data */ , Cardinal /* cell */ , LineData * /* ld */ , int /* column */ ) ;
2006-11-26 04:11:12 -07:00
/* main.c */
# define ENVP_ARG /**/
extern int main ( int /* argc */ , char * * /* argv */ ENVP_ARG ) ;
extern int GetBytesAvailable ( int /* fd */ ) ;
extern int kill_process_group ( int /* pid */ , int /* sig */ ) ;
extern int nonblocking_wait ( void ) ;
2007-08-25 12:58:42 -06:00
# if OPT_PTY_HANDSHAKE
2006-11-26 04:11:12 -07:00
extern void first_map_occurred ( void ) ;
2007-08-25 12:58:42 -06:00
# else
# define first_map_occurred() /* nothing */
# endif
2006-11-26 04:11:12 -07:00
2013-03-09 07:45:38 -07:00
extern void Exit ( int /* n */ ) GCC_NORETURN ;
2006-11-26 04:11:12 -07:00
# ifndef SIG_ATOMIC_T
2013-01-04 09:40:18 -07:00
# define SIG_ATOMIC_T int
2006-11-26 04:11:12 -07:00
# endif
# if OPT_WIDE_CHARS
2010-05-08 06:20:46 -06:00
extern unsigned first_widechar ;
2006-11-26 04:11:12 -07:00
extern int ( * my_wcwidth ) ( wchar_t ) ;
# endif
/* menu.c */
extern void do_hangup PROTO_XT_CALLBACK_ARGS ;
extern void repairSizeHints ( void ) ;
extern void show_8bit_control ( Bool /* value */ ) ;
/* misc.c */
2011-08-18 13:47:42 -06:00
# define TIMESTAMP_LEN 20 /* length of TIMESTAMP_FMT */
2010-05-08 06:20:46 -06:00
extern Bool AllocateTermColor ( XtermWidget , ScrnColors * , int , const char * , Bool ) ;
2013-01-04 09:40:18 -07:00
extern Boolean xtermGetWinAttrs ( Display * /* dpy */ , Window /* win */ , XWindowAttributes * /* attrs */ ) ;
extern 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 */ ) ;
2007-08-25 12:58:42 -06:00
extern Cursor make_colored_cursor ( unsigned /* cursorindex */ , unsigned long /* fg */ , unsigned long /* bg */ ) ;
2006-11-26 04:11:12 -07:00
extern OptionHelp * sortedOpts ( OptionHelp * , XrmOptionDescRec * , Cardinal ) ;
2011-09-17 05:51:57 -06:00
extern String xtermEnvLocale ( void ) ;
2013-01-04 09:40:18 -07:00
extern Widget xtermOpenApplication ( XtAppContext * /* app_context_return */ , String /* application_class */ , XrmOptionDescRec */ * options */ , Cardinal /* num_options */ , int * /* argc_in_out */ , String */ * argv_in_out */ , String * /* fallback_resources */ , WidgetClass /* widget_class */ , ArgList /* args */ , Cardinal /* num_args */ ) ;
extern Window WMFrameWindow ( XtermWidget /* termw */ ) ;
2011-09-17 05:51:57 -06:00
extern XtInputMask xtermAppPending ( void ) ;
2013-01-04 09:40:18 -07:00
extern XrmOptionDescRec * sortedOptDescs ( XrmOptionDescRec * , Cardinal ) ;
extern XtermWidget getXtermWidget ( Widget /* w */ ) ;
2007-08-25 12:58:42 -06:00
extern char * udk_lookup ( int /* keycode */ , int * /* len */ ) ;
2006-11-26 04:11:12 -07:00
extern char * xtermEnvEncoding ( void ) ;
2013-01-04 09:40:18 -07:00
extern char * xtermFindShell ( char * /* leaf */ , Bool /* warning */ ) ;
2007-08-25 12:58:42 -06:00
extern const char * SysErrorMsg ( int /* n */ ) ;
extern const char * SysReasonMsg ( int /* n */ ) ;
2013-08-26 14:06:09 -06:00
extern Boolean allocateBestRGB ( XtermWidget /* xw */ , XColor * /* def */ ) ;
2013-01-04 09:40:18 -07:00
extern int ResetAnsiColorRequest ( XtermWidget , char * , int ) ;
2006-11-26 04:11:12 -07:00
extern int XStrCmp ( char * /* s1 */ , char * /* s2 */ ) ;
2011-08-18 13:47:42 -06:00
extern int creat_as ( uid_t /* uid */ , gid_t /* gid */ , Bool /* append */ , char * /* pathname */ , unsigned /* mode */ ) ;
2013-01-04 09:40:18 -07:00
extern int getVisualDepth ( XtermWidget /* xw */ ) ;
2006-11-26 04:11:12 -07:00
extern int open_userfile ( uid_t /* uid */ , gid_t /* gid */ , char * /* path */ , Bool /* append */ ) ;
extern int xerror ( Display * /* d */ , XErrorEvent * /* ev */ ) ;
extern int xioerror ( Display * /* dpy */ ) ;
2013-01-04 09:40:18 -07:00
extern int xtermClosestColor ( XtermWidget /* xw */ , int /* red */ , int /* green */ , int /* blue */ ) ;
extern int xtermResetIds ( TScreen * /* screen */ ) ;
2010-08-22 07:38:11 -06:00
extern void Bell ( XtermWidget /* xw */ , int /* which */ , int /* percent */ ) ;
2012-06-07 14:20:23 -06:00
extern void ChangeGroup ( XtermWidget /* xw */ , const char * /* attribute */ , char * /* value */ ) ;
2009-03-09 16:13:04 -06:00
extern void ChangeIconName ( XtermWidget /* xw */ , char * /* name */ ) ;
extern void ChangeTitle ( XtermWidget /* xw */ , char * /* name */ ) ;
2006-11-26 04:11:12 -07:00
extern void ChangeXprop ( char * /* name */ ) ;
2013-03-09 07:45:38 -07:00
extern void Cleanup ( int /* code */ ) GCC_NORETURN ;
2006-11-26 04:11:12 -07:00
extern void HandleBellPropertyChange PROTO_XT_EV_HANDLER_ARGS ;
extern void HandleEightBitKeyPressed PROTO_XT_ACTIONS_ARGS ;
extern void HandleEnterWindow PROTO_XT_EV_HANDLER_ARGS ;
extern void HandleFocusChange PROTO_XT_EV_HANDLER_ARGS ;
extern void HandleInterpret PROTO_XT_ACTIONS_ARGS ;
extern void HandleKeyPressed PROTO_XT_ACTIONS_ARGS ;
extern void HandleLeaveWindow PROTO_XT_EV_HANDLER_ARGS ;
2007-06-15 13:34:50 -06:00
extern void HandleSpawnTerminal PROTO_XT_ACTIONS_ARGS ;
2006-11-26 04:11:12 -07:00
extern void HandleStringEvent PROTO_XT_ACTIONS_ARGS ;
2013-03-09 07:45:38 -07:00
extern void NormalExit ( void ) ;
2009-10-31 08:11:57 -06:00
extern void Panic ( const char * /* s */ , int /* a */ ) ;
2006-11-26 04:11:12 -07:00
extern void Redraw ( void ) ;
extern void ReverseOldColors ( void ) ;
2011-03-07 13:41:27 -07:00
extern void SysError ( int /* i */ ) GCC_NORETURN ;
2006-11-26 04:11:12 -07:00
extern void VisualBell ( void ) ;
2014-01-02 08:14:50 -07:00
extern void cleanup_colored_cursor ( void ) ;
2006-11-26 04:11:12 -07:00
extern void do_dcs ( XtermWidget /* xw */ , Char * /* buf */ , size_t /* len */ ) ;
2010-10-05 13:37:23 -06:00
extern void do_decrpm ( XtermWidget /* xw */ , int /* nparam */ , int * /* params */ ) ;
2010-05-08 06:20:46 -06:00
extern void do_osc ( XtermWidget /* xw */ , Char * /* buf */ , size_t /* len */ , int /* final */ ) ;
2010-10-05 13:37:23 -06:00
extern void do_rpm ( XtermWidget /* xw */ , int /* nparam */ , int * /* params */ ) ;
2006-11-26 04:11:12 -07:00
extern void do_xevents ( void ) ;
extern void end_tek_mode ( void ) ;
extern void end_vt_mode ( void ) ;
extern void hide_tek_window ( void ) ;
extern void hide_vt_window ( void ) ;
2013-01-04 09:40:18 -07:00
extern void ice_error ( IceConn /* iceConn */ ) ;
2014-01-02 08:14:50 -07:00
extern void init_colored_cursor ( void ) ;
2006-11-26 04:11:12 -07:00
extern void reset_decudk ( void ) ;
extern void set_tek_visibility ( Bool /* on */ ) ;
extern void set_vt_visibility ( Bool /* on */ ) ;
extern void switch_modes ( Bool /* tovt */ ) ;
extern void timestamp_filename ( char * /* dst */ , const char * /* src */ ) ;
extern void xevents ( void ) ;
extern void xt_error ( String /* message */ ) ;
2009-03-09 16:13:04 -06:00
extern void xtermBell ( XtermWidget /* xw */ , int /* which */ , int /* percent */ ) ;
2007-08-25 12:58:42 -06:00
extern void xtermCopyEnv ( char * * /* oldenv */ ) ;
2008-02-16 02:40:00 -07:00
extern void xtermDisplayCursor ( XtermWidget /* xw */ ) ;
2013-01-04 09:40:18 -07:00
extern void xtermEmbedWindow ( Window /* winToEmbedInfo */ ) ;
extern void xtermLoadIcon ( XtermWidget /* xw */ ) ;
2012-04-14 03:02:46 -06:00
extern void xtermPerror ( const char * /*fmt*/ , . . . ) GCC_PRINTFLIKE ( 1 , 2 ) ;
2009-10-31 08:11:57 -06:00
extern void xtermSetenv ( const char * /* var */ , const char * /* value */ ) ;
2008-02-16 02:40:00 -07:00
extern void xtermShowPointer ( XtermWidget /* xw */ , Bool /* enable */ ) ;
2011-09-17 05:51:57 -06:00
extern void xtermUnsetenv ( const char * /* var */ ) ;
2012-04-14 03:02:46 -06:00
extern void xtermWarning ( const char * /*fmt*/ , . . . ) GCC_PRINTFLIKE ( 1 , 2 ) ;
2006-11-26 04:11:12 -07:00
# if OPT_DABBREV
extern void HandleDabbrevExpand PROTO_XT_ACTIONS_ARGS ;
# endif
# if OPT_MAXIMIZE
extern int QueryMaximize ( XtermWidget /* termw */ , unsigned * /* width */ , unsigned * /* height */ ) ;
extern void HandleDeIconify PROTO_XT_ACTIONS_ARGS ;
extern void HandleIconify PROTO_XT_ACTIONS_ARGS ;
extern void HandleMaximize PROTO_XT_ACTIONS_ARGS ;
extern void HandleRestoreSize PROTO_XT_ACTIONS_ARGS ;
extern void RequestMaximize ( XtermWidget /* termw */ , int /* maximize */ ) ;
# endif
2010-05-08 06:20:46 -06:00
# if OPT_SCROLL_LOCK
extern void GetScrollLock ( TScreen * /* screen */ ) ;
extern void HandleScrollLock PROTO_XT_ACTIONS_ARGS ;
extern void ShowScrollLock ( TScreen * /* screen */ , Bool /* enable */ ) ;
extern void SetScrollLock ( TScreen * /* screen */ , Bool /* enable */ ) ;
extern void xtermShowLED ( TScreen * /* screen */ , Cardinal /* led_number */ , Bool /* enable */ ) ;
extern void xtermClearLEDs ( TScreen * /* screen */ ) ;
# else
# define ShowScrollLock(screen, enable) /* nothing */
# define SetScrollLock(screen, enable) /* nothing */
# define GetScrollLock(screen) /* nothing */
# endif
2012-04-14 03:02:46 -06:00
# if OPT_SELECTION_OPS
extern void HandleExecFormatted PROTO_XT_ACTIONS_ARGS ;
extern void HandleExecSelectable PROTO_XT_ACTIONS_ARGS ;
extern void HandleInsertFormatted PROTO_XT_ACTIONS_ARGS ;
extern void HandleInsertSelectable PROTO_XT_ACTIONS_ARGS ;
# endif
2011-08-28 11:40:55 -06:00
# if OPT_SESSION_MGT
extern void xtermCloseSession ( void ) ;
extern void xtermOpenSession ( void ) ;
# else
# define xtermCloseSession() /* nothing */
# define xtermOpenSession() /* nothing */
# endif
2006-11-26 04:11:12 -07:00
# if OPT_WIDE_CHARS
extern Bool xtermEnvUTF8 ( void ) ;
# else
# define xtermEnvUTF8() False
# endif
# ifdef ALLOWLOGGING
2010-08-22 07:38:11 -06:00
extern void StartLog ( XtermWidget /* xw */ ) ;
extern void CloseLog ( XtermWidget /* xw */ ) ;
extern void FlushLog ( XtermWidget /* xw */ ) ;
2006-11-26 04:11:12 -07:00
# else
2010-08-22 07:38:11 -06:00
# define FlushLog(xw) /*nothing*/
2006-11-26 04:11:12 -07:00
# endif
/* print.c */
2009-09-05 09:58:09 -06:00
extern Bool xtermHasPrinter ( XtermWidget /* xw */ ) ;
2011-06-07 13:21:06 -06:00
extern PrinterFlags * getPrinterFlags ( XtermWidget /* xw */ , String * /* params */ , Cardinal * /* param_count */ ) ;
2009-09-05 09:58:09 -06:00
extern int xtermPrinterControl ( XtermWidget /* xw */ , int /* chr */ ) ;
extern void setPrinterControlMode ( XtermWidget /* xw */ , int /* mode */ ) ;
extern void xtermAutoPrint ( XtermWidget /* xw */ , unsigned /* chr */ ) ;
extern void xtermMediaControl ( XtermWidget /* xw */ , int /* param */ , int /* private_seq */ ) ;
2010-03-25 16:03:51 -06:00
extern void xtermPrintScreen ( XtermWidget /* xw */ , Bool /* use_DECPEX */ , PrinterFlags * /* p */ ) ;
extern void xtermPrintEverything ( XtermWidget /* xw */ , PrinterFlags * /* p */ ) ;
2011-08-18 13:47:42 -06:00
extern void xtermPrintImmediately ( XtermWidget /* xw */ , String /* filename */ , int /* opts */ , int /* attributes */ ) ;
extern void xtermPrintOnXError ( XtermWidget /* xw */ , int /* n */ ) ;
2006-11-26 04:11:12 -07:00
/* ptydata.c */
# ifdef VMS
# define PtySelect int
# else
# define PtySelect fd_set
# endif
2007-06-15 13:34:50 -06:00
extern Bool decodeUtf8 ( PtyData * /* data */ ) ;
2010-08-22 07:38:11 -06:00
extern int readPtyData ( XtermWidget /* xw */ , PtySelect * /* select_mask */ , PtyData * /* data */ ) ;
extern void fillPtyData ( XtermWidget /* xw */ , PtyData * /* data */ , const char * /* value */ , int /* length */ ) ;
2006-11-26 04:11:12 -07:00
extern void initPtyData ( PtyData * * /* data */ ) ;
2010-08-22 07:38:11 -06:00
extern void trimPtyData ( XtermWidget /* xw */ , PtyData * /* data */ ) ;
2006-11-26 04:11:12 -07:00
# ifdef NO_LEAKS
extern void noleaks_ptydata ( void ) ;
# endif
# if OPT_WIDE_CHARS
extern Char * convertToUTF8 ( Char * /* lp */ , unsigned /* c */ ) ;
extern IChar nextPtyData ( TScreen * /* screen */ , PtyData * /* data */ ) ;
2007-06-15 13:34:50 -06:00
extern IChar skipPtyData ( PtyData * /* data */ ) ;
extern PtyData * fakePtyData ( PtyData * /* result */ , Char * /* next */ , Char * /* last */ ) ;
2006-11-26 04:11:12 -07:00
extern void switchPtyData ( TScreen * /* screen */ , int /* f */ ) ;
extern void writePtyData ( int /* f */ , IChar * /* d */ , unsigned /* len */ ) ;
2009-09-05 09:58:09 -06:00
# define morePtyData(screen,data) \
( ( ( data ) - > last > ( data ) - > next ) \
? ( ( ( screen ) - > utf8_inparse & & ! ( data ) - > utf_size ) \
? decodeUtf8 ( data ) \
: True ) \
: False )
2006-11-26 04:11:12 -07:00
# else
# define morePtyData(screen, data) ((data)->last > (data)->next)
2011-03-07 13:41:27 -07:00
# define nextPtyData(screen, data) (IChar) (*((data)->next++) & \
( screen - > output_eight_bits \
? 0xff \
: 0x7f ) )
2006-11-26 04:11:12 -07:00
# define writePtyData(f,d,len) v_write(f,d,len)
# endif
/* screen.c */
2013-01-04 09:40:18 -07:00
/*
* See http : //standards.freedesktop.org/wm-spec/wm-spec-latest.html
*/
# define _NET_WM_STATE_REMOVE 0 /* remove/unset property */
# define _NET_WM_STATE_ADD 1 /* add/set property */
# define _NET_WM_STATE_TOGGLE 2 /* toggle property */
2006-11-26 04:11:12 -07:00
extern Bool non_blank_line ( TScreen */ * screen */ , int /* row */ , int /* col */ , int /* len */ ) ;
2012-06-07 14:20:23 -06:00
extern Char * allocScrnData ( TScreen * /* screen */ , unsigned /* nrow */ , unsigned /* ncol */ ) ;
2009-09-05 09:58:09 -06:00
extern ScrnBuf allocScrnBuf ( XtermWidget /* xw */ , unsigned /* nrow */ , unsigned /* ncol */ , ScrnPtr * /* addr */ ) ;
extern ScrnBuf scrnHeadAddr ( TScreen * /* screen */ , ScrnBuf /* base */ , unsigned /* offset */ ) ;
2006-11-26 04:11:12 -07:00
extern int ScreenResize ( XtermWidget /* xw */ , int /* width */ , int /* height */ , unsigned * /* flags */ ) ;
extern size_t ScrnPointers ( TScreen * /* screen */ , size_t /* len */ ) ;
extern void ClearBufRows ( XtermWidget /* xw */ , int /* first */ , int /* last */ ) ;
2007-08-25 12:58:42 -06:00
extern void ClearCells ( XtermWidget /* xw */ , int /* flags */ , unsigned /* len */ , int /* row */ , int /* col */ ) ;
2012-06-07 14:20:23 -06:00
extern void CopyCells ( TScreen * /* screen */ , LineData * /* src */ , LineData * /* dst */ , int /* col */ , int /* len */ ) ;
2013-01-04 09:40:18 -07:00
extern void FullScreen ( XtermWidget /* xw */ , int /* mode */ ) ;
2009-09-05 09:58:09 -06:00
extern void ScrnAllocBuf ( XtermWidget /* xw */ ) ;
2007-08-25 12:58:42 -06:00
extern void ScrnClearCells ( XtermWidget /* xw */ , int /* row */ , int /* col */ , unsigned /* len */ ) ;
2006-11-26 04:11:12 -07:00
extern void ScrnDeleteChar ( XtermWidget /* xw */ , unsigned /* n */ ) ;
2012-04-14 03:02:46 -06:00
extern void ScrnDeleteCol ( XtermWidget /* xw */ , unsigned /* n */ ) ;
2009-09-05 09:58:09 -06:00
extern void ScrnDeleteLine ( XtermWidget /* xw */ , ScrnBuf /* sb */ , int /* n */ , int /* last */ , unsigned /* where */ ) ;
2007-08-25 12:58:42 -06:00
extern void ScrnDisownSelection ( XtermWidget /* xw */ ) ;
2008-02-16 02:40:00 -07:00
extern void ScrnFillRectangle ( XtermWidget /* xw */ , XTermRect * , int , unsigned /* flags */ , Bool /* keepColors */ ) ;
2006-11-26 04:11:12 -07:00
extern void ScrnInsertChar ( XtermWidget /* xw */ , unsigned /* n */ ) ;
2012-04-14 03:02:46 -06:00
extern void ScrnInsertCol ( XtermWidget /* xw */ , unsigned /* n */ ) ;
2009-09-05 09:58:09 -06:00
extern void ScrnInsertLine ( XtermWidget /* xw */ , ScrnBuf /* sb */ , int /* last */ , int /* where */ , unsigned /* n */ ) ;
2006-11-26 04:11:12 -07:00
extern void ScrnRefresh ( XtermWidget /* xw */ , int /* toprow */ , int /* leftcol */ , int /* nrows */ , int /* ncols */ , Bool /* force */ ) ;
extern void ScrnUpdate ( XtermWidget /* xw */ , int /* toprow */ , int /* leftcol */ , int /* nrows */ , int /* ncols */ , Bool /* force */ ) ;
2010-05-08 06:20:46 -06:00
extern void ScrnWriteText ( XtermWidget /* xw */ , IChar * /* str */ , unsigned /* flags */ , unsigned /* cur_fg_bg */ , unsigned /* length */ ) ;
2010-10-23 13:14:52 -06:00
extern void ShowWrapMarks ( XtermWidget /* xw */ , int /* row */ , LineData * /* ld */ ) ;
2009-09-05 09:58:09 -06:00
extern void setupLineData ( TScreen * /* screen */ , ScrnBuf /* base */ , Char * /* data */ , unsigned /* nrow */ , unsigned /* ncol */ ) ;
2006-11-26 04:11:12 -07:00
extern void xtermParseRect ( XtermWidget /* xw */ , int , int * , XTermRect * ) ;
2007-08-25 12:58:42 -06:00
# if OPT_TRACE && OPT_TRACE_FLAGS
2009-09-05 09:58:09 -06:00
extern int LineTstFlag ( LineData /* ld */ , int /* flag */ ) ;
extern void LineClrFlag ( LineData /* ld */ , int /* flag */ ) ;
extern void LineSetFlag ( LineData /* ld */ , int /* flag */ ) ;
2007-08-25 12:58:42 -06:00
# else
2006-11-26 04:11:12 -07:00
2009-09-05 09:58:09 -06:00
# define LineFlags(ld) GetLineFlags(ld)
# define LineClrFlag(ld, flag) SetLineFlags(ld, (GetLineFlags(ld) & ~ (flag)))
# define LineSetFlag(ld, flag) SetLineFlags(ld, (GetLineFlags(ld) | (flag)))
# define LineTstFlag(ld, flag) ((GetLineFlags(ld) & flag) != 0)
2006-11-26 04:11:12 -07:00
2007-08-25 12:58:42 -06:00
# endif /* OPT_TRACE && OPT_TRACE_FLAGS */
2006-11-26 04:11:12 -07:00
2009-09-05 09:58:09 -06:00
# define LineClrBlinked(ld) LineClrFlag(ld, LINEBLINKED)
# define LineSetBlinked(ld) LineSetFlag(ld, LINEBLINKED)
# define LineTstBlinked(ld) LineTstFlag(ld, LINEBLINKED)
2006-11-26 04:11:12 -07:00
2009-09-05 09:58:09 -06:00
# define LineClrWrapped(ld) LineClrFlag(ld, LINEWRAPPED)
# define LineSetWrapped(ld) LineSetFlag(ld, LINEWRAPPED)
# define LineTstWrapped(ld) LineTstFlag(ld, LINEWRAPPED)
2006-11-26 04:11:12 -07:00
# define ScrnHaveSelection(screen) \
( ( screen ) - > startH . row ! = ( screen ) - > endH . row \
| | ( screen ) - > startH . col ! = ( screen ) - > endH . col )
2012-06-07 14:20:23 -06:00
# define ScrnAreRowsInSelection(screen, first, last) \
2006-11-26 04:11:12 -07:00
( ( last ) > = ( screen ) - > startH . row & & ( first ) < = ( screen ) - > endH . row )
2012-06-07 14:20:23 -06:00
# define ScrnIsRowInSelection(screen, line) \
2006-11-26 04:11:12 -07:00
( ( line ) > = ( screen ) - > startH . row & & ( line ) < = ( screen ) - > endH . row )
2012-06-07 14:20:23 -06:00
# define ScrnHaveRowMargins(screen) \
2006-11-26 04:11:12 -07:00
( ( screen ) - > top_marg ! = 0 \
| | ( ( screen ) - > bot_marg ! = screen - > max_row ) )
2012-06-07 14:20:23 -06:00
# define ScrnIsRowInMargins(screen, line) \
2006-11-26 04:11:12 -07:00
( ( line ) > = ( screen ) - > top_marg & & ( line ) < = ( screen ) - > bot_marg )
2012-06-07 14:20:23 -06:00
# define ScrnHaveColMargins(screen) \
( ( screen ) - > rgt_marg > ( screen ) - > max_col )
# define ScrnIsColInMargins(screen, col) \
( ( col ) > = ( screen ) - > lft_marg & & ( col ) < = ( screen ) - > rgt_marg )
# define IsLeftRightMode(xw) ((xw)->flags & LEFT_RIGHT)
# define ScrnLeftMargin(xw) (IsLeftRightMode(xw) \
? TScreenOf ( xw ) - > lft_marg \
: 0 )
# define ScrnRightMargin(xw) (IsLeftRightMode(xw) \
? TScreenOf ( xw ) - > rgt_marg \
: MaxCols ( TScreenOf ( xw ) ) - 1 )
2006-11-26 04:11:12 -07:00
# if OPT_DEC_RECTOPS
extern void ScrnCopyRectangle ( XtermWidget /* xw */ , XTermRect * , int , int * ) ;
extern void ScrnMarkRectangle ( XtermWidget /* xw */ , XTermRect * , Bool , int , int * ) ;
extern void ScrnWipeRectangle ( XtermWidget /* xw */ , XTermRect * ) ;
2012-06-07 14:20:23 -06:00
extern void xtermCheckRect ( XtermWidget /* xw */ , int /* nparam */ , int */ * params */ , int * /* result */ ) ;
2006-11-26 04:11:12 -07:00
# endif
# if OPT_WIDE_CHARS
extern void ChangeToWide ( XtermWidget /* xw */ ) ;
# endif
2009-09-05 09:58:09 -06:00
/* scrollback.c */
extern LineData * getScrollback ( TScreen * /* screen */ , int /* row */ ) ;
extern LineData * addScrollback ( TScreen * /* screen */ ) ;
2013-06-02 13:55:50 -06:00
extern void deleteScrollback ( TScreen * /* screen */ ) ;
2009-09-05 09:58:09 -06:00
2006-11-26 04:11:12 -07:00
/* scrollbar.c */
extern void DoResizeScreen ( XtermWidget /* xw */ ) ;
extern void HandleScrollBack PROTO_XT_ACTIONS_ARGS ;
extern void HandleScrollForward PROTO_XT_ACTIONS_ARGS ;
extern void ResizeScrollBar ( XtermWidget /* xw */ ) ;
extern void ScrollBarDrawThumb ( Widget /* scrollWidget */ ) ;
2007-06-15 13:34:50 -06:00
extern void ScrollBarOff ( XtermWidget /* xw */ ) ;
2009-09-05 09:58:09 -06:00
extern void ScrollBarOn ( XtermWidget /* xw */ , Bool /* init */ ) ;
2006-11-26 04:11:12 -07:00
extern void ScrollBarReverseVideo ( Widget /* scrollWidget */ ) ;
2007-06-15 13:34:50 -06:00
extern void ToggleScrollBar ( XtermWidget /* xw */ ) ;
2010-05-08 06:20:46 -06:00
extern void WindowScroll ( XtermWidget /* xw */ , int /* top */ , Bool /* always */ ) ;
2006-11-26 04:11:12 -07:00
# ifdef SCROLLBAR_RIGHT
extern void updateRightScrollbar ( XtermWidget /* xw */ ) ;
# else
# define updateRightScrollbar(xw) /* nothing */
# endif
/* tabs.c */
extern Bool TabToNextStop ( XtermWidget /* xw */ ) ;
extern Bool TabToPrevStop ( XtermWidget /* xw */ ) ;
extern void TabClear ( Tabs /* tabs */ , int /* col */ ) ;
extern void TabReset ( Tabs /* tabs */ ) ;
extern void TabSet ( Tabs /* tabs */ , int /* col */ ) ;
extern void TabZonk ( Tabs /* tabs */ ) ;
/* util.c */
2008-02-16 02:40:00 -07:00
extern Boolean isDefaultBackground ( const char * /* name */ ) ;
extern Boolean isDefaultForeground ( const char * /* name */ ) ;
2010-05-08 06:20:46 -06:00
extern GC updatedXtermGC ( XtermWidget /* xw */ , unsigned /* flags */ , unsigned /* fg_bg */ , Bool /* hilite */ ) ;
2007-08-25 12:58:42 -06:00
extern int ClearInLine ( XtermWidget /* xw */ , int /* row */ , int /* col */ , unsigned /* len */ ) ;
2006-11-26 04:11:12 -07:00
extern int HandleExposure ( XtermWidget /* xw */ , XEvent * /* event */ ) ;
2011-11-16 14:14:25 -07:00
extern int dimRound ( double /* value */ ) ;
2009-09-05 09:58:09 -06:00
extern int drawXtermText ( XtermWidget /* xw */ , unsigned /* flags */ , GC /* gc */ , int /* x */ , int /* y */ , int /* chrset */ , IChar * /* text */ , Cardinal /* len */ , int /* on_wide */ ) ;
2011-03-07 13:41:27 -07:00
extern int extendedBoolean ( const char * /* value */ , FlagList * /* table */ , Cardinal /* limit */ ) ;
2006-11-26 04:11:12 -07:00
extern void ChangeColors ( XtermWidget /* xw */ , ScrnColors * /* pNew */ ) ;
extern void ClearRight ( XtermWidget /* xw */ , int /* n */ ) ;
extern void ClearScreen ( XtermWidget /* xw */ ) ;
extern void DeleteChar ( XtermWidget /* xw */ , unsigned /* n */ ) ;
extern void DeleteLine ( XtermWidget /* xw */ , int /* n */ ) ;
extern void FlushScroll ( XtermWidget /* xw */ ) ;
extern void GetColors ( XtermWidget /* xw */ , ScrnColors * /* pColors */ ) ;
extern void InsertChar ( XtermWidget /* xw */ , unsigned /* n */ ) ;
extern void InsertLine ( XtermWidget /* xw */ , int /* n */ ) ;
extern void RevScroll ( XtermWidget /* xw */ , int /* amount */ ) ;
extern void ReverseVideo ( XtermWidget /* termw */ ) ;
2009-03-09 16:13:04 -06:00
extern void WriteText ( XtermWidget /* xw */ , IChar * /* str */ , Cardinal /* len */ ) ;
2006-11-26 04:11:12 -07:00
extern void decode_keyboard_type ( XtermWidget /* xw */ , struct XTERM_RESOURCE * /* rp */ ) ;
2010-05-08 06:20:46 -06:00
extern void decode_wcwidth ( XtermWidget /* xw */ ) ;
2013-01-04 09:40:18 -07:00
extern void do_cd_xtra_scroll ( XtermWidget /* xw */ ) ;
2006-11-26 04:11:12 -07:00
extern void do_erase_display ( XtermWidget /* xw */ , int /* param */ , int /* mode */ ) ;
extern void do_erase_line ( XtermWidget /* xw */ , int /* param */ , int /* mode */ ) ;
2013-01-04 09:40:18 -07:00
extern void do_ti_xtra_scroll ( XtermWidget /* xw */ ) ;
2007-06-15 13:34:50 -06:00
extern void getXtermSizeHints ( XtermWidget /* xw */ ) ;
2006-11-26 04:11:12 -07:00
extern void init_keyboard_type ( XtermWidget /* xw */ , xtermKeyboardType /* type */ , Bool /* set */ ) ;
extern void recolor_cursor ( TScreen * /* screen */ , Cursor /* cursor */ , unsigned long /* fg */ , unsigned long /* bg */ ) ;
extern void resetXtermGC ( XtermWidget /* xw */ , unsigned /* flags */ , Bool /* hilite */ ) ;
extern void scrolling_copy_area ( XtermWidget /* xw */ , int /* firstline */ , int /* nlines */ , int /* amount */ ) ;
extern void set_keyboard_type ( XtermWidget /* xw */ , xtermKeyboardType /* type */ , Bool /* set */ ) ;
extern void toggle_keyboard_type ( XtermWidget /* xw */ , xtermKeyboardType /* type */ ) ;
extern void update_keyboard_type ( void ) ;
2007-06-15 13:34:50 -06:00
extern void xtermClear ( XtermWidget /* xw */ ) ;
2012-04-14 03:02:46 -06:00
extern void xtermColIndex ( XtermWidget /* xw */ , Bool /* toLeft */ ) ;
extern void xtermColScroll ( XtermWidget /* xw */ , int /* amount */ , Bool /* toLeft */ , int /* at_col */ ) ;
2007-06-15 13:34:50 -06:00
extern void xtermRepaint ( XtermWidget /* xw */ ) ;
2006-11-26 04:11:12 -07:00
extern void xtermScroll ( XtermWidget /* xw */ , int /* amount */ ) ;
2012-04-14 03:02:46 -06:00
extern void xtermScrollLR ( XtermWidget /* xw */ , int /* amount */ , Bool /* toLeft */ ) ;
2006-11-26 04:11:12 -07:00
extern void xtermSizeHints ( XtermWidget /* xw */ , int /* scrollbarWidth */ ) ;
# if OPT_ISO_COLORS
2010-05-08 06:20:46 -06:00
extern unsigned extract_fg ( XtermWidget /* xw */ , unsigned /* color */ , unsigned /* flags */ ) ;
extern unsigned extract_bg ( XtermWidget /* xw */ , unsigned /* color */ , unsigned /* flags */ ) ;
2009-09-05 09:58:09 -06:00
extern CellColor makeColorPair ( int /* fg */ , int /* bg */ ) ;
2012-06-07 14:20:23 -06:00
extern void ClearCurBackground ( XtermWidget /* xw */ , int /* top */ , int /* left */ , unsigned /* height */ , unsigned /* width */ , unsigned /* fw */ ) ;
2006-11-26 04:11:12 -07:00
# define xtermColorPair(xw) makeColorPair(xw->sgr_foreground, xw->sgr_background)
# define getXtermForeground(xw, flags, color) \
( ( ( flags ) & FG_COLOR ) & & ( ( int ) ( color ) > = 0 & & ( color ) < MAXCOLORS ) \
2010-03-25 16:03:51 -06:00
? GET_COLOR_RES ( xw , TScreenOf ( xw ) - > Acolors [ color ] ) \
: T_COLOR ( TScreenOf ( xw ) , TEXT_FG ) )
2006-11-26 04:11:12 -07:00
# define getXtermBackground(xw, flags, color) \
( ( ( flags ) & BG_COLOR ) & & ( ( int ) ( color ) > = 0 & & ( color ) < MAXCOLORS ) \
2010-03-25 16:03:51 -06:00
? GET_COLOR_RES ( xw , TScreenOf ( xw ) - > Acolors [ color ] ) \
: T_COLOR ( TScreenOf ( xw ) , TEXT_BG ) )
2006-11-26 04:11:12 -07:00
# if OPT_COLOR_RES
2010-03-25 16:03:51 -06:00
# define GET_COLOR_RES(xw, res) xtermGetColorRes(xw, &(res))
2006-11-26 04:11:12 -07:00
# define SET_COLOR_RES(res,color) (res)->value = color
2007-06-15 13:34:50 -06:00
# define EQL_COLOR_RES(res,color) (res)->value == color
2006-11-26 04:11:12 -07:00
# define T_COLOR(v,n) (v)->Tcolors[n].value
2010-03-25 16:03:51 -06:00
extern Pixel xtermGetColorRes ( XtermWidget /* xw */ , ColorRes * /* res */ ) ;
2006-11-26 04:11:12 -07:00
# else
2010-03-25 16:03:51 -06:00
# define GET_COLOR_RES(xw, res) res
2006-11-26 04:11:12 -07:00
# define SET_COLOR_RES(res,color) *res = color
2007-06-15 13:34:50 -06:00
# define EQL_COLOR_RES(res,color) *res == color
2006-11-26 04:11:12 -07:00
# define T_COLOR(v,n) (v)->Tcolors[n]
# endif
2009-09-05 09:58:09 -06:00
# define ExtractForeground(color) (unsigned) GetCellColorFG(color)
# define ExtractBackground(color) (unsigned) GetCellColorBG(color)
2006-11-26 04:11:12 -07:00
2010-03-25 16:03:51 -06:00
# define MapToColorMode(fg, screen, flags) \
( ( ( screen ) - > colorBLMode & & ( ( flags ) & BLINK ) ) \
? COLOR_BL \
2011-03-07 13:41:27 -07:00
: ( ( ( screen ) - > colorBDMode & & ( ( flags ) & BOLD ) ) \
? COLOR_BD \
: ( ( ( screen ) - > colorULMode & & ( ( flags ) & UNDERLINE ) ) \
? COLOR_UL \
2010-03-25 16:03:51 -06:00
: fg ) ) )
2006-11-26 04:11:12 -07:00
# define checkVeryBoldAttr(flags, fg, code, attr) \
if ( ( flags & FG_COLOR ) ! = 0 \
& & ( screen - > veryBoldColors & attr ) = = 0 \
& & ( flags & attr ) ! = 0 \
& & ( fg = = code ) ) \
2010-05-08 06:20:46 -06:00
UIntClr ( flags , attr )
2006-11-26 04:11:12 -07:00
# define checkVeryBoldColors(flags, fg) \
checkVeryBoldAttr ( flags , fg , COLOR_RV , INVERSE ) ; \
checkVeryBoldAttr ( flags , fg , COLOR_UL , UNDERLINE ) ; \
checkVeryBoldAttr ( flags , fg , COLOR_BD , BOLD ) ; \
checkVeryBoldAttr ( flags , fg , COLOR_BL , BLINK )
# else /* !OPT_ISO_COLORS */
2010-03-25 16:03:51 -06:00
# define MapToColorMode(fg, screen, flags) fg
2012-06-07 14:20:23 -06:00
# define ClearCurBackground(xw, top, left, height, width, fw) \
XClearArea ( TScreenOf ( xw ) - > display , \
2013-01-04 09:40:18 -07:00
VDrawable ( TScreenOf ( xw ) ) , \
2012-06-07 14:20:23 -06:00
CursorX2 ( TScreenOf ( xw ) , left , fw ) , \
CursorY ( TScreenOf ( xw ) , top ) , \
width * fw , \
height * FontHeight ( TScreenOf ( xw ) ) , \
False )
2006-11-26 04:11:12 -07:00
# define extract_fg(xw, color, flags) (xw)->cur_foreground
# define extract_bg(xw, color, flags) (xw)->cur_background
/* FIXME: Reverse-Video? */
# define T_COLOR(v,n) (v)->Tcolors[n]
2010-03-25 16:03:51 -06:00
# define getXtermBackground(xw, flags, color) T_COLOR(TScreenOf(xw), TEXT_BG)
# define getXtermForeground(xw, flags, color) T_COLOR(TScreenOf(xw), TEXT_FG)
2006-11-26 04:11:12 -07:00
# define makeColorPair(fg, bg) 0
# define xtermColorPair(xw) 0
# define checkVeryBoldColors(flags, fg) /* nothing */
# endif /* OPT_ISO_COLORS */
2012-06-07 14:20:23 -06:00
# if OPT_ZICONBEEP
extern void initZIconBeep ( void ) ;
extern void resetZIconBeep ( XtermWidget /* xw */ ) ;
extern Boolean showZIconBeep ( XtermWidget /* xw */ , char * /* name */ ) ;
# else
# define initZIconBeep() /* nothing */
# define showZIconBeep(xw, name) False
# endif
2006-11-26 04:11:12 -07:00
# define XTERM_CELL(row,col) getXtermCell(screen, ROW2INX(screen, row), col)
extern unsigned getXtermCell ( TScreen * /* screen */ , int /* row */ , int /* col */ ) ;
2012-06-07 14:20:23 -06:00
extern unsigned getXtermCombining ( TScreen * /* screen */ , int /* row */ , int /* col */ , int /* off */ ) ;
2006-11-26 04:11:12 -07:00
extern void putXtermCell ( TScreen * /* screen */ , int /* row */ , int /* col */ , int /* ch */ ) ;
2012-06-07 14:20:23 -06:00
# define IsCellCombined(screen, row, col) (getXtermCombining(screen, row, col, 0) != 0)
2007-06-15 13:34:50 -06:00
# if OPT_HIGHLIGHT_COLOR
# define isNotForeground(xw, fg, bg, sel) \
2010-03-25 16:03:51 -06:00
( Boolean ) ( ( sel ) ! = T_COLOR ( TScreenOf ( xw ) , TEXT_FG ) \
2009-01-06 13:10:20 -07:00
& & ( sel ) ! = ( fg ) \
& & ( sel ) ! = ( bg ) \
& & ( sel ) ! = ( xw ) - > dft_foreground )
2007-06-15 13:34:50 -06:00
# define isNotBackground(xw, fg, bg, sel) \
2010-03-25 16:03:51 -06:00
( Boolean ) ( ( sel ) ! = T_COLOR ( TScreenOf ( xw ) , TEXT_BG ) \
2009-01-06 13:10:20 -07:00
& & ( sel ) ! = ( fg ) \
& & ( sel ) ! = ( bg ) \
& & ( sel ) ! = ( xw ) - > dft_background )
2007-06-15 13:34:50 -06:00
# endif
2006-11-26 04:11:12 -07:00
# if OPT_WIDE_CHARS
2008-02-16 02:40:00 -07:00
extern Boolean isWideControl ( unsigned /* ch */ ) ;
2007-08-25 12:58:42 -06:00
extern int DamagedCells ( TScreen * /* screen */ , unsigned /* n */ , int * /* klp */ , int * /* krp */ , int /* row */ , int /* col */ ) ;
extern int DamagedCurCells ( TScreen * /* screen */ , unsigned /* n */ , int * /* klp */ , int * /* krp */ ) ;
2007-06-15 13:34:50 -06:00
extern unsigned AsciiEquivs ( unsigned /* ch */ ) ;
2006-11-26 04:11:12 -07:00
extern void addXtermCombining ( TScreen * /* screen */ , int /* row */ , int /* col */ , unsigned /* ch */ ) ;
2009-09-05 09:58:09 -06:00
extern void allocXtermChars ( ScrnPtr * /* buffer */ , Cardinal /* length */ ) ;
2006-11-26 04:11:12 -07:00
# endif
# if OPT_XMC_GLITCH
extern void Mark_XMC ( XtermWidget /* xw */ , int /* param */ ) ;
extern void Jump_XMC ( XtermWidget /* xw */ ) ;
extern void Resolve_XMC ( XtermWidget /* xw */ ) ;
# endif
# if OPT_WIDE_CHARS
2009-03-09 16:13:04 -06:00
unsigned visual_width ( IChar * /* str */ , Cardinal /* len */ ) ;
2006-11-26 04:11:12 -07:00
# else
# define visual_width(a, b) (b)
# endif
2008-02-16 02:40:00 -07:00
# define BtoS(b) (((b) == Maybe) ? "maybe" : ((b) ? "on" : "off"))
2006-11-26 04:11:12 -07:00
# define NonNull(s) ((s) ? (s) : "<null>")
2010-05-08 06:20:46 -06:00
# define UIntSet(dst,bits) dst = dst | (unsigned) (bits)
# define UIntClr(dst,bits) dst = dst & (unsigned) ~(bits)
2006-11-26 04:11:12 -07:00
# ifdef __cplusplus
}
# endif
2011-03-07 13:41:27 -07:00
/* *INDENT-ON* */
2006-11-26 04:11:12 -07:00
2011-03-07 13:41:27 -07:00
# endif /* included_xterm_h */