diff options
Diffstat (limited to 'wm.scm')
-rw-r--r-- | wm.scm | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -4,6 +4,7 @@ #:use-module (system foreign) #:export (wm-init make-config + wm-reconfigure make-key make-shift-key wm-grab-keys @@ -88,6 +89,42 @@ (define wm-run (schewm-func void "wm_run" '())) +(define c/parse-color + (schewm-func uint32 "parse_color" (list '*))) + +(define (parse-color s) + (c/parse-color (string->pointer s))) + +(define c/wm-reconfigure + (schewm-func void + "wm_reconfigure" + (list uint16 + uint16 + uint16 + int16 + int16 + uint16 + uint16 + uint32 + uint32 + uint32 + uint32 + uint32))) + +(define (wm-reconfigure config) + (c/wm-reconfigure (config-inner-border-width config) + (config-outer-border-width config) + (config-magnet-border-width config) + (config-offset-x config) + (config-offset-y config) + (config-offset-width config) + (config-offset-height config) + (parse-color (config-focused-color config)) + (parse-color (config-unfocused-color config)) + (parse-color (config-unkillable-color config)) + (parse-color (config-empty-color config)) + (parse-color (config-outer-color config)))) + (define wm-focus-prev (schewm-func void "wm_focus_prev" '())) |