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.3 by greg, Mon Mar 8 12:37:44 1993 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 + extern char  *memset();
26 + #endif
27 +
28   #define checkcurs(t)            if ((t)->cursor) togglecurs(t)
29  
30   #define restorecurs             checkcurs
# Line 31 | Line 36 | static char SCCSid[] = "$SunId$ LBL";
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 49 | 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)),
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 <
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 66 | Line 67 | char *fontname;
67  
68          /* if (!t->f.fixedwidth)   check for fixedwidth later
69                  return(NULL); */
69        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);
74        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