5 * Rob Zimmermann. All rights reserved.
7 * Keith Bostic. All rights reserved.
9 * See the LICENSE file for redistribution information.
11 * "Id: m_motif.h,v 8.11 1996/12/20 10:26:59 bostic Exp (Berkeley) Date: 1996/12/20 10:26:59";
17 #define COLOR_INVALID 0xff /* force color change */
20 * These are color indices. When vi passes color info, we can do 2..0x3f
21 * in the 8 bits I've allocated.
23 #define COLOR_STANDARD 0x00 /* standard video */
24 #define COLOR_INVERSE 0x01 /* reverse video */
26 /* These are flag bits, they override the above colors. */
27 #define COLOR_CARET 0x80 /* draw the caret */
28 #define COLOR_SELECT 0x40 /* draw the selection */
30 #define ToRowCol( scr, lin, r, c ) \
31 r = (lin) / scr->cols; \
32 c = ((lin) - r * (scr->cols)) % scr->cols;
33 #define Linear( scr, y, x ) \
34 ( (y) * scr->cols + (x) )
35 #define CharAt( scr, y, x ) \
36 ( scr->characters + Linear( scr, y, x ) )
37 #define FlagAt( scr, y, x ) \
38 ( scr->flags + Linear( scr, y, x ) )
40 #define XPOS( scr, x ) \
42 #define YTOP( scr, y ) \
44 #define YPOS( scr, y ) \
45 YTOP( scr, ((y)+1) ) - scr->ch_descent
47 #define ROW( scr, y ) \
48 ( (y) / scr->ch_height )
50 #define COLUMN( scr, x ) \
51 ( (x) / scr->ch_width )
53 /* Describes a single 'screen' implemented in X widgetry. */
55 Widget parent
, /* the pane */
56 area
, /* text goes here */
57 form
, /* holds text and scrollbar */
58 scroll
; /* not connected yet */
83 optKind kind
; /* Option type. */
84 String name
; /* Option name. */
85 void *value
; /* Current option value. */
86 u_int flags
; /* Associated flags. */
99 /* Utilities for converting X resources...
101 * __XutConvertResources( Widget, String root, XutResource *, int count )
102 * The resource block is loaded with converted values
103 * If the X resource does not exist, no change is made to the value
104 * 'root' should be the application name.
110 XutRKpixelBackup
, /* if XutRKpixel fails */
117 XutResourceKind kind
;
122 extern GC __vi_copy_gc
;
123 extern void (*__vi_exitp
) __P((void));
124 extern xvi_screen
*__vi_screen
;