/[gcl]/gcl/o/littleXwin.c
ViewVC logotype

Diff of /gcl/o/littleXwin.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by wfs, Mon Dec 6 22:44:11 1999 UTC revision 1.2 by camm, Sat Jul 20 07:10:55 2002 UTC
# Line 28  XGCValues the_solid_GC_values, Line 28  XGCValues the_solid_GC_values,
28  Colormap cmap;  Colormap cmap;
29  XFontStruct *the_fontstruct;       /* the font info to be used */  XFontStruct *the_fontstruct;       /* the font info to be used */
30    
31  Window open_window()  Window open_window(void)
32  {  {
33    Window the_window;              /* the window that will be opened */    Window the_window;              /* the window that will be opened */
34    int i, stop;    int i, stop;
# Line 98  Window open_window() Line 98  Window open_window()
98    return(the_window);    return(the_window);
99  }  }
100    
101  int close_window(the_window)  int close_window(Window the_window)
   Window the_window;  
102  {  {
103    XDestroyWindow(the_display, the_window);    XDestroyWindow(the_display, the_window);
104    XFlush(the_display);    XFlush(the_display);
105    return(1);    return(1);
106  }  }
107    
108  int draw_line(the_window, x1, y1, x2, y2)  int draw_line(Window the_window, int x1, int y1, int x2, int y2)
   Window the_window;  
   int x1, y1, x2, y2;  
109  {  {
110    XDrawLine(the_display, the_window, the_solid_GC, x1, y1, x2, y2);    XDrawLine(the_display, the_window, the_solid_GC, x1, y1, x2, y2);
111    XFlush(the_display);    XFlush(the_display);
112    return(1);    return(1);
113  }  }
114    
115  int draw_arc(the_window, x, y, width, height, angle1, angle2)  int draw_arc(Window the_window, int x, int y, int width, int height, int angle1, int angle2)
   Window the_window;  
   int x, y, width, height, angle1, angle2;  
116  {  {
117    XDrawArc(the_display, the_window, the_solid_GC,    XDrawArc(the_display, the_window, the_solid_GC,
118             x, y, width, height, angle1, angle2);             x, y, width, height, angle1, angle2);
# Line 125  int draw_arc(the_window, x, y, width, he Line 120  int draw_arc(the_window, x, y, width, he
120    return(1);    return(1);
121  }  }
122    
123  int fill_arc(the_window, x, y, width, height, angle1, angle2)  int fill_arc(Window the_window, int x, int y, int width, int height, int angle1, int angle2)
   Window the_window;  
   int x, y, width, height, angle1, angle2;  
124  {  {
125    XFillArc(the_display, the_window, the_solid_GC,    XFillArc(the_display, the_window, the_solid_GC,
126             x, y, width, height, angle1, angle2);             x, y, width, height, angle1, angle2);
# Line 135  int fill_arc(the_window, x, y, width, he Line 128  int fill_arc(the_window, x, y, width, he
128    return(1);    return(1);
129  }  }
130    
131  int clear_arc(the_window, x, y, width, height, angle1, angle2)  int clear_arc(Window the_window, int x, int y, int width, int height, int angle1, int angle2)
   Window the_window;  
   int x, y, width, height, angle1, angle2;  
132  {  {
133    XFillArc(the_display, the_window, the_clear_GC,    XFillArc(the_display, the_window, the_clear_GC,
134             x, y, width, height, angle1, angle2);             x, y, width, height, angle1, angle2);
# Line 145  int clear_arc(the_window, x, y, width, h Line 136  int clear_arc(the_window, x, y, width, h
136    return(1);    return(1);
137  }  }
138    
139  int set_arc_mode (pie_or_chord)  int set_arc_mode (int pie_or_chord)
140  {  {
141    if (pie_or_chord == 0) {    if (pie_or_chord == 0) {
142      XSetArcMode(the_display, the_solid_GC, ArcChord);      XSetArcMode(the_display, the_solid_GC, ArcChord);
# Line 158  int set_arc_mode (pie_or_chord) Line 149  int set_arc_mode (pie_or_chord)
149    return(1);    return(1);
150  }  }
151    
152  int erase_line(the_window, x1, y1, x2, y2)  int erase_line(Window the_window, int x1, int y1, int x2, int y2)
   Window the_window;  
   int x1, y1, x2, y2;  
153  {  {
154    XDrawLine(the_display, the_window, the_clear_GC, x1, y1, x2, y2);    XDrawLine(the_display, the_window, the_clear_GC, x1, y1, x2, y2);
155    XFlush(the_display);    XFlush(the_display);
156    return(1);    return(1);
157  }  }
158    
159  int draw_text(the_window, string, x, y)  int draw_text(Window the_window, char *string, int x, int y)
   Window the_window;  
   char *string;  
   int x, y;  
160  {  {
161    XDrawString(the_display, the_window, the_solid_GC, x, y,    XDrawString(the_display, the_window, the_solid_GC, x, y,
162                string, strlen(string));                string, strlen(string));
# Line 178  int draw_text(the_window, string, x, y) Line 164  int draw_text(the_window, string, x, y)
164    return(1);    return(1);
165  }  }
166    
167  int erase_text(the_window, string, x, y)  int erase_text(Window the_window, char *string, int x, int y)
   Window the_window;  
   char *string;  
   int x, y;  
168  {  {
169    XDrawString(the_display, the_window, the_clear_GC, x, y,    XDrawString(the_display, the_window, the_clear_GC, x, y,
170                string, strlen(string));                string, strlen(string));
# Line 189  int erase_text(the_window, string, x, y) Line 172  int erase_text(the_window, string, x, y)
172    return(1);    return(1);
173  }  }
174    
175  int clear_window(the_window)  int clear_window(Window the_window)
   Window the_window;  
176  {  {
177    XClearWindow(the_display, the_window);    XClearWindow(the_display, the_window);
178    XFlush(the_display);    XFlush(the_display);
179    return(1);    return(1);
180  }  }
181    
182  int resize_window(the_window, width, height)  int resize_window(Window the_window, int width, int height)
   Window the_window;  
   int width, height;  
183  {  {
184    XResizeWindow(the_display, the_window, width, height);    XResizeWindow(the_display, the_window, width, height);
185    XFlush(the_display);    XFlush(the_display);
186    return(1);    return(1);
187  }  }
188    
189  int raise_window(the_window)  int raise_window(Window the_window)
   Window the_window;  
190  {  {
191    XRaiseWindow(the_display, the_window);    XRaiseWindow(the_display, the_window);
192    XFlush(the_display);    XFlush(the_display);
193    return(1);    return(1);
194  }  }
195    
196  int use_font (font_name)  int use_font (char *font_name)
   char *font_name;  
197  {  {
198    if ((the_fontstruct = XLoadQueryFont(the_display, font_name)) == NULL)    if ((the_fontstruct = XLoadQueryFont(the_display, font_name)) == NULL)
199      return(-1);      return(-1);
# Line 229  int use_font (font_name) Line 207  int use_font (font_name)
207    
208    
209    
210  int set_background (the_window, color_string)  int set_background (Window the_window, char *color_string)
   Window the_window;  
   char *color_string;  
211  {  {
212    XColor color;    XColor color;
213    int result;    int result;
# Line 247  int set_background (the_window, color_st Line 223  int set_background (the_window, color_st
223    return(result);    return(result);
224  }  }
225    
226  int set_foreground (color_string)  int set_foreground (char *color_string)
   char *color_string;  
227  {  {
228    XColor color;    XColor color;
229    int result;    int result;

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26