| 38 |
|
|
| 39 |
|
|
| 40 |
|
TEXTWIND * |
| 41 |
< |
xt_open(dpy, gc, parent, x, y, width, height, bw, fontname) |
| 42 |
< |
Display *dpy; |
| 43 |
< |
GC gc; |
| 44 |
< |
Window parent; |
| 45 |
< |
int x, y; |
| 46 |
< |
int width, height; |
| 47 |
< |
int bw; |
| 48 |
< |
char *fontname; |
| 41 |
> |
xt_open(dpy, parent, x, y, width, height, bw, fore, back, fontname) |
| 42 |
> |
Display *dpy; |
| 43 |
> |
Window parent; |
| 44 |
> |
int x, y; |
| 45 |
> |
int width, height; |
| 46 |
> |
int bw; |
| 47 |
> |
unsigned long fore, back; |
| 48 |
> |
char *fontname; |
| 49 |
|
{ |
| 50 |
|
register int i; |
| 51 |
|
register TEXTWIND *t; |
| 54 |
|
return(NULL); |
| 55 |
|
|
| 56 |
|
t->dpy = dpy; |
| 57 |
< |
t->w = XCreateSimpleWindow(dpy, parent, x, y, width, height, bw, |
| 58 |
< |
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 |
< |
|
| 57 |
> |
t->w = XCreateSimpleWindow(dpy, parent, x, y, width, height, |
| 58 |
> |
bw, fore, back); |
| 59 |
|
if (t->w == 0) |
| 60 |
|
return(NULL); |
| 61 |
|
XMapWindow(dpy, t->w); |
| 65 |
|
|
| 66 |
|
/* if (!t->f.fixedwidth) check for fixedwidth later |
| 67 |
|
return(NULL); */ |
| 74 |
– |
t->gc = XCreateGC(dpy,t->w,0,NULL); |
| 68 |
|
|
| 69 |
< |
XCopyGC(dpy, gc, ~0L, t->gc); |
| 70 |
< |
|
| 69 |
> |
t->gc = XCreateGC(dpy,t->w,0,NULL); |
| 70 |
> |
XSetState(dpy, t->gc, fore, back, GXcopy, AllPlanes); |
| 71 |
|
XSetFont(dpy, t->gc, t->f->fid); |
| 79 |
– |
XSetFunction(dpy, t->gc, GXcopy); |
| 72 |
|
|
| 73 |
|
t->nc = (width - LEFTMAR) / |
| 74 |
|
Width(t->f); /* number of columns */ |