From 6f54084c0ee63f4b341f8f92efbc8b82d3dfa224 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Thu, 8 Dec 2022 18:25:18 +0100 Subject: Working example with keybindings done from Scheme. * main.scm: Added utility and keybinding calls * wm.scm: Added necessary bindings to C code * schewm.c: Some utility functions for grabbing keys --- wm.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'wm.scm') diff --git a/wm.scm b/wm.scm index 3241d94..4609ea9 100644 --- a/wm.scm +++ b/wm.scm @@ -1,7 +1,11 @@ (define-module (wm) #:use-module (system foreign) #:export (wm-init + key-from-str + wm-grab-key-with-mod + wm-grab-key-with-mod-shift wm-set-key-press-handler! + wm-focus-next wm-run wm-quit)) @@ -36,6 +40,17 @@ (define wm-run (schewm-func void "wm_run" '())) +(define wm-grab-key-with-mod + (schewm-func void "wm_grab_key_with_mod" + (list uint32))) + +(define wm-grab-key-with-mod-shift + (schewm-func void "wm_grab_key_with_mod_shift" + (list uint32))) + +(define (wm-focus-next) + '()) + (define c/wm-set-key-press-handler (schewm-func void "wm_set_key_press_handler" -- cgit v1.2.3