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