used lists for the arguments and return values of those functions that did use
vectors before (if vectors were not neccessary).
This commit is contained in:
		
							parent
							
								
									d055618815
								
							
						
					
					
						commit
						d4d7f0c759
					
				| 
						 | 
				
			
			@ -37,11 +37,11 @@
 | 
			
		|||
 | 
			
		||||
(define (query-colors colormap pixels)
 | 
			
		||||
  (let ((res (%query-colors (colormap-Xcolormap colormap)
 | 
			
		||||
			    (vector-map! pixel-Xpixel pixels)
 | 
			
		||||
			    (vector-map! pixel-Xpixel (list->vector pixels))
 | 
			
		||||
			    (display-Xdisplay (colormap-display colormap)))))
 | 
			
		||||
    (vector-map! (lambda (r-g-b)
 | 
			
		||||
		   (apply create-color r-g-b))
 | 
			
		||||
		 res)))
 | 
			
		||||
    (vector->list (vector-map! (lambda (r-g-b)
 | 
			
		||||
				 (apply create-color r-g-b))
 | 
			
		||||
			       res))))
 | 
			
		||||
 | 
			
		||||
(import-lambda-definition %query-colors (Xcolormap Xpixels Xdisplay)
 | 
			
		||||
  "scx_Query_Colors")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,10 +9,10 @@
 | 
			
		|||
  "scx_GContext_Font")
 | 
			
		||||
 | 
			
		||||
(define (list-font-names display pattern)
 | 
			
		||||
  (%list-font-names (display-Xdisplay display)
 | 
			
		||||
		    (if (symbol? pattern)
 | 
			
		||||
			(symbol->string pattern)
 | 
			
		||||
			pattern)))
 | 
			
		||||
  (vector->list (%list-font-names (display-Xdisplay display)
 | 
			
		||||
				  (if (symbol? pattern)
 | 
			
		||||
				      (symbol->string pattern)
 | 
			
		||||
				      pattern))))
 | 
			
		||||
 | 
			
		||||
(import-lambda-definition %list-font-names (Xdisplay pattern)
 | 
			
		||||
  "scx_List_Font_Names")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -153,7 +153,7 @@
 | 
			
		|||
  (%set-dashlist (gcontext-Xgcontext gcontext)
 | 
			
		||||
		 (display-Xdisplay (gcontext-display gcontext))
 | 
			
		||||
		 dash-offset
 | 
			
		||||
		 dash-list))
 | 
			
		||||
		 (list->vector dash-list)))
 | 
			
		||||
 | 
			
		||||
(import-lambda-definition %set-dashlist (Xgcontext Xdisplay dashoffset dashlist)
 | 
			
		||||
  "scx_Set_Gcontext_Dashlist")
 | 
			
		||||
| 
						 | 
				
			
			@ -163,7 +163,9 @@
 | 
			
		|||
(define (set-gcontext-clip-rectangles! gcontext x y rectangles ordering)
 | 
			
		||||
  (%set-gcontext-clip-rectangles! (gcontext-Xgcontext gcontext)
 | 
			
		||||
				  (display-Xdisplay (gcontext-display gcontext))
 | 
			
		||||
				  x y rectangles ordering))
 | 
			
		||||
				  x y 
 | 
			
		||||
				  (list->vector rectangles)
 | 
			
		||||
				  ordering))
 | 
			
		||||
 | 
			
		||||
