Wild Life  2.30
 All Data Structures Files Functions Variables Typedefs Macros
xdisplaylist.c
Go to the documentation of this file.
1 
6 /* Copyright 1991 Digital Equipment Corporation.
7  ** All Rights Reserved.
8  ** Last modified on Thu Feb 17 16:32:31 MET 1994 by rmeyer
9  *****************************************************************/
10 #include "defs.h"
11 
12 
13 #ifdef X11
14 
15 
16 /*****************************************/
17 
18 typedef struct wl_Line
19 {
20  Action action;
22  int x0, y0, x1, y1;
23  long function;
24  long color;
25  long linewidth;
26 } Line;
27 
28 
29 typedef struct wl_Rectangle
30 {
31  Action action;
33  int x, y, width, height;
34  long function;
35  long color;
36  long linewidth;
37 } Rectangle;
38 
39 
40 typedef struct wl_Arc
41 {
42  Action action;
45  long function;
46  long color;
47  long linewidth;
48 } Arc;
49 
50 
51 typedef struct wl_String
52 {
53  Action action;
55  int x, y;
56  char *str;
57  long function;
58  long color;
59  long font;
60 } String;
61 
62 
63 typedef struct wl_GraphicClosure
64 {
65  Display *display;
66  Drawable drawable;
67  GC gc;
69 
70 typedef struct wl_PostScriptClosure
71 {
72  GENERIC display; // changed long to GENERIC 12/11/2016 DJD
73  Drawable window;
74  long f;
75  long height;
77 
78 typedef struct wl_Polygon
79 {
80  Action action;
82  XPoint *points;
83  long npoints;
84  long function;
85  long color;
86  long linewidth;
87 } Polygon;
88 
89 typedef union wl_DisplayElt
90 {
91  Action action;
97 } DisplayElt;
98 
100 
101 
102 /*****************************************/
103 
111 {
112  return &((Line *) elt)->links;
113 }
114 
121 {
122  ListHeader *display_list;
123 
124  display_list = (ListHeader *) malloc (sizeof (ListHeader));
126  return display_list;
127 }
128 
129 /*****************************************/
130 
142 void x_set_gc (Display *display, GC gc, long function, unsigned long color, long linewidth, Font font)
143 {
144  XGCValues gcvalues;
145  unsigned long valuemask;
146 
147 
148  gcvalues.function = function;
149  gcvalues.foreground = color;
150  valuemask = GCFunction | GCForeground;
151 
152  if (linewidth != xDefaultLineWidth)
153  {
154  gcvalues.line_width = linewidth;
155  valuemask |= GCLineWidth;
156  }
157 
158  if (font != xDefaultFont)
159  {
160  gcvalues.font = font;
161  valuemask |= GCFont;
162  }
163 
164  XChangeGC (display, gc, valuemask, &gcvalues);
165 }
166 
167 /*****************************************/
168 
169 #define AllocDisplayElt() malloc (sizeof (DisplayElt))
170 #define FreeDisplayElt(E) free (E)
171 
186 void x_record_line (ListHeader *displaylist, Action action, long x0, long y0, long x1, long y1, unsigned long function, unsigned long color, unsigned long linewidth)
187 {
188  Line * elt;
189 
190  elt = (Line *) AllocDisplayElt ();
191  elt->action = action;
192  elt->x0 = x0;
193  elt->y0 = y0;
194  elt->x1 = x1;
195  elt->y1 = y1;
196  elt->function = function;
197  elt->color = color;
198  elt->linewidth = linewidth;
199  List_Append (displaylist, (Ref) elt);
200 }
201 
202 
203 /*****************************************/
204 
221 void x_record_arc (ListHeader *displaylist, Action action, long x, long y, long width, long height, long startangle, long arcangle, unsigned long function, unsigned long color, unsigned long linewidth)
222 {
223  Arc * elt;
224 
225  elt = (Arc *) AllocDisplayElt ();
226  elt->action = action;
227  elt->x = x;
228  elt->y = y;
229  elt->width = width;
230  elt->height = height;
231  elt->startangle = startangle;
232  elt->arcangle = arcangle;
233  elt->function = function;
234  elt->color = color;
235  elt->linewidth = linewidth;
236  List_Append (displaylist, (Ref) elt);
237 }
238 
239 /*****************************************/
240 
255 void x_record_rectangle (ListHeader *displaylist, Action action, long x, long y, long width, long height, unsigned long function, unsigned long color, unsigned long linewidth)
256 {
257  Rectangle * elt;
258 
259  elt = (Rectangle *) AllocDisplayElt ();
260  elt->action = action;
261  elt->x = x;
262  elt->y = y;
263  elt->width = width;
264  elt->height = height;
265  elt->function = function;
266  elt->color = color;
267  elt->linewidth = linewidth;
268  List_Append (displaylist, (Ref) elt);
269 }
270 
271 /*****************************************/
272 
285 void x_record_polygon (ListHeader *displaylist, Action action, XPoint *points, long npoints, unsigned long function, unsigned long color, unsigned long linewidth)
286 {
287  Polygon * elt;
288  XPoint *p;
289 
290 
291  elt = (Polygon *) AllocDisplayElt ();
292  elt->action = action;
293  elt->npoints = npoints;
294  elt->points = p = (XPoint *) malloc (npoints*2*sizeof(short));
295  for (; npoints > 0; npoints--, p++, points++)
296  *p = *points;
297  elt->function = function;
298  elt->color = color;
299  elt->linewidth = linewidth;
300  List_Append (displaylist, (Ref) elt);
301 }
302 
303 /*****************************************/
304 
318 void x_record_string (ListHeader *displaylist, Action action, long x, long y, char *str, Font font, unsigned long function, unsigned long color)
319 { // font & str order was reversed DJD
320  String * elt;
321 
322  elt = (String *) AllocDisplayElt ();
323  elt->action = action;
324  elt->x = x;
325  elt->y = y;
326  elt->str = (char *) malloc (strlen (str)+1); /* 11.9 */
327  strcpy (elt->str, str);
328  *(elt->str+strlen(str)) = '\0';
329  elt->function = function;
330  elt->color = color;
331  elt->font = font;
332  List_Append (displaylist, (Ref) elt);
333 }
334 
335 /*****************************************/
336 
344 static long x_draw_elt (DisplayElt *elt, GraphicClosure *g)
345 {
346  Line *line;
347  Arc *arc;
348  Rectangle *rectangle;
349  String *s;
350  Polygon *polygon;
351 
352 
353  switch (elt->action)
354  {
355  case DRAW_LINE:
356  line = (Line *) elt;
357  x_set_gc (g->display, g->gc, line->function,
358  line->color, line->linewidth, xDefaultFont);
359  XDrawLine (g->display, g->drawable, g->gc,
360  line->x0, line->y0, line->x1, line->y1);
361  break;
362 
363  case DRAW_ARC:
364  case FILL_ARC:
365  arc = (Arc *) elt;
366  x_set_gc (g->display, g->gc, arc->function,
367  arc->color, arc->linewidth, xDefaultFont);
368  if (arc->action == DRAW_ARC)
369  XDrawArc (g->display, g->drawable, g->gc,
370  arc->x, arc->y,
371  arc->width, arc->height,
372  arc->startangle, arc->arcangle);
373  else
374  XFillArc (g->display, g->drawable, g->gc,
375  arc->x, arc->y,
376  arc->width, arc->height,
377  arc->startangle, arc->arcangle);
378  break;
379 
380  case DRAW_RECTANGLE:
381  case FILL_RECTANGLE:
382  rectangle = (Rectangle *) elt;
383  x_set_gc (g->display, g->gc, rectangle->function,
384  rectangle->color, rectangle->linewidth, xDefaultFont);
385  if (rectangle->action == DRAW_RECTANGLE)
386  XDrawRectangle (g->display, g->drawable, g->gc,
387  rectangle->x, rectangle->y,
388  rectangle->width, rectangle->height);
389  else
390  XFillRectangle (g->display, g->drawable, g->gc,
391  rectangle->x, rectangle->y,
392  rectangle->width, rectangle->height);
393  break;
394 
395  case DRAW_STRING:
396  case DRAW_IMAGE_STRING:
397  s = (String *) elt;
398  x_set_gc (g->display, g->gc, s->function,
399  s->color, xDefaultLineWidth, s->font);
400  if (s->action == DRAW_STRING)
401  XDrawString (g->display, g->drawable, g->gc,
402  s->x, s->y,
403  s->str, strlen (s->str));
404  else
405  XDrawImageString (g->display, g->drawable, g->gc,
406  s->x, s->y,
407  s->str, strlen (s->str));
408  break;
409 
410  case DRAW_POLYGON:
411  case FILL_POLYGON:
412  polygon = (Polygon *) elt;
413  x_set_gc (g->display, g->gc, polygon->function,
414  polygon->color, polygon->linewidth, xDefaultFont);
415  if (polygon->action == FILL_POLYGON)
416  XFillPolygon (g->display, g->drawable, g->gc,
417  polygon->points, polygon->npoints,
418  Complex, CoordModeOrigin);
419  else
420  XDrawLines (g->display, g->drawable, g->gc,
421  polygon->points, polygon->npoints,
422  CoordModeOrigin);
423  break;
424 
425  }
426 
427  return TRUE;
428 }
429 
430 /*****************************************/
431 
432 /* note if we have not been able to create a pixmap for the window,
433  then the pixmap is the window itself, and the pixmapgc is the gc of the window.
434  - jch - Thu Aug 6 16:58:22 MET DST 1992
435 */
436 
447 void x_refresh_window (Display *display, Window window, Pixmap pixmap, GC pixmapgc, ListHeader *displaylist)
448 {
449  XWindowAttributes attr;
450  GraphicClosure g;
451 
452 
453  /* disable the GraphicsExpose emitted by XCopyArea */
454  XSetGraphicsExposures (display, pixmapgc, False);
455 
456  /* get the geometry of the window */
457  XGetWindowAttributes (display, window, &attr);
458 
459 #if 0
460  /* does not work with a pixmap, only with windows !! @#@^&%#(*&! - jch */
461  XClearArea (display, pixmap, 0, 0,
462  attr.width, attr.height, False);
463 #endif
464 
465  x_set_gc (display, pixmapgc, GXcopy, attr.backing_pixel,
467 
468  XFillRectangle (display, pixmap, pixmapgc,
469  0, 0, attr.width, attr.height);
470 
471  g.display = display;
472  g.drawable = pixmap;
473  g.gc = pixmapgc;
474 
475  List_Enum (displaylist,(RefListEnumProc) x_draw_elt, &g);
476 
477 
478  if (window != pixmap)
479  XCopyArea (display, pixmap, window, pixmapgc, 0, 0,
480  attr.width, attr.height, 0, 0);
481 
482  XSync (display, 0);
483 }
484 
485 /*****************************************/
486 
494 static long x_free_elt (DisplayElt *elt, long *closure)
495 {
496  Line *line;
497  Arc *arc;
498  Rectangle *rectangle;
499  String *s;
500  Polygon *polygon;
501 
502 
503  /* free the attributes of the element */
504  switch (elt->action)
505  {
506  case DRAW_LINE:
507  /* no attribute to free ? */
508  break;
509 
510  case DRAW_ARC:
511  case FILL_ARC:
512  /* no attribute to free ? */
513  break;
514 
515  case DRAW_RECTANGLE:
516  case FILL_RECTANGLE:
517  /* no attribute to free ? */
518  break;
519 
520  case DRAW_STRING:
521  case DRAW_IMAGE_STRING:
522  s = (String *) elt;
523  free (s->str);
524  break;
525 
526  case DRAW_POLYGON:
527  case FILL_POLYGON:
528  polygon = (Polygon *) elt;
529  free (polygon->points);
530  break;
531 
532  }
533 
534  /* finaly, free the element itself */
535  FreeDisplayElt (elt);
536 
537  return TRUE;
538 }
539 
540 /*****************************************/
541 
548 void x_free_display_list (ListHeader *displaylist)
549 {
550  List_Enum (displaylist,( RefListEnumProc)x_free_elt, NULL);
551 }
552 
553 /*****************************************/
554 
555 static char *prolog[] = {
556  "%!PS-Adobe-2.0\n",
557  "/mt {moveto} def /lt {lineto} def /slw {setlinewidth} def\n",
558  "/np {newpath} def /st {stroke} def /fi {fill} def /cp {closepath} def\n",
559  "1 setlinecap 1 setlinejoin\n",
560  "/line {/lw exch def /b exch def /g exch def /r exch def\n",
561  " /y1 exch def /x1 exch def \n",
562  " /y0 exch def /x0 exch def\n",
563  " r 65535 div g 65535 div b 65535 div setrgbcolor\n",
564  " np lw slw x0 y0 mt x1 y1 lt st} def\n",
565  "/rect {/sf exch def /lw exch def\n",
566  " /b exch def /g exch def /r exch def\n",
567  " /h exch def /w exch def \n",
568  " /y exch def /x exch def\n",
569  " r 65535 div g 65535 div b 65535 div setrgbcolor\n",
570  " np lw slw x y mt x w add y lt x w add y h sub lt\n",
571  " x y h sub lt cp sf {st} {fi} ifelse} def\n",
572  "/earcdict 100 dict def\n", /* see cookbook ex #3 */
573  "earcdict /mtrx matrix put\n",
574  "/earc {earcdict begin\n",
575  " /sf exch def /lw exch def\n",
576  " /b exch def /g exch def /r exch def\n",
577  " r 65535 div g 65535 div b 65535 div setrgbcolor\n",
578  " /ea exch def /sa exch def\n",
579  " /yr exch def /xr exch def /y exch def /x exch def\n",
580  " /savematrix mtrx currentmatrix def\n",
581  " np x y translate xr yr scale 0 0 1 sa ea arc\n",
582  " savematrix setmatrix lw slw sf {st} {fi} ifelse\n",
583  " end} def\n",
584  "/Helvetica findfont 18 scalefont setfont\n",
585  "/dstr {/sf exch def\n",
586  " /b exch def /g exch def /r exch def\n",
587  " /str exch def /y exch def /x exch def\n",
588  " r 65535 div g 65535 div b 65535 div setrgbcolor\n",
589  " x y mt str show} def\n",
590  0
591 };
592 
599 static void x_postscript_prolog (long f)
600 {
601  long i;
602  int ret; // added bacause of compiler warning - should be checked below
603 
604  for (i = 0; prolog[i] != 0; i++)
605  ret = write (f, prolog[i], strlen (prolog[i]));
606 }
607 
608 /*****************************************/
609 
610 #define BUF_SIZE 512
611 
612 static char nstr[BUF_SIZE];
613 
621 static char *add_number (char *buf, long n)
622 {
623  long m, i;
624  char *s;
625 
626  for (m=n, i=1; m>=10; i++)
627  m /= 10;
628 
629  if (i < BUF_SIZE && strlen (buf) + i < BUF_SIZE)
630  {
631  sprintf (nstr, "%ld ", n);
632  strcat (buf, nstr);
633  }
634 
635  return buf;
636 }
637 
645 static char *add_string (char *buf,char * s)
646 {
647  if (strlen (buf) + strlen(s) < BUF_SIZE)
648  strcat (buf, s);
649 
650  return buf;
651 }
652 
662 static void x_get_rgb_values (Display *display, Window window, unsigned long color, XColor *rgb)
663 {
664  XWindowAttributes windowAttributes;
665 
666  XGetWindowAttributes (display, window, &windowAttributes);
667  rgb->pixel = color;
668  XQueryColor (display, windowAttributes.colormap, rgb);
669 }
670 
679 {
680  Line *line;
681  Arc *arc;
682  Rectangle *rectangle;
683  String *s;
684  Polygon *polygon;
685  char buf[BUF_SIZE];
686  char *pbuf;
687  XPoint *p;
688  XColor color;
689  long i;
690  int ret; // added bacause of compiler warning - should be checked below
691 
692 
693  buf[0] = 0;
694  pbuf = buf;
695 
696  switch (elt->action)
697  {
698  case DRAW_LINE:
699  line = (Line *) elt;
700 
701  pbuf = add_number (pbuf, line->x0);
702  pbuf = add_number (pbuf, psc->height - line->y0);
703  pbuf = add_number (pbuf, line->x1);
704  pbuf = add_number (pbuf, psc->height - line->y1);
705  x_get_rgb_values ((Display *)psc->display, psc->window, line->color, &color); // added cast DJD
706  pbuf = add_number (pbuf, color.red);
707  pbuf = add_number (pbuf, color.green);
708  pbuf = add_number (pbuf, color.blue);
709  pbuf = add_number (pbuf, line->linewidth);
710  pbuf = add_string (pbuf, "line\n");
711  ret = write (psc->f, pbuf, strlen (pbuf));
712  break;
713 
714  case DRAW_RECTANGLE:
715  case FILL_RECTANGLE:
716  rectangle = (Rectangle *) elt;
717 
718  pbuf = add_number (pbuf, rectangle->x);
719  pbuf = add_number (pbuf, psc->height - rectangle->y);
720  pbuf = add_number (pbuf, rectangle->width);
721  pbuf = add_number (pbuf, rectangle->height);
722  x_get_rgb_values ((Display *) psc->display, psc->window, rectangle->color, &color); // added cast DJD
723  pbuf = add_number (pbuf, color.red);
724  pbuf = add_number (pbuf, color.green);
725  pbuf = add_number (pbuf, color.blue);
726 
727  if (rectangle->action == DRAW_RECTANGLE)
728  {
729  pbuf = add_number (pbuf, rectangle->linewidth);
730  pbuf = add_string (pbuf, "true ");
731  }
732  else
733  {
734  pbuf = add_number (pbuf, 1);
735  pbuf = add_string (pbuf, "false ");
736  }
737 
738  pbuf = add_string (pbuf, "rect\n");
739  ret = write (psc->f, pbuf, strlen (pbuf));
740  break;
741 
742  case DRAW_ARC:
743  case FILL_ARC:
744  arc = (Arc *) elt;
745  pbuf = add_number (pbuf, arc->x+arc->width/2);
746  pbuf = add_number (pbuf, psc->height - (arc->y+arc->height/2));
747  pbuf = add_number (pbuf, arc->width/2);
748  pbuf = add_number (pbuf, arc->height/2);
749  pbuf = add_number (pbuf, arc->startangle);
750  pbuf = add_number (pbuf, (arc->startangle+arc->arcangle)/64);
751  x_get_rgb_values ((Display *)psc->display, psc->window, arc->color, &color); // added cast DJD
752  pbuf = add_number (pbuf, color.red);
753  pbuf = add_number (pbuf, color.green);
754  pbuf = add_number (pbuf, color.blue);
755 
756  if (arc->action == DRAW_ARC)
757  {
758  pbuf = add_number (pbuf, arc->linewidth);
759  pbuf = add_string (pbuf, "true ");
760  }
761  else
762  {
763  pbuf = add_number (pbuf, 1);
764  pbuf = add_string (pbuf, "false ");
765  }
766 
767  pbuf = add_string (pbuf, "earc\n");
768  ret = write (psc->f, pbuf, strlen (pbuf));
769  break;
770 
771  case DRAW_STRING:
772  case DRAW_IMAGE_STRING:
773  s = (String *) elt;
774  pbuf = add_number (pbuf, s->x);
775  pbuf = add_number (pbuf, psc->height - s->y);
776  pbuf = add_string (pbuf, "(");
777  pbuf = add_string (pbuf, s->str);
778  pbuf = add_string (pbuf, ") ");
779  x_get_rgb_values ((Display *)psc->display, psc->window, s->color, &color); // added cast DJD
780  pbuf = add_number (pbuf, color.red);
781  pbuf = add_number (pbuf, color.green);
782  pbuf = add_number (pbuf, color.blue);
783 
784  if (s->action == DRAW_STRING)
785  pbuf = add_string (pbuf, "true ");
786  else
787  pbuf = add_string (pbuf, "false ");
788 
789  pbuf = add_string (pbuf, "dstr\n");
790  ret = write (psc->f, pbuf, strlen (pbuf));
791  break;
792 
793  case FILL_POLYGON:
794  polygon = (Polygon *) elt;
795 
796  x_get_rgb_values ((Display *)psc->display, psc->window, polygon->color, &color); // added cast DJD
797  pbuf = add_number (pbuf, color.red);
798  pbuf = add_string (pbuf, "65535 div ");
799  pbuf = add_number (pbuf, color.green);
800  pbuf = add_string (pbuf, "65535 div ");
801  pbuf = add_number (pbuf, color.blue);
802  pbuf = add_string (pbuf, "65535 div ");
803  pbuf = add_string (pbuf, "setrgbcolor ");
804 
805  p = polygon->points;
806  pbuf = add_string (pbuf, "np ");
807  pbuf = add_number (pbuf, p->x);
808  pbuf = add_number (pbuf, psc->height - p->y);
809  pbuf = add_string (pbuf, "mt\n");
810  ++p;
811  for (i=1; i<polygon->npoints; i++, p++)
812  {
813  pbuf = add_number (pbuf, p->x);
814  pbuf = add_number (pbuf, psc->height - p->y);
815  pbuf = add_string (pbuf, "lt ");
816  if (i%4==0)
817  pbuf = add_string (pbuf, "\n");
818  }
819 
820  pbuf = add_string (pbuf, "cp fi\n");
821  ret = write (psc->f, pbuf, strlen (pbuf));
822  break;
823  }
824 
825  return TRUE;
826 }
827 
828 /*****************************************/
829 
839 long x_postscript_window (Display *display, Window window, ListHeader *displaylist, char *filename)
840 {
841  XWindowAttributes windowAttributes;
842  PostScriptClosure psc;
843  int ret; // added bacause of compiler warning - should be checked below
844 
845 
846 
847  psc.display = (GENERIC)display;
848  psc.window = window;
849  if ((psc.f = open (filename, O_CREAT|O_WRONLY|O_TRUNC,
850  S_IRUSR|S_IWUSR|S_IRWXG)) == -1)
851  {
852  Errorline ("\n*** Error: cannot open file %s.\n", filename);
853  return FALSE;
854  }
855 
856  XGetWindowAttributes (display, window, &windowAttributes);
857  psc.height = windowAttributes.height;
858  x_postscript_prolog (psc.f);
859  List_Enum (displaylist,( RefListEnumProc)x_postscript_elt, &psc);
860  ret = write (psc.f, "showpage\n", strlen ("showpage\n"));
861  close (psc.f);
862 
863  return TRUE;
864 }
865 
866 /*****************************************/
867 
868 #endif
#define BUF_SIZE
Definition: xdisplaylist.c:610
#define xDefaultLineWidth
Definition: def_const.h:944
int arcangle
Definition: xdisplaylist.c:44
long function
Definition: xdisplaylist.c:84
static long x_postscript_elt(DisplayElt *elt, PostScriptClosure *psc)
x_postscript_elt
Definition: xdisplaylist.c:678
void x_record_arc(ListHeader *displaylist, Action action, long x, long y, long width, long height, long startangle, long arcangle, unsigned long function, unsigned long color, unsigned long linewidth)
x_record_arc
Definition: xdisplaylist.c:221
long linewidth
Definition: xdisplaylist.c:47
static void x_get_rgb_values(Display *display, Window window, unsigned long color, XColor *rgb)
x_get_rgb_values
Definition: xdisplaylist.c:662
static void x_postscript_prolog(long f)
x_postscript_prolog
Definition: xdisplaylist.c:599
DisplayElt * RefDisplayElt
Definition: xdisplaylist.c:99
static char * add_number(char *buf, long n)
add_number
Definition: xdisplaylist.c:621
long npoints
Definition: xdisplaylist.c:83
static long x_free_elt(DisplayElt *elt, long *closure)
x_free_elt
Definition: xdisplaylist.c:494
includes
void x_record_rectangle(ListHeader *displaylist, Action action, long x, long y, long width, long height, unsigned long function, unsigned long color, unsigned long linewidth)
x_record_rectangle
Definition: xdisplaylist.c:255
static char nstr[BUF_SIZE]
Definition: xdisplaylist.c:612
long x_postscript_window(Display *display, Window window, ListHeader *displaylist, char *filename)
x_postscript_window
Definition: xdisplaylist.c:839
long linewidth
Definition: xdisplaylist.c:25
#define NULL
Definition: def_const.h:533
struct wl_PostScriptClosure PostScriptClosure
static ListLinks * x_get_links_of_display_list(DisplayElt *elt)
x_get_links_of_display_list
Definition: xdisplaylist.c:110
ListLinks links
Definition: xdisplaylist.c:21
void List_Append(RefListHeader header, Ref atom)
void List_Append
Definition: list.c:71
int startangle
Definition: xdisplaylist.c:44
int width
Definition: xdisplaylist.c:44
XPoint * points
Definition: xdisplaylist.c:82
char * str
Definition: xdisplaylist.c:56
struct wl_Polygon Polygon
void x_record_polygon(ListHeader *displaylist, Action action, XPoint *points, long npoints, unsigned long function, unsigned long color, unsigned long linewidth)
x_record_polygon
Definition: xdisplaylist.c:285
long linewidth
Definition: xdisplaylist.c:86
void Errorline(char *format,...)
Errorline.
Definition: error.c:465
unsigned long * GENERIC
unsigned long *GENERIC
Definition: def_struct.h:35
static char * prolog[]
Definition: xdisplaylist.c:555
Action action
Definition: xdisplaylist.c:20
Action action
Definition: xdisplaylist.c:53
long color
Definition: xdisplaylist.c:24
void x_set_gc(Display *display, GC gc, long function, unsigned long color, long linewidth, Font font)
x_set_gc
Definition: xdisplaylist.c:142
Action action
Definition: xdisplaylist.c:42
#define TRUE
Standard boolean.
Definition: def_const.h:268
Action action
Definition: xdisplaylist.c:80
ListLinks links
Definition: xdisplaylist.c:43
Action action
Definition: xdisplaylist.c:31
long function
Definition: xdisplaylist.c:45
struct wl_Rectangle Rectangle
#define FALSE
Standard boolean.
Definition: def_const.h:275
Polygon polygon
Definition: xdisplaylist.c:96
long color
Definition: xdisplaylist.c:46
void List_SetLinkProc(RefListHeader header, RefListGetLinksProc getLinks)
List_SetLinkProc.
Definition: list.c:24
static long x_draw_elt(DisplayElt *elt, GraphicClosure *g)
x_draw_elt
Definition: xdisplaylist.c:344
Rectangle rectangle
Definition: xdisplaylist.c:93
union wl_DisplayElt DisplayElt
struct wl_GraphicClosure GraphicClosure
#define xDefaultFont
Definition: def_const.h:943
void x_record_string(ListHeader *displaylist, Action action, long x, long y, char *str, Font font, unsigned long function, unsigned long color)
x_record_string
Definition: xdisplaylist.c:318
long color
Definition: xdisplaylist.c:58
int height
Definition: xdisplaylist.c:44
void x_free_display_list(ListHeader *displaylist)
x_free_display_list
Definition: xdisplaylist.c:548
ListLinks links
Definition: xdisplaylist.c:81
ListLinks links
Definition: xdisplaylist.c:54
long function
Definition: xdisplaylist.c:57
long List_Enum(RefListHeader header, RefListEnumProc proc, Ref closure)
List_Enum.
Definition: list.c:379
#define AllocDisplayElt()
Definition: xdisplaylist.c:169
int(* RefListEnumProc)()
Definition: def_struct.h:276
long function
Definition: xdisplaylist.c:23
struct wl_String String
ListHeader * x_display_list()
x_display_list
Definition: xdisplaylist.c:120
struct wl_Line Line
struct wl_Arc Arc
static char * add_string(char *buf, char *s)
add_string
Definition: xdisplaylist.c:645
void x_record_line(ListHeader *displaylist, Action action, long x0, long y0, long x1, long y1, unsigned long function, unsigned long color, unsigned long linewidth)
x_record_line
Definition: xdisplaylist.c:186
void x_refresh_window(Display *display, Window window, Pixmap pixmap, GC pixmapgc, ListHeader *displaylist)
x_refresh_window
Definition: xdisplaylist.c:447
Display * display
Definition: xdisplaylist.c:65
void * Ref
Definition: def_struct.h:272
#define FreeDisplayElt(E)
Definition: xdisplaylist.c:170
ListLinks links
Definition: xdisplaylist.c:32