go-flutter icon indicating copy to clipboard operation
go-flutter copied to clipboard

Make go-flutter window toolkit agnostic

Open provokateurin opened this issue 3 years ago • 3 comments

For a project I want to use go-flutter as an embedder (think about all the juicy plugins), but I don't want to use glfw as window toolkit. Instead I want to use wayland directly, as the project will only use wayland and customize the surface roles (using wlr-layer-shell to be exact) which is not possible when using glfw.

This will need abstract away a lot of logic to make go-flutter modular. I'm currently relatively unsure on how this should be tackled, but I hope it is possible.

provokateurin avatar Jul 18 '20 14:07 provokateurin

Some references to start work: https://github.com/jwinarske/flutter_wayland https://github.com/dkolbly/wl https://github.com/dkolbly/wl-scanner

provokateurin avatar Jul 18 '20 14:07 provokateurin

An example of an rendered abstraction layer can be found in: https://github.com/fyne-io/fyne/blob/2de50ef4d133ca5e1e8b22dc49e4033e4119ce88/internal/driver/glfw/window.go

pchampio avatar Jul 23 '20 08:07 pchampio

I think I left some comments in the source mentioning possible abstraction of the window toolkit. I didn't do it because there was a lot of work already and adding abstraction would add a lot of complexity without there being a use-case. But that doesn't mean that it can't/shouldn't be done some day. It does require careful design of the abstraction layer though, and it also impacts the build systems quite a bit.

GeertJohan avatar Jul 30 '20 14:07 GeertJohan