Re: Should I port my custom UI toolkit to Wayland or GTK/QT?
Hi, On Sun, Oct 31, 2021, 20:16 Brad Robinson wrote: > Hi Igor, > > Thanks for taking the time to answer. > > It sounds like you're suggesting porting the application to a new toolkit > rather than updating the toolkit? > IIUC, you application does not use any cross-platform toolkit - i.e. it uses Win32/MFC on Windows and Carbon/Cocoa on OSX. Unfortunately both are not available on *nix. It would, of course be nice to use something cross-platform in the beginning, but... And yes - my suggestion is to use the cross-platform library and port your application to it. Using low level API for a high level tasl - it is not really feasible. Especially, since wayland API is still changing. And there too many systems on the market, which use X11 protocol. As mentioned, that's not really feasible as I have literally hundreds of > screens that would need to be ported. Porting my existing toolkit - either > directly to X11, Wayland or by leveraging an existing toolkit seems an > easier option. > This is the solution I'm talking about - use GTK, QT or wxWidgets and forget about wayland, x11 or any other low-level things. > Would you say the same about AvaloniaUI... that instead of porting > Avalonia, every app that uses it should move to a new toolkit? > I don't know anything about that. Thank you > Brad > > On Sat, Oct 30, 2021 at 3:07 PM Igor Korot wrote: > >> Hi, >> >> On Fri, Oct 29, 2021 at 6:59 PM Brad Robinson >> 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 requi
Re: Should I port my custom UI toolkit to Wayland or GTK/QT?
Sorry, reply using the wrong email. It was for Brad, not Igor. Best regards, Diego ‐‐‐ Original Message ‐‐‐ On Monday, November 1st, 2021 at 1:45 AM, Diego Hernan Borghetti wrote: > Hi Igor, > > Moving or upgrading depends on the resource and requirements that you have. > Sometimes is better to use a toolkit, and others not. > > Even using a toolkit will add overhead to your app. What happens when there > is a new version? (Gtk 2, 3, 4. Qt 4, 5, 6, etc) How complex is your > application? > > If you think porting your toolkit is better in the long run, go for it. > Another option is to look into using something like glfw or similar. > > At the end of the day is how much of the system you want to own and maintain. > > Best regards, > Diego > > ‐‐‐ Original Message ‐‐‐ > On Monday, November 1st, 2021 at 1:16 AM, Brad Robinson > wrote: > >> Hi Igor, >> >> Thanks for taking the time to answer. >> >> It sounds like you're suggesting porting the application to a new toolkit >> rather than updating the toolkit? As mentioned, that's not really feasible >> as I have literally hundreds of screens that would need to be ported. >> Porting my existing toolkit - either directly to X11, Wayland or by >> leveraging an existing toolkit seems an easier option. >> >> Would you say the same about AvaloniaUI... that instead of porting Avalonia, >> every app that uses it should move to a new toolkit? >> >> Brad >> >> On Sat, Oct 30, 2021 at 3:07 PM Igor Korot wrote: >> >>> Hi, >>> >>> On Fri, Oct 29, 2021 at 6:59 PM Brad Robinson >>> 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 d
Re: Should I port my custom UI toolkit to Wayland or GTK/QT?
Hi Igor, Moving or upgrading depends on the resource and requirements that you have. Sometimes is better to use a toolkit, and others not. Even using a toolkit will add overhead to your app. What happens when there is a new version? (Gtk 2, 3, 4. Qt 4, 5, 6, etc) How complex is your application? If you think porting your toolkit is better in the long run, go for it. Another option is to look into using something like glfw or similar. At the end of the day is how much of the system you want to own and maintain. Best regards, Diego ‐‐‐ Original Message ‐‐‐ On Monday, November 1st, 2021 at 1:16 AM, Brad Robinson wrote: > Hi Igor, > > Thanks for taking the time to answer. > > It sounds like you're suggesting porting the application to a new toolkit > rather than updating the toolkit? As mentioned, that's not really feasible as > I have literally hundreds of screens that would need to be ported. Porting my > existing toolkit - either directly to X11, Wayland or by leveraging an > existing toolkit seems an easier option. > > Would you say the same about AvaloniaUI... that instead of porting Avalonia, > every app that uses it should move to a new toolkit? > > Brad > > On Sat, Oct 30, 2021 at 3:07 PM Igor Korot wrote: > >> Hi, >> >> On Fri, Oct 29, 2021 at 6:59 PM Brad Robinson >> 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 supp
Re: Should I port my custom UI toolkit to Wayland or GTK/QT?
Hi Dorota, Thanks for the info... I wasn't aware of that text input protocol, that sounds very promising - hopefully they make good progress with that. Brad On Sat, Oct 30, 2021 at 7:24 PM Dorota Czaplejewicz < dorota.czaplejew...@puri.sm> wrote: > Hi Brad, > > On Sat, 30 Oct 2021 10:58:59 +1100 > Brad Robinson wrote: > > > 2. Are there options for IME and Accessibility for pure Wayland apps? > > Yes, there are at least 2 approaches: > > - embed the IME in your application, like GNOME/Mutter seems to be doing > (I'm not super acquainted with that) > - use the text-input and related protocols. They are still far from > perfect or complete, but they have some momentum. > > > https://gitlab.freedesktop.org/wayland/wayland-protocols/-/tree/wip/text-input-next > (also see the countless issues and merge requests in the same repo). > > Cheers, > Dorota >
Re: Should I port my custom UI toolkit to Wayland or GTK/QT?
Hi Igor, Thanks for taking the time to answer. It sounds like you're suggesting porting the application to a new toolkit rather than updating the toolkit? As mentioned, that's not really feasible as I have literally hundreds of screens that would need to be ported. Porting my existing toolkit - either directly to X11, Wayland or by leveraging an existing toolkit seems an easier option. Would you say the same about AvaloniaUI... that instead of porting Avalonia, every app that uses it should move to a new toolkit? Brad On Sat, Oct 30, 2021 at 3:07 PM Igor Korot wrote: > Hi, > > On Fri, Oct 29, 2021 at 6:59 PM Brad Robinson > 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 > > >
Re: Should I port my custom UI toolkit to Wayland or GTK/QT?
Hi Brad, On Sat, 30 Oct 2021 10:58:59 +1100 Brad Robinson wrote: > 2. Are there options for IME and Accessibility for pure Wayland apps? Yes, there are at least 2 approaches: - embed the IME in your application, like GNOME/Mutter seems to be doing (I'm not super acquainted with that) - use the text-input and related protocols. They are still far from perfect or complete, but they have some momentum. https://gitlab.freedesktop.org/wayland/wayland-protocols/-/tree/wip/text-input-next (also see the countless issues and merge requests in the same repo). Cheers, Dorota pgpocTi2khQ_z.pgp Description: OpenPGP digital signature
Re: Should I port my custom UI toolkit to Wayland or GTK/QT?
Hi, On Fri, Oct 29, 2021 at 6:59 PM Brad Robinson 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 >