(import-lambda-definition %set-gcontext-clip-rectangles! (Xgcontext Xdisplay x 
 | 
			
		||||
							  y v ord)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -63,11 +63,11 @@
 | 
			
		|||
 | 
			
		||||
;; _____
 | 
			
		||||
 | 
			
		||||
(define (draw-points drawable gcontext vector-of-points relative?)
 | 
			
		||||
(define (draw-points drawable gcontext points relative?)
 | 
			
		||||
  (%draw-point (display-Xdisplay (drawable-display drawable))
 | 
			
		||||
	       (drawable-Xobject drawable)
 | 
			
		||||
	       (gcontext-Xgcontext gcontext)
 | 
			
		||||
	       vector-of-points
 | 
			
		||||
	       (list->vector points)
 | 
			
		||||
	       relative?))
 | 
			
		||||
 | 
			
		||||
(import-lambda-definition %draw-points (Xdisplay Xdrawable Xgcontext vec
 | 
			
		||||
| 
						 | 
				
			
			@ -90,11 +90,11 @@
 | 
			
		|||
;; _____
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
(define (draw-lines drawable gcontext vector-of-points relative?)
 | 
			
		||||
(define (draw-lines drawable gcontext points relative?)
 | 
			
		||||
  (%draw-lines (display-Xdisplay (drawable-display drawable))
 | 
			
		||||
	       (drawalbe-Xobject drawable)
 | 
			
		||||
	       (gcontext-Xgcontext gcontext)
 | 
			
		||||
	       vector-of-points
 | 
			
		||||
	       (list->vector points)
 | 
			
		||||
	       relative?))
 | 
			
		||||
 | 
			
		||||
(import-lambda-definition %draw-lines (Xdisplay Xdrawable Xgcontext vec rel)
 | 
			
		||||
| 
						 | 
				
			
			@ -102,14 +102,14 @@
 | 
			
		|||
 | 
			
		||||
;; _____
 | 
			
		||||
 | 
			
		||||
;; Note: vector-of-points is a vector which contains a list with 4
 | 
			
		||||
;; Note: points is a list which contains lists with 4
 | 
			
		||||
;;       integers  in Form: (x1, y1, x2, y2)
 | 
			
		||||
 | 
			
		||||
(define (draw-segments drawalbe gcontext vector-of-points)
 | 
			
		||||
(define (draw-segments drawalbe gcontext points)
 | 
			
		||||
  (%draw-segments (display-Xdisplay (drawable-display drawalbe))
 | 
			
		||||
		  (drawable-Xobject drawable)
 | 
			
		||||
		  (gcontext-Xgcontext gcontext)
 | 
			
		||||
		  vector-of-points))
 | 
			
		||||
		  (list->vector points)))
 | 
			
		||||
 | 
			
		||||
(import-lambda-definition %draw-segments (Xdisplay Xdrawable Xgcontext vec)
 | 
			
		||||
  "Draw_Segments")			 
 | 
			
		||||
| 
						 | 
				
			
			@ -136,22 +136,22 @@
 | 
			
		|||
  "scx_Fill_Rectangle")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
(define (draw-rectangles drawable gcontext vector-of-rectangles)
 | 
			
		||||
(define (draw-rectangles drawable gcontext rectangles)
 | 
			
		||||
  (%draw-rectangles (display-Xdisplay (drawable-display drawable))
 | 
			
		||||
		    (drawable-Xobject drawable)
 | 
			
		||||
		    (gcontext-Xgcontext gcontext)
 | 
			
		||||
		    vector-of-rectangles))
 | 
			
		||||
		    (list->vector rectangles)))
 | 
			
		||||
 | 
			
		||||
(import-lambda-definition %draw-rectangles (Xdisplay Xdrawable Xgcontext
 | 
			
		||||
						     vec)
 | 
			
		||||
   "scx_Draw_Rectangles")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
(define (fill-rectangles drawable gcontext vector-of-rectangles)
 | 
			
		||||
(define (fill-rectangles drawable gcontext rectangles)
 | 
			
		||||
  (%fill-rectangles (display-Xdisplay (drawable-display drawable))
 | 
			
		||||
		    (drawable-Xobject drawable)
 | 
			
		||||
		    (gcontext-Xgcontext gcontext)
 | 
			
		||||
		    vector-of-rectangles))
 | 
			
		||||
		    (list->vector rectangles)))
 | 
			
		||||
 | 
			
		||||
(import-lambda-definition %fill-rectangles (Xdisplay Xdrawable Xgcontext
 | 
			
		||||
						     vec)
 | 
			
		||||
| 
						 | 
				
			
			@ -179,29 +179,29 @@
 | 
			
		|||
					      w h a1 a2)
 | 
			
		||||
   "scx_Fill_Arc")
 | 
			
		||||
 | 
			
		||||
(define (draw-arcs drawable gcontext vector-of-data)
 | 
			
		||||
(define (draw-arcs drawable gcontext data)
 | 
			
		||||
  (%draw-arcs (display-Xdisplay (drawable-display drawable))
 | 
			
		||||
	      (drawable-Xobject drawable)
 | 
			
		||||
	      (gcontext-Xgcontext gcontext)
 | 
			
		||||
	      vector-of-data))
 | 
			
		||||
	      (list->vector data)))
 | 
			
		||||
 | 
			
		||||
