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.11 1996/12/20 10:26:59 bostic Exp $ (Berkeley) $Date: 1996/12/20 10:26:59 $";
15 #define COLOR_INVALID 0xff /* force color change */
18 * These are color indices. When vi passes color info, we can do 2..0x3f
19 * in the 8 bits I've allocated.
21 #define COLOR_STANDARD 0x00 /* standard video */
22 #define COLOR_INVERSE 0x01 /* reverse video */
24 /* These are flag bits, they override the above colors. */
25 #define COLOR_CARET 0x80 /* draw the caret */
26 #define COLOR_SELECT 0x40 /* draw the selection */
28 #define ToRowCol( scr, lin, r, c ) \
29 r = (lin) / scr->cols; \
30 c = ((lin) - r * (scr->cols)) % scr->cols;
31 #define Linear( scr, y, x ) \
32 ( (y) * scr->cols + (x) )
33 #define CharAt( scr, y, x ) \
34 ( scr->characters + Linear( scr, y, x ) )
35 #define FlagAt( scr, y, x ) \
36 ( scr->flags + Linear( scr, y, x ) )
38 #define XPOS( scr, x ) \
40 #define YTOP( scr, y ) \
42 #define YPOS( scr, y ) \
43 YTOP( scr, ((y)+1) ) - scr->ch_descent
45 #define ROW( scr, y ) \
46 ( (y) / scr->ch_height )
48 #define COLUMN( scr, x ) \
49 ( (x) / scr->ch_width )
51 /* Describes a single 'screen' implemented in X widgetry. */
53 Widget parent
, /* the pane */
54 area
, /* text goes here */
55 form
, /* holds text and scrollbar */
56 scroll
; /* not connected yet */
81 optKind kind
; /* Option type. */
82 String name
; /* Option name. */
83 void *value
; /* Current option value. */
84 u_int flags
; /* Associated flags. */
97 /* Utilities for converting X resources...
99 * __XutConvertResources( Widget, String root, XutResource *, int count )
100 * The resource block is loaded with converted values
101 * If the X resource does not exist, no change is made to the value
102 * 'root' should be the application name.
108 XutRKpixelBackup
, /* if XutRKpixel fails */
115 XutResourceKind kind
;
120 extern GC __vi_copy_gc
;
121 extern void (*__vi_exitp
) __P((void));
122 extern xvi_screen
*__vi_screen
;