scx/scheme/xlib/xlib-interfaces.scm

923 lines
21 KiB
Scheme

(define-interface xlib-display-interface
(export open-display
display-default-root-window
display-root-window
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
display-list-depths
display-list-pixmap-formats
synchronize
display-select-input
check-screen-number ;; for internal use (e.g. by client.scm)
))
(define-interface xlib-window-interface
(export create-window
create-simple-window
window-exists?
change-window-attributes
get-window-attributes
map-window
unmap-window
change-window-attributes
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!
configure-window
set-window-x!
set-window-y!
set-window-width!
set-window-height!
set-window-border-width!
set-window-sibling!
set-window-stack-mode!
get-window-attributes
window-x
window-y
window-width
window-height
window-border-width
window-depth
window-visual
window-root
window-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
window-mapped? window-viewable? window-unviewable?
destroy-subwindows
map-subwindows
unmap-subwindows
circulate-subwindows
clear-window
raise-window
lower-window
restack-windows
query-tree window-root window-parent window-children
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-rgb-values
query-color
query-colors
lookup-color))
(define-interface xlib-colormap-interface
(export create-colormap
special-colormap:none
((colormap-alloc) :syntax)
alloc-color!
query/alloc-named-color
alloc-named-color
parse-color
alloc-color-cells
store-color
store-colors
copy-colormap-and-free))
(define-interface xlib-pixel-interface
(export pixel-value
black-pixel
white-pixel))
(define-interface xlib-gcontext-interface
(export create-gcontext
copy-gcontext
copy-gcontext!
((gc-value gc-value-set make-gc-value-alist) :syntax)
make-gc-value-set
query-best-cursor
query-best-tile
query-best-stipple
get-gcontext-values
((gc-function line-style cap-style join-style fill-style
subwindow-mode arc-mode rectangle-ordering) :syntax)
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-origin
gcontext-ts-y-origin
gcontext-font
gcontext-subwindow-mode
gcontext-graphics-exposures
gcontext-clip-x-origin
gcontext-clip-y-origin
gcontext-clip-mask
gcontext-dash-offset
gcontext-dash-list
change-gcontext
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-origin!
set-gcontext-ts-y-origin!
set-gcontext-font!
set-gcontext-subwindow-mode!
set-gcontext-graphics-exposures!
set-gcontext-clip-x-origin!
set-gcontext-clip-y-origin!
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
((polygon-shape) :syntax)
fill-polygon
rect bounds
rect-x rect-y rect-width rect-height
set-rect-x! set-rect-y! set-rect-width! set-rect-height!
grow-rect move/resize-rect
points->segments))
(define-interface xlib-font-interface
(export 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 create-pixmap
create-bitmap-from-data
create-pixmap-from-bitmap-data
read-bitmap-file
write-bitmap-file
special-pixmap:none special-pixmap:copy-from-parent
special-pixmap:parent-relative))
(define-interface xlib-event-internal-interface
(export next-event
peek-event
event-ready?
events-pending
events-queued
((queued-mode) :syntax)))
(define-interface xlib-sync-x-events-interface
(export sync-x-event-event
most-recent-sync-x-event
with-sync-x-events
next-sync-x-event))
(define-interface xlib-event-interface
(export
wait-event
send-event
((event-type) :syntax)
any-event-type
any-event-serial
any-event-send-event?
any-event-display
any-event-window
create-key-event
key-event?
key-event-type
key-event-serial
key-event-send-event?
key-event-display
key-event-window
key-event-root
key-event-subwindow
key-event-time
key-event-x
key-event-y
key-event-x-root
key-event-y-root
key-event-state
key-event-keycode
key-event-same-screen?
create-button-event
button-event?
button-event-type
button-event-serial
button-event-send-event?
button-event-display
button-event-window
button-event-root
button-event-subwindow
button-event-time
button-event-x
button-event-y
button-event-x-root
button-event-y-root
button-event-state
button-event-button
button-event-same-screen?
create-motion-event
motion-event?
motion-event-type
motion-event-serial
motion-event-send-event?
motion-event-display
motion-event-window
motion-event-root
motion-event-subwindow
motion-event-time
motion-event-x
motion-event-y
motion-event-x-root
motion-event-y-root
motion-event-state
motion-event-is-hint?
motion-event-same-screen?
create-crossing-event
crossing-event?
crossing-event-type
crossing-event-serial
crossing-event-send-event?
crossing-event-display
crossing-event-window
crossing-event-root
crossing-event-subwindow
crossing-event-time
crossing-event-x
crossing-event-y
crossing-event-x-root
crossing-event-y-root
crossing-event-mode
crossing-event-detail
crossing-event-same-screen?
crossing-event-focus?
crossing-event-state
create-focus-change-event
focus-change-event?
focus-change-event-type
focus-change-event-serial
focus-change-event-send-event?
focus-change-event-display
focus-change-event-window
focus-change-event-mode
focus-change-event-detail
create-expose-event
expose-event?
expose-event-type
expose-event-serial
expose-event-send-event?
expose-event-display
expose-event-window
expose-event-x
expose-event-y
expose-event-width
expose-event-height
expose-event-count
create-graphics-expose-event
graphics-expose-event?
graphics-expose-event-type
graphics-expose-event-serial
graphics-expose-event-send-event?
graphics-expose-event-display
graphics-expose-event-drawable
graphics-expose-event-x
graphics-expose-event-y
graphics-expose-event-width
graphics-expose-event-height
graphics-expose-event-major-code
graphics-expose-event-minor-code
create-no-expose-event
no-expose-event?
no-expose-event-type
no-expose-event-serial
no-expose-event-send-event?
no-expose-event-display
no-expose-event-drawable
no-expose-event-major-code
no-expose-event-minor-code
create-visibility-event
visibility-event?
visibility-event-type
visibility-event-serial
visibility-event-send-event?
visibility-event-display
visibility-event-window
visibility-event-state
create-create-window-event
create-window-event?
create-window-event-type
create-window-event-serial
create-window-event-send-event?
create-window-event-display
create-window-event-parent
create-window-event-window
create-window-event-x
create-window-event-y
create-window-event-width
create-window-event-height
create-window-event-border-width
create-window-event-override-redirect?
create-destroy-window-event
destroy-window-event?
destroy-window-event-type
destroy-window-event-serial
destroy-window-event-send-event?
destroy-window-event-display
destroy-window-event-event
destroy-window-event-window
create-unmap-event
unmap-event?
unmap-event-type
unmap-event-serial
unmap-event-send-event?
unmap-event-display
unmap-event-event
unmap-event-window
unmap-event-from-configure?
create-map-event
map-event?
map-event-type
map-event-serial
map-event-send-event?
map-event-display
map-event-event
map-event-window
map-event-override-redirect?
create-map-request-event
map-request-event?
map-request-event-type
map-request-event-serial
map-request-event-send-event?
map-request-event-display
map-request-event-parent
map-request-event-window
create-reparent-event
reparent-event?
reparent-event-type
reparent-event-serial
reparent-event-send-event?
reparent-event-display
reparent-event-event
reparent-event-window
reparent-event-parent
reparent-event-x
reparent-event-y
reparent-event-override-redirect?
create-configure-event
configure-event?
configure-event-type
configure-event-serial
configure-event-send-event?
configure-event-display
configure-event-event
configure-event-window
configure-event-x
configure-event-y
configure-event-width
configure-event-height
configure-event-border-width
configure-event-above
configure-event-override-redirect?
create-gravity-event
gravity-event?
gravity-event-type
gravity-event-serial
gravity-event-send-event?
gravity-event-display
gravity-event-event
gravity-event-window
gravity-event-x
gravity-event-y
create-resize-request-event
resize-request-event?
resize-request-event-type
resize-request-event-serial
resize-request-event-send-event?
resize-request-event-display
resize-request-event-window
resize-request-event-width
resize-request-event-height
create-configure-request-event
configure-request-event?
configure-request-event-type
configure-request-event-serial
configure-request-event-send-event?
configure-request-event-display
configure-request-event-parent
configure-request-event-window
configure-request-event-window-change-alist
create-circulate-event
circulate-event?
circulate-event-type
circulate-event-serial
circulate-event-send-event?
circulate-event-display
circulate-event-event
circulate-event-window
circulate-event-place
create-circulate-request-event
circulate-request-event?
circulate-request-event-type
circulate-request-event-serial
circulate-request-event-send-event?
circulate-request-event-display
circulate-request-event-parent
circulate-request-event-window
circulate-request-event-place
create-property-event
property-event?
property-event-type
property-event-serial
property-event-send-event?
property-event-display
property-event-window
property-event-atom
property-event-time
property-event-state
create-selection-clear-event
selection-clear-event?
selection-clear-event-type
selection-clear-event-serial
selection-clear-event-send-event?
selection-clear-event-display
selection-clear-event-window
selection-clear-event-selection
selection-clear-event-time
create-selection-request-event
selection-request-event?
selection-request-event-type
selection-request-event-serial
selection-request-event-send-event?
selection-request-event-display
selection-request-event-owner
selection-request-event-requestor
selection-request-event-selection
selection-request-event-target
selection-request-event-property
selection-request-event-time
create-selection-event
selection-event?
selection-event-type
selection-event-serial
selection-event-send-event?
selection-event-display
selection-event-requestor
selection-event-selection
selection-event-target
selection-event-property
selection-event-time
create-colormap-event
colormap-event?
colormap-event-type
colormap-event-serial
colormap-event-send-event?
colormap-event-display
colormap-event-window
colormap-event-colormap
colormap-event-new?
colormap-event-state
create-client-message-event
client-message-event?
client-message-event-type
client-message-event-serial
client-message-event-send-event?
client-message-event-display
client-message-event-window
client-message-event-message-type
client-message-event-format
client-message-event-data
create-mapping-event
mapping-event?
mapping-event-type
mapping-event-serial
mapping-event-send-event?
mapping-event-display
mapping-event-window
mapping-event-request
mapping-event-first-keycode
mapping-event-count
create-keymap-event
keymap-event?
keymap-event-type
keymap-event-serial
keymap-event-send-event?
keymap-event-display
keymap-event-bit-vector
))
(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 find-atom
atom-name
list-properties
get-property-extended get-property
get-string-property get-window-property
change-property change-string-property
((change-property-mode) :syntax)
delete-property
rotate-properties
set-selection-owner!
selection-owner
convert-selection))
(define-interface xlib-cursor-interface
(export create-pixmap-cursor
special-cursor:none
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
((revert-to save-set close-down-mode) :syntax)
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!
get-wm-protocols
set-wm-protocols!
get-wm-name
set-wm-name!
get-wm-icon-name
set-wm-icon-name!
get-wm-client-machine
set-wm-client-machine!
get-wm-class
set-wm-class!
get-wm-command
set-wm-command!
get-transient-for
set-transient-for!
((wm-hint size-hint initial-state
make-wm-hint-alist
make-size-hint-alist) :syntax)
get-wm-normal-hints
set-wm-normal-hints!
get-wm-hints
set-wm-hints!
get-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-display
x-error-ser-num
x-error-code
x-error-major-opcode
x-error-minor-opcode
x-error-res-id
x-error-text
most-recent-x-error
next-x-error
x-fatal-error-handler
((error-code) :syntax)))
(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
((grab-status allow-event grab-mode) :syntax)
;; syntax: with-server-grabbed
))
(define-interface xlib-visual-interface
(export get-visual-info
visual-id
match-visual-info
((visual-info visual-class window-class
make-visual-info-alist bit-order byte-order) :syntax)
))
(define-interface xlib-region-interface
(export 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-types-interface
;; a subset of xlib-internal-types-interface
(export
display? display-after-function
display-set-after-function! close-display
special-time:current-time
window? destroy-window window-display
window-tag window-set-tag!
special-window:none special-window:pointer-window
special-window:input-focus special-window:pointer-root
drawable? drawable-display
color?
colormap? free-colormap colormap-display
pixel?
gcontext? free-gcontext gcontext? gcontext-display
special-gcontext:none
pixmap? free-pixmap pixmap-display
font? font-display font-name open-font close-font
special-font:none
atom? make-atom intern-atom special-atom:none
cursor? cursor-display free-cursor
visual?
region? destroy-region
((event-mask) :syntax)
event-mask-all-events
((state state-set button notify-mode notify-detail
visibility-state place property-state colormap-state
mapping-request bit-gravity gravity) :syntax)
((set-window-attribute window-change stack-mode
window-attribute map-state
make-set-window-attribute-alist
make-window-attribute-alist
make-window-change-alist) :syntax)
((fill-rule) :syntax)
))
(define-interface xlib-interface
(compound-interface xlib-types-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
xlib-sync-x-events-interface
))