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.3 1996/12/10 17:07:23 bostic Exp $ (Berkeley) $Date: 1996/12/10 17:07:23 $";
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 */
31 extern xvi_screen
*_vi_screen
;
36 #define COLOR_INVALID 0xff /* force color change */
39 * These are color indices. When vi passes color info, we can do 2..0x3f
40 * in the 8 bits I've allocated.
42 #define COLOR_STANDARD 0x00 /* standard video */
43 #define COLOR_INVERSE 0x01 /* reverse video */
45 /* These are flag bits, they override the above colors. */
46 #define COLOR_CARET 0x80 /* draw the caret */
47 #define COLOR_SELECT 0x40 /* draw the selection */
49 #define ToRowCol( scr, lin, r, c ) \
50 r = (lin) / scr->cols; \
51 c = ((lin) - r * (scr->cols)) % scr->cols;
52 #define Linear( scr, y, x ) \
53 ( (y) * scr->cols + (x) )
54 #define CharAt( scr, y, x ) \
55 ( scr->characters + Linear( scr, y, x ) )
56 #define FlagAt( scr, y, x ) \
57 ( scr->flags + Linear( scr, y, x ) )
59 #define XPOS( scr, x ) \
61 #define YTOP( scr, y ) \
63 #define YPOS( scr, y ) \
64 YTOP( scr, ((y)+1) ) - scr->ch_descent
66 #define ROW( scr, y ) \
67 ( (y) / scr->ch_height )
69 #define COLUMN( scr, x ) \
70 ( (x) / scr->ch_width )
72 extern GC _vi_copy_gc
;
73 extern Widget top_level
;
77 extern Boolean
vi_pipe_input_func();
79 extern char *vi_progname
;