This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
I’m looking at the diagram and trying to follow along in the code but am not sure how the view gets supplied to the event function
It's currently more of an implementation detail , but passing the view to the event function is the responsibility of the "graphics backend"/"toolkit". Using the skia backend as an example, the mouse-button-callback calls the event function https://github.com/phronmophobic/membrane/blob/88afb37cda16ea343b2ec3b9790ee15896f4993d/src/membrane/skia.clj#L1656. The callback is setup when the window is created https://github.com/phronmophobic/membrane/blob/88afb37cda16ea343b2ec3b9790ee15896f4993d/src/membrane/skia.clj#L2127C7-L2127C7. In the future, I'd like to provide better support for creating new backends and simplifying existing backends.
Thanks. So do the backends “diff” from repaint to repaint or do they just redraw the whole render target every repaint?
There’s currently no diffing. There are some instances where paints are cached. Mainly, I haven’t implemented any diffing because it hasn’t been necessary. There are a lot of cool drawing optimizations that are possible, but repainting hasn’t been a bottleneck so I’ve been focusing on other things.
One cool idea is that a lot of the drawing optimizations should be portable across backends.
right, right. this is fascinating work. unlike with re-frame (which I agree is great) I find myself reading your whole src
Hopefully, it's not too messy! I really wish I could spend more time on each individual piece, but just making a simple todo app requires quite a few different pieces. I tried really hard to reuse existing UI related libraries, but many of them are highly coupled to specific frameworks.