ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/x11twind.c
(Generate patch)

Comparing ray/src/rt/x11twind.c (file contents):
Revision 1.2 by greg, Fri Jan 19 00:00:35 1990 UTC vs.
Revision 2.3 by greg, Mon Mar 8 12:37:44 1993 UTC

# Line 36 | Line 36 | extern char  *memset();
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;
# Line 54 | Line 56 | char *fontname;
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);
# Line 71 | Line 67 | char *fontname;
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 */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines