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.1 by greg, Tue Dec 19 12:54:31 1989 UTC vs.
Revision 2.4 by gwlarson, Wed Jun 17 13:34:10 1998 UTC

# Line 20 | Line 20 | static char SCCSid[] = "$SunId$ LBL";
20  
21   #include  "x11twind.h"
22  
23 + #ifndef  BSD
24 + #define  bzero(d,n)             (void)memset(d,0,n)
25 + #endif
26 +
27   #define checkcurs(t)            if ((t)->cursor) togglecurs(t)
28  
29   #define restorecurs             checkcurs
# Line 31 | Line 35 | static char SCCSid[] = "$SunId$ LBL";
35  
36   extern  char  *calloc(), *malloc();
37  
38 + static  togglecurs();
39  
40 +
41   TEXTWIND *
42 < xt_open(dpy, gc, parent, x, y, width, height, bw, fontname)
43 < Display *dpy;
44 < GC gc;
45 < Window parent;
46 < int x, y;
47 < int width, height;
48 < int bw;
49 < char *fontname;
42 > xt_open(dpy, parent, x, y, width, height, bw, fore, back, fontname)
43 > Display  *dpy;
44 > Window  parent;
45 > int  x, y;
46 > int  width, height;
47 > int  bw;
48 > unsigned long  fore, back;
49 > char  *fontname;
50   {
51          register int  i;
52          register TEXTWIND  *t;
# Line 49 | Line 55 | char *fontname;
55                  return(NULL);
56  
57          t->dpy = dpy;
58 <        t->w = XCreateSimpleWindow(dpy, parent, x, y, width, height, bw,
59 <                                        BlackPixel(dpy,DefaultScreen(dpy)),
54 <                                        WhitePixel(dpy,DefaultScreen(dpy)));
55 <        /*
56 <        t->w = XCreateWindow(dpy, parent, x, y, width, height, bw, 0,
57 <                                CopyFromParent, CopyFromParent, 0, 0);
58 <        */
59 <
58 >        t->w = XCreateSimpleWindow(dpy, parent, x, y, width, height,
59 >                                        bw, fore, back);
60          if (t->w == 0)
61                  return(NULL);
62          XMapWindow(dpy, t->w);
# Line 66 | Line 66 | char *fontname;
66  
67          /* if (!t->f.fixedwidth)   check for fixedwidth later
68                  return(NULL); */
69        t->gc = XCreateGC(dpy,t->w,0,NULL);
69  
70 <        XCopyGC(dpy, gc, ~0L, t->gc);
71 <
70 >        t->gc = XCreateGC(dpy,t->w,0,NULL);
71 >        XSetState(dpy, t->gc, fore, back, GXcopy, AllPlanes);
72          XSetFont(dpy, t->gc, t->f->fid);
74        XSetFunction(dpy, t->gc, GXcopy);
73  
74          t->nc = (width - LEFTMAR) /
75                  Width(t->f);            /* number of columns */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines