scx-xft-color-alloc-name
This commit is contained in:
parent
98b492b00d
commit
9edc619ab1
|
@ -141,7 +141,23 @@
|
||||||
(scx-xft-fontset-add-internal xft-fontset xft-pattern))
|
(scx-xft-fontset-add-internal xft-fontset xft-pattern))
|
||||||
|
|
||||||
(define (scx-xft-color-alloc-name display visual colormap name)
|
(define (scx-xft-color-alloc-name display visual colormap name)
|
||||||
(let ((xft-color (scx-xft-color-alloc-name-internal display visual colormap name)))
|
(call-with-values
|
||||||
|
(lambda ()
|
||||||
|
(apply values
|
||||||
|
(scx-xft-color-alloc-name-internal display visual colormap name)))
|
||||||
|
(lambda (success? xft-color)
|
||||||
|
(if success?
|
||||||
|
(begin
|
||||||
|
(set-xft-color-display! xft-color display)
|
||||||
|
(set-xft-color-visual! xft-color visual)
|
||||||
|
(set-xft-color-colormap! xft-color colormap)
|
||||||
|
(add-finalizer! xft-color xft-color-finalizer)
|
||||||
|
xft-color)
|
||||||
|
;;; FIXME: raise error
|
||||||
|
#f))))
|
||||||
|
|
||||||
|
(define (scx-xft-color-alloc-value display visual colormap xrendercolor)
|
||||||
|
(let ((xft-color (scx-xft-color-alloc-value-internal display visual colormap xrendercolor)))
|
||||||
(set-xft-color-display! xft-color display)
|
(set-xft-color-display! xft-color display)
|
||||||
(set-xft-color-visual! xft-color visual)
|
(set-xft-color-visual! xft-color visual)
|
||||||
(set-xft-color-colormap! xft-color colormap)
|
(set-xft-color-colormap! xft-color colormap)
|
||||||
|
@ -301,6 +317,10 @@
|
||||||
(display visual colormap name)
|
(display visual colormap name)
|
||||||
"scx_XftColorAllocName")
|
"scx_XftColorAllocName")
|
||||||
|
|
||||||
|
(import-lambda-definition scx-xft-color-alloc-value-internal
|
||||||
|
(display visual colormap xrendercolor)
|
||||||
|
"scx_XftColorAllocValue")
|
||||||
|
|
||||||
(import-lambda-definition scx-xft-color-free
|
(import-lambda-definition scx-xft-color-free
|
||||||
(display visual colormap xft-color)
|
(display visual colormap xft-color)
|
||||||
"scx_XftColorFree")
|
"scx_XftColorFree")
|
||||||
|
|
Loading…
Reference in New Issue