3 * Rob Zimmermann. All rights reserved.
5 * Keith Bostic. All rights reserved.
7 * See the LICENSE file for redistribution information.
9 * "$Id: m_motif.h,v 8.7 1996/12/13 11:38:21 bostic Exp $ (Berkeley) $Date: 1996/12/13 11:38:21 $";
12 /* Describes a single 'screen' implemented in X widgetry. */
14 Widget parent
, /* the pane */
15 area
, /* text goes here */
16 form
, /* holds text and scrollbar */
17 scroll
; /* not connected yet */
34 #define COLOR_INVALID 0xff /* force color change */
37 * These are color indices. When vi passes color info, we can do 2..0x3f
38 * in the 8 bits I've allocated.
40 #define COLOR_STANDARD 0x00 /* standard video */
41 #define COLOR_INVERSE 0x01 /* reverse video */
43 /* These are flag bits, they override the above colors. */
44 #define COLOR_CARET 0x80 /* draw the caret */
45 #define COLOR_SELECT 0x40 /* draw the selection */
47 #define ToRowCol( scr, lin, r, c ) \
48 r = (lin) / scr->cols; \
49 c = ((lin) - r * (scr->cols)) % scr->cols;
50 #define Linear( scr, y, x ) \
51 ( (y) * scr->cols + (x) )
52 #define CharAt( scr, y, x ) \
53 ( scr->characters + Linear( scr, y, x ) )
54 #define FlagAt( scr, y, x ) \
55 ( scr->flags + Linear( scr, y, x ) )
57 #define XPOS( scr, x ) \
59 #define YTOP( scr, y ) \
61 #define YPOS( scr, y ) \
62 YTOP( scr, ((y)+1) ) - scr->ch_descent
64 #define ROW( scr, y ) \
65 ( (y) / scr->ch_height )
67 #define COLUMN( scr, x ) \
68 ( (x) / scr->ch_width )
71 extern GC __vi_copy_gc
;
72 extern void (*__vi_exitp
) __P((void));
73 extern xvi_screen
*__vi_screen
;