From: Arthur Gleckler Date: Mon, 20 Jul 1992 20:12:30 +0000 (+0000) Subject: Change primitive X-GRAPHICS-COPY-AREA to accept both source and X-Git-Tag: 20090517-FFI~9219 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a49b5aa760df5daec2af3e550427a2f92cb4c96d;p=mit-scheme.git Change primitive X-GRAPHICS-COPY-AREA to accept both source and destination windows. Change X graphics operation COPY-AREA to pass the same window for both parameters. --- diff --git a/v7/src/microcode/version.h b/v7/src/microcode/version.h index 7a406553c..8efb908a7 100644 --- a/v7/src/microcode/version.h +++ b/v7/src/microcode/version.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.116 1992/07/06 23:42:08 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.117 1992/07/20 20:12:30 arthur Exp $ Copyright (c) 1988-1992 Massachusetts Institute of Technology @@ -46,5 +46,5 @@ MIT in each case. */ #define VERSION 11 #endif #ifndef SUBVERSION -#define SUBVERSION 116 +#define SUBVERSION 117 #endif diff --git a/v7/src/microcode/x11graph.c b/v7/src/microcode/x11graph.c index c8adb45fc..2b6c25ce4 100644 --- a/v7/src/microcode/x11graph.c +++ b/v7/src/microcode/x11graph.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11graph.c,v 1.27 1992/07/01 20:18:40 arthur Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11graph.c,v 1.28 1992/07/20 20:12:16 arthur Exp $ Copyright (c) 1989-92 Massachusetts Institute of Technology @@ -530,25 +530,38 @@ DEFINE_PRIMITIVE ("X-GRAPHICS-SET-DASHES", Prim_x_graphics_set_dashes, 3, 3, 0) PRIMITIVE_RETURN (UNSPECIFIC); } -DEFINE_PRIMITIVE ("X-GRAPHICS-COPY-AREA", Prim_x_graphics_copy_area, 7, 7, 0) +DEFINE_PRIMITIVE ("X-GRAPHICS-COPY-AREA", Prim_x_graphics_copy_area, 8, 8, 0) { PRIMITIVE_HEADER (7); { - struct xwindow * xw = x_window_arg (1); - unsigned int internal_border_width = (XW_INTERNAL_BORDER_WIDTH (xw)); - float device_width = ((XW_X_SLOPE (xw)) * (arg_real_number (4))); - float device_height = ((XW_Y_SLOPE (xw)) * (arg_real_number (5))); - - XCopyArea ((XW_DISPLAY (xw)), - (XW_WINDOW (xw)), - (XW_WINDOW (xw)), - (XW_NORMAL_GC (xw)), - (internal_border_width + (arg_x_coordinate (2, xw))), - (internal_border_width + (arg_y_coordinate (3, xw))), + struct xwindow * source_xw = x_window_arg (1); + struct xwindow * destination_xw = x_window_arg (2); + unsigned int source_internal_border_width + = (XW_INTERNAL_BORDER_WIDTH (source_xw)); + unsigned int destination_internal_border_width + = (XW_INTERNAL_BORDER_WIDTH (destination_xw)); + float device_width + = ((XW_X_SLOPE (source_xw)) * (arg_real_number (5))); + float device_height + = ((XW_Y_SLOPE (source_xw)) * (arg_real_number (6))); + Display *source_display = XW_DISPLAY (source_xw); + Display *destination_display = XW_DISPLAY (destination_xw); + if (source_display != destination_display) + error_bad_range_arg (2); + XCopyArea (source_display, + (XW_WINDOW (source_xw)), + (XW_WINDOW (destination_xw)), + (XW_NORMAL_GC (source_xw)), + (source_internal_border_width + + (arg_x_coordinate (3, source_xw))), + (source_internal_border_width + + (arg_y_coordinate (4, source_xw))), (ROUND_FLOAT (device_width)), (ROUND_FLOAT (device_height)), - (internal_border_width + (arg_x_coordinate (6, xw))), - (internal_border_width + (arg_y_coordinate (7, xw)))); + (destination_internal_border_width + + (arg_x_coordinate (7, destination_xw))), + (destination_internal_border_width + + (arg_y_coordinate (8, destination_xw)))); PRIMITIVE_RETURN (UNSPECIFIC); } } diff --git a/v7/src/runtime/version.scm b/v7/src/runtime/version.scm index 54bb2a595..9f58553a3 100644 --- a/v7/src/runtime/version.scm +++ b/v7/src/runtime/version.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.153 1992/05/26 20:33:14 mhwu Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.154 1992/07/20 20:12:04 arthur Exp $ Copyright (c) 1988-1992 Massachusetts Institute of Technology @@ -45,7 +45,7 @@ MIT in each case. |# '())) (add-system! microcode-system) (add-event-receiver! event:after-restore snarf-microcode-version!) - (add-identification! "Runtime" 14 153)) + (add-identification! "Runtime" 14 154)) (define microcode-system) diff --git a/v7/src/runtime/x11graph.scm b/v7/src/runtime/x11graph.scm index 25274b708..4e0afa47d 100644 --- a/v7/src/runtime/x11graph.scm +++ b/v7/src/runtime/x11graph.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/x11graph.scm,v 1.22 1992/06/03 18:24:28 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/x11graph.scm,v 1.23 1992/07/20 20:12:21 arthur Exp $ Copyright (c) 1989-92 Massachusetts Institute of Technology @@ -76,7 +76,7 @@ MIT in each case. |# (x-window-x-size 1) (x-window-y-size 1) - (x-graphics-copy-area 7) + (x-graphics-copy-area 8) (x-graphics-drag-cursor 3) (x-graphics-draw-line 5) (x-graphics-draw-point 3) @@ -591,10 +591,11 @@ MIT in each case. |# source-x-left source-y-top width height destination-x-left destination-y-top) - (x-graphics-copy-area (x-graphics-device/xw device) - source-x-left source-y-top - width height - destination-x-left destination-y-top)) + (let ((xw (x-graphics-device/xw device))) + (x-graphics-copy-area xw xw + source-x-left source-y-top + width height + destination-x-left destination-y-top))) (define (x-graphics/get-default device resource-name class-name) (x-display-get-default (x-graphics-device/xd device) diff --git a/v8/src/microcode/version.h b/v8/src/microcode/version.h index be1a5b193..d300b0ddc 100644 --- a/v8/src/microcode/version.h +++ b/v8/src/microcode/version.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.116 1992/07/06 23:42:08 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.117 1992/07/20 20:12:30 arthur Exp $ Copyright (c) 1988-1992 Massachusetts Institute of Technology @@ -46,5 +46,5 @@ MIT in each case. */ #define VERSION 11 #endif #ifndef SUBVERSION -#define SUBVERSION 116 +#define SUBVERSION 117 #endif