From: Matt Birkholz Date: Wed, 23 Jan 2019 21:57:20 +0000 (-0700) Subject: x11: Punt import-x11. X-Git-Tag: mit-scheme-pucked-10.1.10~6^2~26 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=69096876b4974242b86582f180d4eb6be0a4656f;p=mit-scheme.git x11: Punt import-x11. --- diff --git a/src/x11/README b/src/x11/README index 684e8896e..99c69f5a0 100644 --- a/src/x11/README +++ b/src/x11/README @@ -24,18 +24,13 @@ creating a short optiondb file. mkdir ~/.mit-scheme-x86-64 echo "(further-load-options #t)" > ~/.mit-scheme-x86-64/optiondb.scm export MITSCHEME_LIBRARY_PATH=\ - ~/.mit-scheme-x86-64:/usr/local/lib/mit-scheme-x86-64 + ~/.mit-scheme-x86-64:/usr/local/lib/mit-scheme-x86-64 make install To use: (load-option 'x11) - (import-x11) - -Import-x11 will modify the REPL's current environment by adding -bindings linked to the plugin's exports. They are not exported to the -global environment because they would conflict with the deprecated -exports from (runtime x-graphics). + (define dev (make-graphics-device 'x)) To import into a CREF package set, add this to your .pkg file: diff --git a/src/x11/compile.scm b/src/x11/compile.scm index a7878c2c4..59d96dcd2 100644 --- a/src/x11/compile.scm +++ b/src/x11/compile.scm @@ -31,8 +31,7 @@ USA. (for-each (let ((env (->environment '(runtime)))) (lambda (filename) (compile-file filename '() env))) - '("x11" - "x11-base" + '("x11-base" "x11-color" "x11-graphics" "x11-device" diff --git a/src/x11/configure.ac b/src/x11/configure.ac index e8c4d41a5..48c7fb178 100644 --- a/src/x11/configure.ac +++ b/src/x11/configure.ac @@ -124,7 +124,7 @@ fi MIT_SCHEME_PKD="x11-${MIT_SCHEME_OS_SUFFIX}.pkd" -for f in x11 x11-base x11-color x11-graphics x11-terminal x11-device; do +for f in x11-base x11-color x11-graphics x11-terminal x11-device; do MIT_SCHEME_SCMs="${MIT_SCHEME_SCMs} ${f}.scm" MIT_SCHEME_BCIs="${MIT_SCHEME_BCIs} ${f}.bci" MIT_SCHEME_DEPS="${MIT_SCHEME_DEPS} diff --git a/src/x11/x11.pkg b/src/x11/x11.pkg index 8bf96db67..63e5cbd2a 100644 --- a/src/x11/x11.pkg +++ b/src/x11/x11.pkg @@ -28,10 +28,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (global-definitions "../runtime/") (define-package (x11) - (files "x11") - (parent ()) - (export () - import-x11)) + (parent ())) (define-package (x11 base) (files "x11-base") diff --git a/src/x11/x11.scm b/src/x11/x11.scm deleted file mode 100644 index 57f52c8c8..000000000 --- a/src/x11/x11.scm +++ /dev/null @@ -1,150 +0,0 @@ -#| -*-Scheme-*- - -Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, - 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, - 2017, 2018, 2019 Massachusetts Institute of Technology - -This file is part of an x11 plugin for MIT/GNU Scheme. - -This plugin is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2 of the License, or (at your -option) any later version. - -This plugin is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this plugin; if not, write to the Free Software Foundation, -Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -|# - -;;;; X11 interface -;;; package: (x11) - -(define (import-x11) - (let ((target-environment (nearest-repl/environment)) - (source-environment (->environment '(x11)))) - (for-each (lambda (name) - (link-variables target-environment name - source-environment name)) - '(create-x-colormap - create-x-image - x-character-bounds/ascent - x-character-bounds/descent - x-character-bounds/lbearing - x-character-bounds/rbearing - x-character-bounds/width - x-close-all-displays - x-colormap/allocate-color - x-colormap/free - x-colormap/query-color - x-colormap/store-color - x-colormap/store-colors - x-colormap? - x-display/name - x-display/properties - x-font-structure/all-chars-exist? - x-font-structure/character-bounds - x-font-structure/default-char - x-font-structure/direction - x-font-structure/max-ascent - x-font-structure/max-bounds - x-font-structure/max-descent - x-font-structure/min-bounds - x-font-structure/name - x-font-structure/start-index - x-geometry-string - x-graphics-default-display-name - x-graphics-default-geometry - x-graphics-device-type - x-graphics/available? - x-graphics/clear - x-graphics/close-display - x-graphics/close-window - x-graphics/color? - x-graphics/coordinate-limits - x-graphics/copy-area - x-graphics/device-coordinate-limits - x-graphics/disable-keyboard-focus - x-graphics/discard-events - x-graphics/display - x-graphics/drag-cursor - x-graphics/draw-arc - x-graphics/draw-circle - x-graphics/draw-line - x-graphics/draw-lines - x-graphics/draw-point - x-graphics/draw-points - x-graphics/draw-text - x-graphics/enable-keyboard-focus - x-graphics/fill-circle - x-graphics/flush - x-graphics/font-structure - x-graphics/get-colormap - x-graphics/get-default - x-graphics/iconify-window - x-graphics/image-depth - x-graphics/lower-window - x-graphics/map-window - x-graphics/move-cursor - x-graphics/move-window - x-graphics/open-display - x-graphics/open-display? - x-graphics/open-window? - x-graphics/query-pointer - x-graphics/raise-window - x-graphics/read-button - x-graphics/read-user-event - x-graphics/reset-clip-rectangle - x-graphics/resize-window - x-graphics/select-user-events - x-graphics/set-background-color - x-graphics/set-border-color - x-graphics/set-border-width - x-graphics/set-clip-rectangle - x-graphics/set-colormap - x-graphics/set-coordinate-limits - x-graphics/set-drawing-mode - x-graphics/set-font - x-graphics/set-foreground-color - x-graphics/set-icon-name - x-graphics/set-input-hint - x-graphics/set-internal-border-width - x-graphics/set-line-style - x-graphics/set-mouse-color - x-graphics/set-mouse-shape - x-graphics/set-window-name - x-graphics/visual-info - x-graphics/window-id - x-graphics/withdraw-window - x-graphics:auto-raise? - x-image/destroy - x-image/draw - x-image/draw-subimage - x-image/fill-from-byte-vector - x-image/get-pixel - x-image/height - x-image/set-pixel - x-image/width - x-image? - x-visual-class:direct-color - x-visual-class:gray-scale - x-visual-class:pseudo-color - x-visual-class:static-color - x-visual-class:static-gray - x-visual-class:true-color - x-visual-info/bits-per-rgb - x-visual-info/blue-mask - x-visual-info/class - x-visual-info/colormap-size - x-visual-info/depth - x-visual-info/green-mask - x-visual-info/red-mask - x-visual-info/screen - x-visual-info/visual - x-visual-info/visual-id)))) \ No newline at end of file