Added make-...-alist for enumerated types.
This commit is contained in:
parent
0c538aea77
commit
4ae0c363d4
|
@ -173,6 +173,15 @@
|
|||
(input? initial-state icon-pixmap icon-window icon-position icon-mask
|
||||
window-group urgency))
|
||||
|
||||
(define-syntax make-wm-hint-alist
|
||||
(syntax-rules
|
||||
()
|
||||
((make-wm-hint-alist (attr arg) rest ...)
|
||||
(cons (cons (wm-hint attr) arg)
|
||||
(make-wm-hint-alist rest ...)))
|
||||
((make-wm-hint-alist)
|
||||
'())))
|
||||
|
||||
(define wm-hint-alist->vector
|
||||
(make-enum-alist->vector
|
||||
wm-hints wm-hint-index
|
||||
|
@ -290,6 +299,15 @@
|
|||
(us-position us-size position size min-size max-size resize-inc aspect
|
||||
base-size win-gravity))
|
||||
|
||||
(define-syntax make-size-hint-alist
|
||||
(syntax-rules
|
||||
()
|
||||
((make-size-hint-alist (attr arg) rest ...)
|
||||
(cons (cons (size-hint attr) arg)
|
||||
(make-size-hint-alist rest ...)))
|
||||
((make-size-hint-alist)
|
||||
'())))
|
||||
|
||||
(define size-hint-alist->vector
|
||||
(make-enum-alist->vector
|
||||
size-hints size-hint-index
|
||||
|
|
|
@ -10,6 +10,15 @@
|
|||
font subwindow-mode graphics-exposures clip-x-origin clip-y-origin
|
||||
clip-mask dash-offset dash-list arc-mode))
|
||||
|
||||
(define-syntax make-gc-value-alist
|
||||
(syntax-rules
|
||||
()
|
||||
((make-gc-value-alist (attr arg) rest ...)
|
||||
(cons (cons (gc-value attr) arg)
|
||||
(make-gc-value-alist rest ...)))
|
||||
((make-gc-value-alist)
|
||||
'())))
|
||||
|
||||
(define gc-value-alist->vector
|
||||
(make-enum-alist->vector
|
||||
gc-values gc-value-index
|
||||
|
|
|
@ -23,6 +23,15 @@
|
|||
(visual visual-id screen depth class red-mask green-mask blue-mask
|
||||
colormap-size bits-per-rgp))
|
||||
|
||||
(define-syntax make-visual-info-alist
|
||||
(syntax-rules
|
||||
()
|
||||
((make-visual-info-alist (attr arg) rest ...)
|
||||
(cons (cons (visual-info attr) arg)
|
||||
(make-visual-info-alist rest ...)))
|
||||
((make-visual-info-alist)
|
||||
'())))
|
||||
|
||||
(define visual-info-alist->vector
|
||||
(make-enum-alist->vector
|
||||
visual-infos visual-info-index
|
||||
|
|
|
@ -68,6 +68,15 @@
|
|||
override-redirect save-under event-mask do-not-propagate-mask colormap
|
||||
cursor))
|
||||
|
||||
(define-syntax make-set-window-attribute-alist
|
||||
(syntax-rules
|
||||
()
|
||||
((make-set-window-attribute-alist (attr arg) rest ...)
|
||||
(cons (cons (set-window-attribute attr) arg)
|
||||
(make-set-window-attribute-alist rest ...)))
|
||||
((make-set-window-attribute-alist)
|
||||
'())))
|
||||
|
||||
(define set-window-attribute-alist->vector
|
||||
(make-enum-alist->vector
|
||||
set-window-attributes set-window-attribute-index
|
||||
|
@ -185,6 +194,15 @@
|
|||
; 'top-if, 'buttom-if and 'opposite.
|
||||
(x y width height border-width sibling stack-mode))
|
||||
|
||||
(define-syntax make-window-change-alist
|
||||
(syntax-rules
|
||||
()
|
||||
((make-window-change-alist (attr arg) rest ...)
|
||||
(cons (cons (window-change attr) arg)
|
||||
(make-window-change-alist rest ...)))
|
||||
((make-window-change-alist)
|
||||
'())))
|
||||
|
||||
(define window-change-alist->vector
|
||||
(make-enum-alist->vector
|
||||
window-changes window-change-index
|
||||
|
@ -235,6 +253,15 @@
|
|||
colormap map-installed map-state all-event-masks your-event-mask
|
||||
do-not-propagate-mask override-redirect screen))
|
||||
|
||||
(define-syntax make-window-attribute-alist
|
||||
(syntax-rules
|
||||
()
|
||||
((make-window-attribute-alist (attr arg) rest ...)
|
||||
(cons (cons (window-attribute attr) arg)
|
||||
(make-window-attribute-alist rest ...)))
|
||||
((make-window-attribute-alist)
|
||||
'())))
|
||||
|
||||
(define vector->window-attribute-alist
|
||||
(make-vector->enum-alist
|
||||
window-attributes
|
||||
|
|
|
@ -56,7 +56,12 @@
|
|||
map-window
|
||||
unmap-window
|
||||
|
||||
((set-window-attribute window-attribute window-change) :syntax)
|
||||
((set-window-attribute
|
||||
window-attribute
|
||||
window-change
|
||||
make-set-window-attribute-alist
|
||||
make-window-attribute-alist
|
||||
make-window-change-alist) :syntax)
|
||||
window-change-alist->vector ; has to be exported for client.scm
|
||||
|
||||
set-window-background-pixmap!
|
||||
|
@ -169,7 +174,7 @@
|
|||
copy-gcontext!
|
||||
free-gcontext
|
||||
|
||||
((gc-value) :syntax)
|
||||
((gc-value make-gc-value-alist) :syntax)
|
||||
|
||||
query-best-size
|
||||
query-best-cursor
|
||||
|
@ -394,7 +399,10 @@
|
|||
set-transient-for!
|
||||
get-wm-normal-hints
|
||||
set-wm-normal-hints!
|
||||
((wm-hint size-hint) :syntax) ;; should be replaced by make-*-hint-alist
|
||||
((wm-hint
|
||||
size-hint
|
||||
make-wm-hint-alist
|
||||
make-size-hint-alist) :syntax)
|
||||
get-wm-hints
|
||||
set-wm-hints!
|
||||
get-icon-sizes
|
||||
|
@ -462,6 +470,7 @@
|
|||
get-visual-info
|
||||
visual-id
|
||||
match-visual-info
|
||||
(make-visual-info-alist :syntax)
|
||||
))
|
||||
|
||||
(define-interface xlib-region-interface
|
||||
|
|
Loading…
Reference in New Issue