Raymond Toy pushed to branch upstream-clx at cmucl / cmucl
Commits:
-
60bde987
by Raymond Toy at 2018-12-16T23:58:32Z
4 changed files:
Changes:
| 1 |
-$Id: README-CMUCL,v 1.2 2009/06/11 16:03:56 rtoy Rel $
|
|
| 1 |
+This is an import of Telent-CLX from the fork
|
|
| 2 |
+https://github.com/sharplispers/clx, version
|
|
| 3 |
+6e39a0df2a0a1d083166f405d4b8bbc463d54d85.
|
|
| 2 | 4 |
|
| 3 |
-This is an import of Telent-CLX as of 0.7.3.
|
|
| 5 |
+All (almost?) files are included. A few changes to fix bugs related
|
|
| 6 |
+to CMUCL have been added, as well as the CVS id. I've tried to make
|
|
| 7 |
+few changes so it will be easy to merge again when desired.
|
|
| 4 | 8 |
|
| 5 |
-All files are included. A few changes to fix bugs related to CMUCL
|
|
| 6 |
-have been added, as well as the CVS id. I've tried to make few
|
|
| 7 |
-changes so it will be easy to merge again when desired.
|
|
| 8 |
- |
|
| 9 |
-The following files from this directory are compiled and loaded by
|
|
| 10 |
-CMUCL when it builds utilities:
|
|
| 11 |
- |
|
| 12 |
-clx-library.lisp
|
|
| 13 |
-package.lisp
|
|
| 14 |
-depdefs.lisp
|
|
| 15 |
-clx.lisp
|
|
| 16 |
-dependent.lisp
|
|
| 17 |
-macros.lisp
|
|
| 18 |
-bufmac.lisp
|
|
| 19 |
-buffer.lisp
|
|
| 20 |
-display.lisp
|
|
| 21 |
-gcontext.lisp
|
|
| 22 |
-input.lisp
|
|
| 23 |
-requests.lisp
|
|
| 24 |
-fonts.lisp
|
|
| 25 |
-graphics.lisp
|
|
| 26 |
-text.lisp
|
|
| 27 |
-attributes.lisp
|
|
| 28 |
-translate.lisp
|
|
| 29 |
-keysyms.lisp
|
|
| 30 |
-manager.lisp
|
|
| 31 |
-image.lisp
|
|
| 32 |
-resource.lisp
|
|
| 33 |
-shape.lisp
|
|
| 34 |
-big-requests.lisp
|
|
| 35 |
-xvidmode.lisp
|
|
| 36 |
-xrender.lisp
|
|
| 37 |
-glx.lisp
|
|
| 38 |
-gl.lisp
|
|
| 39 |
-dpms.lisp
|
|
| 40 |
-provide.lisp
|
|
| 9 |
+See src/tools/clxcom.lisp to see what files are compiled.
|
| ... | ... | @@ -387,9 +387,7 @@ |
| 387 | 387 |
;; FIXME: maybe we should reevaluate this?
|
| 388 | 388 |
(defvar *def-clx-class-use-defclass*
|
| 389 | 389 |
#+(or Genera allegro) t
|
| 390 |
- #+(and cmu pcl) '(XLIB:DRAWABLE XLIB:WINDOW XLIB:PIXMAP)
|
|
| 391 |
- #+(and cmu (not pcl)) nil
|
|
| 392 |
- #-(or Genera cmu allegro) nil
|
|
| 390 |
+ #-(or Genera allegro) nil
|
|
| 393 | 391 |
"Controls whether DEF-CLX-CLASS uses DEFCLASS.
|
| 394 | 392 |
|
| 395 | 393 |
If it is a list, it is interpreted by DEF-CLX-CLASS to be a list of
|
| ... | ... | @@ -884,6 +884,47 @@ |
| 884 | 884 |
:element-type '(unsigned-byte 8)
|
| 885 | 885 |
:input t :output t :buffering :none))
|
| 886 | 886 |
|
| 887 |
+#+cmu
|
|
| 888 |
+(defun open-x-stream (host display protocol)
|
|
| 889 |
+ (let ((stream-fd
|
|
| 890 |
+ (ecase protocol
|
|
| 891 |
+ ;; establish a TCP connection to the X11 server, which is
|
|
| 892 |
+ ;; listening on port 6000 + display-number
|
|
| 893 |
+ ((:internet :tcp nil)
|
|
| 894 |
+ (let ((fd (ext:connect-to-inet-socket host (+ *x-tcp-port* display))))
|
|
| 895 |
+ (unless (plusp fd)
|
|
| 896 |
+ (error 'connection-failure
|
|
| 897 |
+ :major-version *protocol-major-version*
|
|
| 898 |
+ :minor-version *protocol-minor-version*
|
|
| 899 |
+ :host host
|
|
| 900 |
+ :display display
|
|
| 901 |
+ :reason (format nil "Cannot connect to internet socket: ~S"
|
|
| 902 |
+ (unix:get-unix-error-msg))))
|
|
| 903 |
+ fd))
|
|
| 904 |
+ ;; establish a connection to the X11 server over a Unix
|
|
| 905 |
+ ;; socket. (:|| comes from Darwin's weird DISPLAY
|
|
| 906 |
+ ;; environment variable)
|
|
| 907 |
+ ((:unix :local :||)
|
|
| 908 |
+ (let ((path (unix-socket-path-from-host host display)))
|
|
| 909 |
+ (unless (probe-file path)
|
|
| 910 |
+ (error 'connection-failure
|
|
| 911 |
+ :major-version *protocol-major-version*
|
|
| 912 |
+ :minor-version *protocol-minor-version*
|
|
| 913 |
+ :host host
|
|
| 914 |
+ :display display
|
|
| 915 |
+ :reason (format nil "Unix socket ~s does not exist" path)))
|
|
| 916 |
+ (let ((fd (ext:connect-to-unix-socket (namestring path))))
|
|
| 917 |
+ (unless (plusp fd)
|
|
| 918 |
+ (error 'connection-failure
|
|
| 919 |
+ :major-version *protocol-major-version*
|
|
| 920 |
+ :minor-version *protocol-minor-version*
|
|
| 921 |
+ :host host
|
|
| 922 |
+ :display display
|
|
| 923 |
+ :reason (format nil "Can't connect to unix socket: ~S"
|
|
| 924 |
+ (unix:get-unix-error-msg))))
|
|
| 925 |
+ fd))))))
|
|
| 926 |
+ (system:make-fd-stream stream-fd :input t :output t :element-type '(unsigned-byte 8))))
|
|
| 927 |
+ |
|
| 887 | 928 |
;;; BUFFER-READ-DEFAULT for CMU Common Lisp.
|
| 888 | 929 |
;;;
|
| 889 | 930 |
;;; If timeout is 0, then we call LISTEN to see if there is any input.
|
| ... | ... | @@ -1643,7 +1684,7 @@ Returns a list of (host display-number screen protocol)." |
| 1643 | 1684 |
(defmacro with-underlying-simple-vector
|
| 1644 | 1685 |
((variable element-type pixarray) &body body)
|
| 1645 | 1686 |
(declare (ignore element-type))
|
| 1646 |
- `(#+cmu kernel::with-array-data #+sbcl sb-kernel:with-array-data
|
|
| 1687 |
+ `(#+cmu lisp::with-array-data #+sbcl sb-kernel:with-array-data
|
|
| 1647 | 1688 |
((,variable ,pixarray) (start) (end))
|
| 1648 | 1689 |
(declare (ignore start end))
|
| 1649 | 1690 |
,@body))
|
| ... | ... | @@ -1762,11 +1803,11 @@ Returns a list of (host display-number screen protocol)." |
| 1762 | 1803 |
height width)
|
| 1763 | 1804 |
(declare (type array-index source-width sx sy dest-width dx dy height width))
|
| 1764 | 1805 |
#.(declare-buffun)
|
| 1765 |
- (kernel::with-array-data ((sdata source)
|
|
| 1806 |
+ (lisp::with-array-data ((sdata source)
|
|
| 1766 | 1807 |
(sstart)
|
| 1767 | 1808 |
(send))
|
| 1768 | 1809 |
(declare (ignore send))
|
| 1769 |
- (kernel::with-array-data ((ddata dest)
|
|
| 1810 |
+ (lisp::with-array-data ((ddata dest)
|
|
| 1770 | 1811 |
(dstart)
|
| 1771 | 1812 |
(dend))
|
| 1772 | 1813 |
(declare (ignore dend))
|
| ... | ... | @@ -15162,11 +15162,11 @@ a keycode. |
| 15162 | 15162 |
|
| 15163 | 15163 |
@item
|
| 15164 | 15164 |
Convert the keycode into its corresponding keysym, based on the
|
| 15165 |
-current keyboard mapping. See @var{keycode->keysym}.
|
|
| 15165 |
+current keyboard mapping. See @var{keycode->keysym}.
|
|
| 15166 | 15166 |
|
| 15167 | 15167 |
@item
|
| 15168 | 15168 |
Convert the keysym into the corresponding Common Lisp character. See
|
| 15169 |
-@var{keysym->character}.
|
|
| 15169 |
+@var{keysym->character}.
|
|
| 15170 | 15170 |
@end enumerate
|
| 15171 | 15171 |
|
| 15172 | 15172 |
@menu
|