summaryrefslogtreecommitdiff
path: root/git@git.nihil.ws:schewm
diff options
context:
space:
mode:
authorSamuel Fadel <samuel@nihil.ws>2022-12-16 22:46:23 +0100
committerSamuel Fadel <samuel@nihil.ws>2022-12-16 22:46:23 +0100
commit8028b2b02ae5a302c7781fdd958be6fbf3bc2445 (patch)
treec29ee034abbd2eda2361fd45a2392a1d65ffc01f /git@git.nihil.ws:schewm
parent99b00bcb3b2803bde4d24f9273a6b81909df5f47 (diff)
A working callback mechanism between C and Scheme code.
Callbacks can be fully setup via Scheme code; the C code assumes callbacks have no args and return no values. Within Scheme we setup callbacks via some lambda functions that capture args when needed (see make-callback example). Key press handler operates on the C side using a hash map to find the callback to be called. Everything is set up on the Scheme side, which is less verbose and more convenient to read. * main.scm: Setup callbacks for keypresses * schewm.c: Callbacks hash maps for keys and buttons, handlers for keys * wm.scm: Minor reorganization (key grab also now takes the callback directly)
Diffstat (limited to 'git@git.nihil.ws:schewm')
0 files changed, 0 insertions, 0 deletions