36 |
|
|
37 |
|
extern char *calloc(), *malloc(); |
38 |
|
|
39 |
+ |
static togglecurs(); |
40 |
|
|
41 |
+ |
|
42 |
|
TEXTWIND * |
43 |
< |
xt_open(dpy, gc, parent, x, y, width, height, bw, fontname) |
44 |
< |
Display *dpy; |
45 |
< |
GC gc; |
46 |
< |
Window parent; |
47 |
< |
int x, y; |
48 |
< |
int width, height; |
49 |
< |
int bw; |
50 |
< |
char *fontname; |
43 |
> |
xt_open(dpy, parent, x, y, width, height, bw, fore, back, fontname) |
44 |
> |
Display *dpy; |
45 |
> |
Window parent; |
46 |
> |
int x, y; |
47 |
> |
int width, height; |
48 |
> |
int bw; |
49 |
> |
unsigned long fore, back; |
50 |
> |
char *fontname; |
51 |
|
{ |
52 |
|
register int i; |
53 |
|
register TEXTWIND *t; |
56 |
|
return(NULL); |
57 |
|
|
58 |
|
t->dpy = dpy; |
59 |
< |
t->w = XCreateSimpleWindow(dpy, parent, x, y, width, height, bw, |
60 |
< |
BlackPixel(dpy,DefaultScreen(dpy)), |
59 |
< |
WhitePixel(dpy,DefaultScreen(dpy))); |
60 |
< |
/* |
61 |
< |
t->w = XCreateWindow(dpy, parent, x, y, width, height, bw, 0, |
62 |
< |
CopyFromParent, CopyFromParent, 0, 0); |
63 |
< |
*/ |
64 |
< |
|
59 |
> |
t->w = XCreateSimpleWindow(dpy, parent, x, y, width, height, |
60 |
> |
bw, fore, back); |
61 |
|
if (t->w == 0) |
62 |
|
return(NULL); |
63 |
|
XMapWindow(dpy, t->w); |
67 |
|
|
68 |
|
/* if (!t->f.fixedwidth) check for fixedwidth later |
69 |
|
return(NULL); */ |
74 |
– |
t->gc = XCreateGC(dpy,t->w,0,NULL); |
70 |
|
|
71 |
< |
XCopyGC(dpy, gc, ~0L, t->gc); |
72 |
< |
|
71 |
> |
t->gc = XCreateGC(dpy,t->w,0,NULL); |
72 |
> |
XSetState(dpy, t->gc, fore, back, GXcopy, AllPlanes); |
73 |
|
XSetFont(dpy, t->gc, t->f->fid); |
79 |
– |
XSetFunction(dpy, t->gc, GXcopy); |
74 |
|
|
75 |
|
t->nc = (width - LEFTMAR) / |
76 |
|
Width(t->f); /* number of columns */ |