aboutsummaryrefslogtreecommitdiffstats
path: root/src/XTests.c
diff options
context:
space:
mode:
authorJim Blandy1992-01-13 21:48:03 +0000
committerJim Blandy1992-01-13 21:48:03 +0000
commitd427b66a664c0e1ffc818dfa5b87b45b4857d2ae (patch)
treea3255be5cf521ab9c44b9fdfd06a0466274be421 /src/XTests.c
parentb2c9579f172da05112f29b664de6d8da98c1e813 (diff)
downloademacs-d427b66a664c0e1ffc818dfa5b87b45b4857d2ae.tar.gz
emacs-d427b66a664c0e1ffc818dfa5b87b45b4857d2ae.zip
entered into RCS
Diffstat (limited to 'src/XTests.c')
-rw-r--r--src/XTests.c48
1 files changed, 19 insertions, 29 deletions
diff --git a/src/XTests.c b/src/XTests.c
index 9c1d3666bdb..4147ecd35d6 100644
--- a/src/XTests.c
+++ b/src/XTests.c
@@ -67,8 +67,8 @@ main (argc,argv)
67 int depth; 67 int depth;
68 Pixmap pix; 68 Pixmap pix;
69 char *string = "Kill the head and the body will die."; 69 char *string = "Kill the head and the body will die.";
70 char dash_list[] = {6, 4, 6, 4}; 70 char dash_list[] = {4, 4};
71 int dashes = 4; 71 int dashes = 2;
72 72
73 if (argc < 2) 73 if (argc < 2)
74 dpy_string = "localhost:0.0"; 74 dpy_string = "localhost:0.0";
@@ -105,24 +105,19 @@ main (argc,argv)
105 &gc_values); 105 &gc_values);
106 106
107 gc_values.foreground = obtain_color ("red"); 107 gc_values.foreground = obtain_color ("red");
108 gc_values.function = GXor;
109 gc_values.line_width = 3; 108 gc_values.line_width = 3;
110 gc_values.line_style = LineOnOffDash; 109 gc_values.line_style = LineOnOffDash;
111 gc_values.cap_style = CapRound; 110 gc_values.cap_style = CapRound;
112 gc_values.join_style = JoinRound; 111 gc_values.join_style = JoinRound;
113 line_xor_gc = XCreateGC (dpy, window, 112 line_xor_gc = XCreateGC (dpy, window,
114 GCForeground | GCBackground | GCLineStyle 113 GCForeground | GCBackground | GCLineStyle
115 | GCJoinStyle | GCCapStyle | GCLineWidth 114 | GCJoinStyle | GCCapStyle | GCLineWidth,
116 | GCFunction,
117 &gc_values); 115 &gc_values);
118 XSetDashes (dpy, line_xor_gc, 0, dash_list, dashes); 116 XSetDashes (dpy, line_xor_gc, 0, dash_list, dashes);
119 117
120 gc_values.background = WhitePixel (dpy, DefaultScreen (dpy));
121 gc_values.foreground = obtain_color ("blue");
122 line_xor_inv_gc = XCreateGC (dpy, window, 118 line_xor_inv_gc = XCreateGC (dpy, window,
123 GCForeground | GCBackground 119 GCForeground | GCBackground | GCLineWidth,
124 | GCLineWidth | GCFunction, 120 &gc_values);
125 &gc_values);
126 121
127 depth = DefaultDepthOfScreen (ScreenOfDisplay (dpy, DefaultScreen (dpy))); 122 depth = DefaultDepthOfScreen (ScreenOfDisplay (dpy, DefaultScreen (dpy)));
128 pix = XCreateBitmapFromData (dpy, window, page_glyf_bits, 123 pix = XCreateBitmapFromData (dpy, window, page_glyf_bits,
@@ -137,25 +132,20 @@ main (argc,argv)
137 switch (event.type) 132 switch (event.type)
138 { 133 {
139 case ButtonPress: 134 case ButtonPress:
140#if 0 135 switch (event.xbutton.button)
141 if (event.xbutton.state && ShiftMask) 136 {
142#endif 137 case Button1:
143 switch (event.xbutton.button) 138 XDrawLine (dpy, window, line_xor_gc, 25, 75, 300, 75);
144 { 139 break;
145 case Button1: 140
146 XDrawLine (dpy, window, line_xor_gc, 25, 75, 125, 75); 141 case Button2:
147 XFlush (dpy); 142 XDrawLine (dpy, window, line_xor_inv_gc, 25, 25, 300, 25);
148 XDrawLine (dpy, window, line_xor_gc, 25, 75, 125, 75); 143 break;
149 break; 144
150 145 case Button3:
151 case Button2: 146 XDrawLine (dpy, window, line_xor_gc, 25, 25, 25, 125);
152 XDrawLine (dpy, window, line_xor_gc, 25, 75, 125, 75); 147 break;
153 break; 148 }
154
155 case Button3:
156 XDrawLine (dpy, window, line_xor_gc, 25, 75, 125, 75);
157 break;
158 }
159 break; 149 break;
160 150
161 case KeyPress: 151 case KeyPress: