scx/scheme/xlib/xlib-interfaces.scm

495 lines
9.9 KiB
Scheme

(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-default-visual
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
check-screen-number ;; for internal use (e.g. by client.scm)
))
(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-interface xlib-drawable-interface
(export drawable?
drawable-root
drawable-x
drawable-y
drawable-width
drawable-height
drawable-border-width
drawable-depth))
(define-interface xlib-color-interface
(export make-color
color?
color-rgb-values
query-color
query-colors
lookup-color))
(define-interface xlib-colormap-interface
(export make-colormap
colormap?
free-colormap
colormap-display
alloc-color!
alloc-named-color
parse-color
alloc-color-cells
set-color-cell
set-color-cells
create-colormap
copy-colormap-and-free
))
(define-interface xlib-pixel-interface
(export pixel?
pixel-value
black-pixel
white-pixel
))
(define-interface xlib-gcontext-interface
(export gcontext?
gcontext-display
create-gcontext
copy-gcontext
free-gcontext
query-best-size
query-best-cursor
query-best-tile
query-best-stipple
gcontext-function
gcontext-plane-mask
gcontext-foreground
gcontext-background
gcontext-line-width
gcontext-line-style
gcontext-cap-style
gcontext-join-style
gcontext-fill-style
gcontext-fill-rule
gcontext-arc-mode
gcontext-tile
gcontext-stipple
gcontext-ts-x
gcontext-ts-y
gcontext-font
gcontext-subwindow-mode
gcontext-exposures
gcontext-clip-x
gcontext-clip-y
gcontext-clip-mask
gcontext-dash-offset
gcontext-dashes
set-gcontext-function!
set-gcontext-plane-mask!
set-gcontext-foreground!
set-gcontext-background!
set-gcontext-line-width!
set-gcontext-line-style!
set-gcontext-cap-style!
set-gcontext-join-style!
set-gcontext-fill-style!
set-gcontext-fill-rule!
set-gcontext-arc-mode!
set-gcontext-tile!
set-gcontext-stipple!
set-gcontext-ts-x!
set-gcontext-ts-y!
set-gcontext-font!
set-gcontext-subwindow-mode!
set-gcontext-exposures!
set-gcontext-clip-x!
set-gcontext-clip-y!
set-gcontext-clip-mask!
set-gcontext-dash-offset!
set-gcontext-clip-rectangles!
set-gcontext-dashlist!
))
(define-interface xlib-graphics-interface
(export clear-area
copy-area
copy-plane
draw-point
draw-points
draw-line
draw-lines
draw-segments
draw-rectangle
draw-rectangles
fill-rectangle
fill-rectangles
draw-arc
fill-arc
draw-arcs
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
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
create-pixmap
create-bitmap-from-data
create-pixmap-from-bitmap-data
read-bitmap-file
write-bitmap-file))
(define-interface xlib-event-interface
(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!
))
(define-interface xlib-key-interface
(export display-min-keycode
display-max-keycode
display-keysyms-per-keycode
string->keysym
keysym->string
keycode->keysym
keysym->keycode
lookup-string
rebind-keysym
refresh-keyboard-mapping))
(define-interface xlib-error-interface
(export x-error-handler
x-fatal-error-handler))
(define-interface xlib-extension-interface
(export list-extensions
query-extension))
(define-interface xlib-utility-interface
(export xlib-release-4-or-later?
xlib-release-5-or-later?
xlib-release-6-or-later?
get-default
resource-manager-string
parse-geometry
store-buffer
fetch-buffer
fetch-bytes
rotate-buffers))
(define-interface xlib-grab-interface
(export grab-pointer
ungrab-pointer
grab-button
ungrab-button
change-active-pointer-grab
grab-keyboard
ungrab-keyboard
grab-key
ungrab-key
allow-events
grab-server
ungrab-server
;; syntax: with-server-grabbed
))
(define-interface xlib-visual-interface
(export visual?
get-visual-info
visual-id
match-visual-info
))
(define-interface xlib-region-interface
(export region?
destroy-region
create-region
clip-box
region-empty?
region-equal?
point-in-region?
rectangle-in-region?
intersect-region
union-region
union-rectangle-with-region
subtract-region
xor-region
offset-region!
shrink-region!
polygon-region
set-region
copy-region!
duplicate-region
offset-region
shrink-region))
;; all together
(define-interface xlib-interface
(compound-interface xlib-display-interface
xlib-pixmap-interface
xlib-window-interface
xlib-drawable-interface
xlib-color-interface
xlib-colormap-interface
xlib-pixel-interface
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
xlib-key-interface
xlib-error-interface
xlib-extension-interface
xlib-utility-interface
xlib-grab-interface
xlib-visual-interface
xlib-region-interface
))