254 lines
4.8 KiB
Scheme
254 lines
4.8 KiB
Scheme
;;; A "header" package with all new datatypes
|
|
|
|
(define-interface xlib-types-interface
|
|
(export make-display
|
|
display?
|
|
display-Xdisplay
|
|
display-after-function
|
|
display-set-after-function!
|
|
close-display
|
|
|
|
make-window
|
|
destroy-window
|
|
window?
|
|
drawable?
|
|
window-tag
|
|
window-set-tag!
|
|
window-Xwindow
|
|
window-display
|
|
|
|
make-color
|
|
color?
|
|
color-Xcolor
|
|
color-tag
|
|
color-set-tag!
|
|
|
|
make-colormap
|
|
colormap?
|
|
free-colormap
|
|
colormap-display
|
|
colormap-Xcolormap
|
|
colormap-tag
|
|
|
|
make-pixel
|
|
pixel?
|
|
pixel-Xpixel
|
|
pixel-tag
|
|
|
|
))
|
|
|
|
(define-structure xlib-types xlib-types-interface
|
|
(open scsh
|
|
scheme
|
|
weak
|
|
general-tables
|
|
primitives
|
|
define-record-types
|
|
external-calls)
|
|
(files type/display-type
|
|
type/window-type
|
|
type/color-type
|
|
type/colormap-type
|
|
type/pixel-type))
|
|
|
|
;;; Basic package
|
|
|
|
(define-interface xlib-basic-interface
|
|
(export named-args->alist))
|
|
|
|
(define-structure xlib-basic xlib-basic-interface
|
|
(open scsh
|
|
scheme
|
|
external-calls)
|
|
(files stuff))
|
|
|
|
|
|
;;; The display structure
|
|
|
|
(define-interface xlib-display-interface
|
|
(export display?
|
|
open-display
|
|
close-display
|
|
display-after-function
|
|
after-function ;; compatibility with Elk, same as above
|
|
display-set-after-function!
|
|
set-after-function! ;; compatibility with Elk, same as above
|
|
display-default-root-window
|
|
display-root-window ;; same as above
|
|
display-default-colormap
|
|
display-colormap ;; same as above
|
|
display-default-gcontext
|
|
display-default-depth
|
|
display-default-screen-number
|
|
display-cells
|
|
display-planes
|
|
display-string
|
|
display-vendor
|
|
display-protocol-version
|
|
display-screen-count
|
|
display-image-byte-order
|
|
display-bitmap-unit
|
|
display-bitmap-bit-order
|
|
display-bitmap-pad
|
|
display-width
|
|
display-height
|
|
display-width-mm
|
|
display-height-mm
|
|
display-motion-buffer-size
|
|
display-flush-output
|
|
display-wait-output
|
|
display-no-op
|
|
no-op ;; compatibility with Elk, same as above
|
|
display-list-depths
|
|
list-depths ;; compatibility with Elk, same as above
|
|
display-list-pixmap-formats
|
|
list-pixmap-formats ;; compatibility with Elk, same as above
|
|
synchronize
|
|
|
|
))
|
|
|
|
(define-structure xlib-display xlib-display-interface
|
|
(open scsh
|
|
scheme
|
|
external-calls
|
|
xlib-types
|
|
xlib-basic)
|
|
(files display))
|
|
|
|
(define-interface xlib-window-interface
|
|
(export window?
|
|
drawable?
|
|
window-display
|
|
create-window
|
|
destroy-window
|
|
change-window-attributes
|
|
get-window-attributes
|
|
map-window
|
|
unmap-window
|
|
|
|
set-window-background-pixmap!
|
|
set-window-background-pixel!
|
|
set-window-border-pixmap!
|
|
set-window-border-pixel!
|
|
set-window-bit-gravity!
|
|
set-window-gravity!
|
|
set-window-backing-store!
|
|
set-window-backing-planes!
|
|
set-window-backing-pixel!
|
|
set-window-save-under!
|
|
set-window-event-mask!
|
|
set-window-do-not-propagate-mask!
|
|
set-window-override-redirect!
|
|
set-window-colormap!
|
|
set-window-cursor!
|
|
|
|
set-window-x!
|
|
set-window-y!
|
|
set-window-width!
|
|
set-window-height!
|
|
set-window-border-width!
|
|
set-window-sibling!
|
|
set-window-stack-mode!
|
|
|
|
window-x
|
|
window-y
|
|
window-width
|
|
window-height
|
|
window-border-width
|
|
window-depth
|
|
window-visual
|
|
window-root
|
|
window-class
|
|
window-bit-gravity
|
|
window-backing-store
|
|
window-backing-planes
|
|
window-backing-pixel
|
|
window-save-under
|
|
window-colormap
|
|
window-map-installed
|
|
window-map-state
|
|
window-all-event-masks
|
|
window-your-event-mask
|
|
window-do-not-propagate-mask
|
|
window-override-redirect
|
|
|
|
destroy-subwindows
|
|
map-subwindows
|
|
unmap-subwindows
|
|
circulate-subwindows
|
|
|
|
clear-window
|
|
raise-window
|
|
lower-window
|
|
restack-windows
|
|
query-tree
|
|
translate-coordinates
|
|
query-pointer
|
|
))
|
|
|
|
(define-structure xlib-window xlib-window-interface
|
|
(open scsh
|
|
scheme
|
|
external-calls
|
|
xlib-types
|
|
xlib-basic
|
|
; xlib-graphics ;; for clear-window
|
|
)
|
|
(files window))
|
|
|
|
;;; the color-interface
|
|
|
|
(define-interface xlib-color-interface
|
|
(export make-color
|
|
color?
|
|
color-rgb-values
|
|
color-tag ;;??
|
|
color-set-tag!;;??
|
|
query-color
|
|
query-colors
|
|
lookup-color))
|
|
|
|
(define-structure xlib-color xlib-color-interface
|
|
(open scsh
|
|
scheme
|
|
external-calls
|
|
xlib-types
|
|
xlib-basic)
|
|
(files color))
|
|
|
|
;;; the colormap-interface
|
|
|
|
(define-interface xlib-colormap-interface
|
|
(export make-colormap
|
|
colormap?
|
|
free-colormap
|
|
colormap-display
|
|
alloc-color
|
|
alloc-named-color
|
|
))
|
|
|
|
(define-structure xlib-colormap xlib-colormap-interface
|
|
(open scsh
|
|
scheme
|
|
external-calls
|
|
xlib-types
|
|
xlib-basic)
|
|
(files colormap))
|
|
|
|
;;; the pixel-interface
|
|
|
|
(define-interface xlib-pixel-interface
|
|
(open scsh
|
|
scheme
|
|
external-calls
|
|
xlib-types
|
|
xlib-basic)
|
|
(files pixel))
|
|
|
|
(define-structure xlib-pixel xlib-pixel-interface
|
|
(export pixel?
|
|
pixel-value
|
|
black-pixel
|
|
white-pixel
|
|
))
|