figuro icon indicating copy to clipboard operation
figuro copied to clipboard

Siwin backend improvements

Open xTrayambak opened this issue 6 months ago • 4 comments

Hiya, I saw that you've implemented a Siwin backend. It doesn't compile yet though (as it's mostly a skeleton, as you mentioned).

This PR aims to add a proper backend that uses Siwin.

Please don't merge it right now - it's still very much a work in progress!

xTrayambak avatar Jun 04 '25 14:06 xTrayambak

Hiya, I saw that you've implemented a Siwin backend. It doesn't compile yet though (as it's mostly a skeleton, as you mentioned).

Awesome! Nah I've been wanting to add a Siwin backend but figured I'd wait to see what you got. I am planning to start working MacOS support for Siwin which apparently is broken. It'd be nice to default to Siwin in the future.

Also my work on adding the new rendering backend changes the windowing API a bit. It's the same methods, but the objects change a bit and will conflict with this PR. It should be pretty easy to fix though.

elcritch avatar Jun 05 '25 00:06 elcritch

@xTrayambak I'd recommend looking at my PR that refactors the render to be swappable. Also checkout my PR comments I left on the code. That'll save you a lot of headaches.

The swappable renderer in this PR might make it easier to integrate: https://github.com/elcritch/figuro/pull/155/files

The PR makes both a Renderer and a WindowRenderer objects: https://github.com/elcritch/figuro/blob/ef7cfee60f5863064171eb34c5abd7e1ebc3fd14/src/figuro/renderer/utils/baserenderer.nim#L15

I can also modify that PR to make it easier to support Siwin as it's a bit different than Windy/Windex.

Maybe it'll have to be something fun like the window and the renderer having runRenderer methods so the windows library can wrap the renderer calls. Annoying and cumbersome but not too hard.

elcritch avatar Jun 05 '25 01:06 elcritch

Yeah, that seems to make it a bit easier. I'll just wait until you merge that MR, then I'll continue work on this.

xTrayambak avatar Jun 05 '25 03:06 xTrayambak

Yeah, that seems to make it a bit easier. I'll just wait until you merge that MR, then I'll continue work on this.

@xTrayambak I just merged the PR refactoring the renderer.

elcritch avatar Jun 08 '25 06:06 elcritch