From d05561881573933a4ffa42ecee26a2cda176df78 Mon Sep 17 00:00:00 2001 From: frese Date: Tue, 21 Aug 2001 15:15:34 +0000 Subject: [PATCH] added all new types and packages (font, cursor, text, property, wm, client, font-type, atom-type, cursor-type). --- scheme/xlib/xlib-interfaces.scm | 151 +++++++++++++++++++++++++++++- scheme/xlib/xlib-packages.scm | 60 +++++++++++- scheme/xlib/xlib-type-package.scm | 15 ++- 3 files changed, 216 insertions(+), 10 deletions(-) diff --git a/scheme/xlib/xlib-interfaces.scm b/scheme/xlib/xlib-interfaces.scm index 82d91e2..bf8fc10 100644 --- a/scheme/xlib/xlib-interfaces.scm +++ b/scheme/xlib/xlib-interfaces.scm @@ -38,6 +38,8 @@ display-list-pixmap-formats list-pixmap-formats ;; compatibility with Elk, same as above synchronize + + check-screen-number ;; for internal use (e.g. by client.scm) )) @@ -230,20 +232,155 @@ fill-arcs fill-polygon)) +(define-interface xlib-font-interface + (export font? + font-display + open-font + close-font + font-name + gcontext-font + list-font-names + list-fonts -;; pixmap - not done! - + font-info + font-direction + font-min-byte2 + font-max-byte2 + font-min-byte1 + font-max-byte1 + font-all-chars-exist? + font-default-char + font-ascent + font-descent + char-info + char-rbearing + char-lbearing + char-width + char-ascent + char-descent + char-attributes + max-char-info + max-char-rbearing + max-char-lbearing + max-char-width + max-char-ascent + max-char-descent + max-char-attributes + min-char-info + min-char-rbearing + min-char-lbearing + min-char-width + min-char-ascent + min-char-descent + min-char-attributes + + font-properties + font-property + font-path + set-font-path!)) + (define-interface xlib-pixmap-interface (export pixmap? free-pixmap - pixmap-display)) + pixmap-display + create-pixmap + create-bitmap-from-data + create-pixmap-from-bitmap-data + read-bitmap-file + write-bitmap-file)) (define-interface xlib-event-interface - (export event-ready? + (export event-type + event-args + event? + event-ready? events-pending next-event peek-event)) +(define-interface xlib-text-interface + (export text-width + extents-lbearing + extents-rbearing + extents-width + extents-ascent + extents-descent + draw-image-text + draw-poly-text + ;translate-text + )) + +(define-interface xlib-property-interface + (export atom? + make-atom + intern-atom + find-atom + atom-name + list-properties + get-property + change-property + delete-property + rotate-properties + set-selection-owner! + selection-owner + convert-selection)) + +(define-interface xlib-cursor-interface + (export cursor? + cursor-display + free-cursor + create-pixmap-cursor + create-cursor ;; same as above + create-glyph-cursor + create-font-cursor + recolor-cursor)) + + +(define-interface xlib-wm-interface + (export reparent-window + install-colormap + uninstall-colormap + list-installed-colormaps + set-input-focus + input-focus + general-warp-pointer + warp-pointer + warp-pointer-relative + bell + set-access-control + change-save-set + set-close-down-mode + get-pointer-mapping + set-pointer-mapping)) + +(define-interface xlib-client-interface + (export iconify-window + withdraw-window + reconfigure-wm-window + get-text-property + set-text-property! + wm-protocols + set-wm-protocols! + wm-name + set-wm-name! + wm-icon-name + set-wm-icon-name! + wm-client-machine + set-wm-client-machine! + wm-class + set-wm-class! + wm-command + set-wm-command! + transient-for + set-transient-for! + wm-normal-hints + set-wm-normal-hints! + wm-hints + set-wm-hints! + icon-sizes + set-icon-sizes! + )) + ;; all together (define-interface xlib-interface @@ -257,4 +394,10 @@ xlib-gcontext-interface xlib-graphics-interface xlib-event-interface + xlib-font-interface + xlib-cursor-interface + xlib-text-interface + xlib-property-interface + xlib-wm-interface + xlib-client-interface )) \ No newline at end of file diff --git a/scheme/xlib/xlib-packages.scm b/scheme/xlib/xlib-packages.scm index 59f1e3b..58b2bd6 100644 --- a/scheme/xlib/xlib-packages.scm +++ b/scheme/xlib/xlib-packages.scm @@ -1,11 +1,13 @@ (define-structure xlib-display xlib-display-interface (open scheme + signals ;; for error external-calls xlib-types) (files display)) (define-structure xlib-window xlib-window-interface (open scheme + signals ;; for error external-calls receiving xlib-types @@ -16,6 +18,7 @@ (define-structure xlib-drawable xlib-drawable-interface (open scheme + external-calls xlib-types xlib-window xlib-pixmap) @@ -24,6 +27,7 @@ (define-structure xlib-color xlib-color-interface (open scheme + signals ;; for error external-calls xlib-types) (files color)) @@ -45,6 +49,7 @@ (define-structure xlib-gcontext xlib-gcontext-interface (open scheme + signals ;; for error external-calls receiving xlib-types) @@ -53,9 +58,10 @@ (define-structure xlib-pixmap xlib-pixmap-interface (open scheme + signals ;; for error external-calls xlib-types) - (files)) ;;... + (files pixmap)) ;;... (define-structure xlib-graphics xlib-graphics-interface (open scheme @@ -69,7 +75,47 @@ xlib-types) (files event)) +(define-structure xlib-font xlib-font-interface + (open scheme + signals ;; for error + external-calls + xlib-types) + (files font)) +(define-structure xlib-text xlib-text-interface + (open scheme + signals ;; for error + external-calls + ascii ;; for char->ascii etc. + xlib-types) + (files text)) + +(define-structure xlib-property xlib-property-interface + (open scheme + external-calls + xlib-types) + (files property)) + +(define-structure xlib-cursor xlib-cursor-interface + (open scheme + external-calls + xlib-types) + (files cursor)) + +(define-structure xlib-wm xlib-wm-interface + (open scheme + external-calls + xlib-types + ) + (files wm)) + +(define-structure xlib-client xlib-client-interface + (open scheme + external-calls + xlib-types + xlib-display ;; for check-screen-number + ) + (files client)) ;; all together @@ -77,10 +123,18 @@ (open xlib-display xlib-pixmap xlib-window -; xlib-drawable + xlib-drawable xlib-color xlib-colormap xlib-pixel xlib-gcontext xlib-graphics - xlib-event)) \ No newline at end of file + xlib-event + xlib-font + xlib-text + xlib-property + xlib-cursor + xlib-wm + xlib-client + ) + (optimize auto-integrate)) \ No newline at end of file diff --git a/scheme/xlib/xlib-type-package.scm b/scheme/xlib/xlib-type-package.scm index f870276..adb5bb8 100644 --- a/scheme/xlib/xlib-type-package.scm +++ b/scheme/xlib/xlib-type-package.scm @@ -1,9 +1,15 @@ +;; Things we still need from the scsh package: +(define-structure fdes + (export fdes->inport) + (open scsh)) + ;; the other xlib packages need this to gain direct access to the new datatypes. ;; Normal users shouldn't use this package. (define-structure xlib-types xlib-types-interface - (open scsh ;; for fdes->inport - scheme + (open scheme + signals ;; for error + fdes ;; see above list-lib weak general-tables @@ -19,4 +25,7 @@ window-type drawable-type gcontext-type - event-type)) \ No newline at end of file + event-type + font-type + atom-type + cursor-type)) \ No newline at end of file