diff options
Diffstat (limited to 'wm.scm')
-rw-r--r-- | wm.scm | 30 |
1 files changed, 21 insertions, 9 deletions
@@ -1,6 +1,8 @@ (define-module (wm) #:use-module (system foreign) - #:export (wm-init wm-quit)) + #:export (wm-init + wm-set-configure-notify-handler! + wm-quit)) (define libschewm (dynamic-link "libschewm")) @@ -13,12 +15,22 @@ (dynamic-func name libschewm) args)) +(define c/wm-init + (schewm-func int "wm_init" '())) + (define (wm-init) - (let ((c/wm-init - (schewm-func int "wm_init" '()))) - (int-as-bool (c/wm-init)))) - -(define (wm-quit s) - (let ((c/wm-quit - (schewm-func void "wm_quit" (list '*)))) - (c/wm-quit (string->pointer s)))) + (int-as-bool (c/wm-init))) + +(define wm-quit + (schewm-func void "wm_quit" '())) + +(define c/wm-set-configure-notify-handler + (schewm-func void + "wm_set_configure_notify_handler" + (list '*))) + +(define (wm-set-configure-notify-handler! handler) + (c/wm-set-configure-notify-handler + (procedure->pointer void + handler + (list int16 int16 uint32 uint32)))) |