/* vt.h - Zed's Virtual Terminal * Copyright (C) 1998 Michael Zucchi * * Virtual terminal emulation definitions and structures * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public License * as published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _ZVT_VT_H_ #define _ZVT_VT_H_ #include #include "lists.h" /* for utf-8 input support */ #define ZVT_UTF 1 #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* defines for screen update routine */ #define UPDATE_CHANGES 0x00 /* only update changed areas */ #define UPDATE_REFRESH 0x01 /* just refersh all */ #define UPDATE_SCROLLBACK 0x02 /* if in scrollback mode, make sure everything is redrawn */ /* 32 bit unsigned int */ typedef unsigned int uint32; /* defines for VT argument processing, also used for textual arguments */ #define VTPARAM_MAXARGS 5 /* maximum number of arguments */ #define VTPARAM_ARGMAX 20 /* number of characters in each arg maximum */ #define VTPARAM_INTARGS 20 /* maximum args for integers, should be less than MAXARGS*ARGMAX bytes! */ struct vt_line { struct vt_line *next; /* next 'vt' line */ struct vt_line *prev; /* prev 'vt' line */ int line; /* the line number for this line */ int width; /* width of this line */ int modcount; /* how many modifications since last update */ uint32 data[1]; /* the line data follows this structure */ }; /* macro for computing the size of vt_line structures */ #define VT_LINE_SIZE(width) (sizeof(struct vt_line) + (sizeof(uint32) * (width))) /* type of title to set with callback */ typedef enum { VTTITLE_WINDOWICON=0, VTTITLE_ICON, VTTITLE_WINDOW } VTTITLE_TYPE; /* note: bit 0x80000000 is free for another attribute */ #define VTATTR_BOLD 0x40000000 #define VTATTR_UNDERLINE 0x20000000 #define VTATTR_BLINK 0x10000000 #define VTATTR_REVERSE 0x08000000 #define VTATTR_CONCEALED 0x04000000 /* all attributes mask, and no-attributes mask */ #define VTATTR_MASK 0xffff0000 #define VTATTR_DATAMASK (~VTATTR_MASK) #define VTATTR_CLEARMASK (~(VTATTR_BOLD|VTATTR_UNDERLINE|VTATTR_BLINK|VTATTR_REVERSE)) /* bitmasks for colour map information */ #define VTATTR_FORECOLOURM 0x03e00000 #define VTATTR_BACKCOLOURM 0x001f0000 #define VTATTR_FORECOLOURB 21 #define VTATTR_BACKCOLOURB 16 /* 'clear' character and attributes of default clear character */ #define VTATTR_CLEAR (16<