(import-lambda-definition %draw-arcs (Xdisplay Xdrawable Xgcontext vec)
 | 
			
		||||
  "scx_Draw_Arcs")
 | 
			
		||||
 | 
			
		||||
(define (fill-arcs drawable gcontext vector-of-data)
 | 
			
		||||
(define (fill-arcs drawable gcontext data)
 | 
			
		||||
  (%fill-arcs (display-Xdisplay (drawable-display drawable))
 | 
			
		||||
	      (drawable-Xobject drawable)
 | 
			
		||||
	      (gcontext-Xgcontext gcontext)
 | 
			
		||||
	      vector-of-data))
 | 
			
		||||
	      (list->vector data)))
 | 
			
		||||
 | 
			
		||||
(import-lambda-definition %fill-arcs (Xdisplay Xdrawable Xgcontext vec)
 | 
			
		||||
  "scx_Fill_Arcs")
 | 
			
		||||
 | 
			
		||||
(define (fill-polygon drawable gcontext vector-of-points relative? shape)
 | 
			
		||||
(define (fill-polygon drawable gcontext points relative? shape)
 | 
			
		||||
  (%fill-polygon (display-Xdisplay (drawable-display drawable))
 | 
			
		||||
		 (drawable-Xobject drawable)
 | 
			
		||||
		 (gcontext-Xgcontext gcontext)
 | 
			
		||||
		 vector-of-points relative? shape))
 | 
			
		||||
		 (list->vector points) relative? shape))
 | 
			
		||||
 | 
			
		||||
(import-lambda-definition %fill-polygon (Xdisplay Xdrawable Xgcontext
 | 
			
		||||
						  vec relative shape)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,9 +38,9 @@
 | 
			
		|||
; ---   RETURN: vector of atoms 
 | 
			
		||||
 | 
			
		||||
(define (list-properties window)
 | 
			
		||||
  (let ((atom (%list-properties (display-Xdisplay (window-display window))
 | 
			
		||||
				(window-Xwindow window))))
 | 
			
		||||
    (vector-map! make-atom atom)))
 | 
			
		||||
  (let ((atoms (%list-properties (display-Xdisplay (window-display window))
 | 
			
		||||
				 (window-Xwindow window))))
 | 
			
		||||
    (vector->list (vector-map! make-atom atoms))))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
(import-lambda-definition %list-properties (Xdisplay Xwindow)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -50,7 +50,7 @@
 | 
			
		|||
		      (append (reverse
 | 
			
		||||
			       (mixed-text->pure-text (string->list e)))
 | 
			
		||||
			      rev-list))
 | 
			
		||||
		     (else (error "wrong element in list" list e)))))))))
 | 
			
		||||
		     (else (error "wrong element in text list" list e)))))))))
 | 
			
		||||
 | 
			
		||||
; --- separate-fonts converts a list of mixed types (including fonts) like this:
 | 
			
		||||
;     (13 "abc" font 'abc) -> ((13 "abc") font ('abc)) or
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -283,9 +283,9 @@
 | 
			
		|||
    (list
 | 
			
		||||
     (make-window (vector-ref res 0) display #f)
 | 
			
		||||
     (make-window (vector-ref res 1) display #f)
 | 
			
		||||
     (vector-map! (lambda (Xwindow)
 | 
			
		||||
		    (make-window Xwindow display #f))
 | 
			
		||||
		  (vector-ref res 2)))))
 | 
			
		||||
     (vector->list (vector-map! (lambda (Xwindow)
 | 
			
		||||
				  (make-window Xwindow display #f))
 | 
			
		||||
				(vector-ref res 2))))))
 | 
			
		||||
 | 
			
		||||
(import-lambda-definition %query-tree (Xwindow Xdisplay)
 | 
			
		||||
  "scx_Query_Tree")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue