Hi, On Fri, Oct 29, 2021 at 6:59 PM Brad Robinson <brobin...@toptensoftware.com> wrote: > > Hey All, > > I have a custom UI toolkit that I initially developed for my music > application over 15 years ago. Currently it runs on Windows and OSX, and I'd > like to port it to Linux. > > The main thing I'm trying to decide is whether to port directly to Wayland or > to a higher level UI toolkit like GTK or QT. Here's what I'm thinking about.
There is no doubt that the UI should be ported to GTK/Qt/wxWidgets. Why do you even ask? Especially since those libraries are capable of being used under both X11 and Wayland. But that not even the main reason. Wayland/X11 is a low-level API where UI doesn't have any business accessing. There is a reason Qt/GTK/wxWidgets libraries exist - to make the cross-platform development nice and smooth. Remember the paradigm: design once - build/run everywhere. Everything else should be irrelevant. Thank you. P.S.: If you do port to wxWidgets you could disregard the Windows/Mac ports. You will have one codebase which will run on all platforms. P.S.S.: Same can be sad for Qt. > > Pros: > > * I really like the elegance of Wayland and think I'd enjoy coding against > it. It seems lightweight and the way of the future for Linux desktop apps. > * I've written a partial, proof of concept C# wrapper for Wayland which seems > to work fine. (my toolkit is written in C#) > * My toolkit already includes implementations of every control/widget I need > (including menus) so I don't need much of what GTK/QT provides. Wayland > seems like a nice fit in this regard. > * Regarding GTK/QT I'm not keen to learn yet another UI API unless I really > have to. I've dabbled with GTK and didn't really like it. I've never used QT > but it seems over the top for my needs and possibly difficult to call from > C#. Wayland seems simple in comparison. > * I use Skia for graphics rendering. So long as I can blit to the screen and > get user input it should port reasonably well. > > Cons: > > * Seems like I might need to implement window decorations myself as I > understand not all Wayland compositors provide this. > * System dialogs - in particular file and folder selection dialogs. I'd need > to either implement these myself or figure out how to invoke GTK/QT versions? > * IME support - I believe this is outside the scope of Wayland. > * Automation/Accessibility - again outside the scope of Wayland. > * OS theme consistency. > > I think all the cons are workable - either I'm happy to put in the work to > get it done (cons 1 and 2) or I can live without if I have to (cons 3 and 4), > or I'm not that fussed about (con 5) > > Other notes: > > * Porting my apps from my toolkit to GTK or QT is out of the question as that > would entail porting literally hundreds of screens, dialogs and widgets. > * I'm a long time Windows developer but I've never done Linux desktop > development. > * I'm not the only one in this boat. The AvaloniaUI project is very similar > to my toolkit and while I can't speak for them, they currently use X11 and I > believe will have similar issues when it comes to Wayland, Accessibility and > IME. > * I'd also really like support for OpenGL. Not a deal breaker but I presume > it's available through Wayland. > * My toolkit is closed source and only used by apps I develop - it's not > likely that it will suddenly have lots of additional requirements placed on > it besides what I'm currently considering. > * I don't have any particular distros that I need to support. If my app only > works on particular distros then so be it. > * It's not urgent and I'm willing to put in the time. > > So, with all that in mind, here's my questions: > > 1. Wayland, GTK or QT? > 2. Are there options for IME and Accessibility for pure Wayland apps? > 3. Assuming I go with Wayland, is there a Linux distro you would recommend > that includes a good, regularly updated, feature rich Wayland compositor. > (Unless there's a compelling reason to, I'd prefer not to have to compile a > compositor myself). > 4. Any other advice - am I neglecting to consider anything obvious? > > Sorry for the long post... much to think about and any advice greatly > appreciated. > > Brad >