Why not make a pure C wrapper around wxWidgets ? It use native controls too and it's not hard to make C call C++ code.
Libui: GUI library in C
81–90 of 186 posts
Re: Libui: GUI library in C
#82This is a very good approach for the current times! As far as I understand from the source code, libui is a thin C wrapper that makes calls to each platform native ui framework. For instance, to create a window on OSX it calls the corresponding Cocoa function, for Linux the corresponding GTK function, etc. So, unlike Qt and GTK which are heavy cross-platform libraries because they can "draw" their own widgets themsel…
> [...] GTK is perfectly fine for Linux. This is great news, so now it is the best time to make thin wrappers around these stable things so that we can all go make useful software.. Hoping not to start any kind of framework quarrel, but my understanding was that quite many applications (such as Wireshark, Subsurface, and OpenShot) are moving from GTK to Qt very much due to Qt being more stable. Or is the main reason…
Was surprised to hear that even Linus got sick of dealing with GTK and ported Subsurface to Qt, but that's how it is.
Re: Libui: GUI library in C
#83This is a very good approach for the current times! As far as I understand from the source code, libui is a thin C wrapper that makes calls to each platform native ui framework. For instance, to create a window on OSX it calls the corresponding Cocoa function, for Linux the corresponding GTK function, etc. So, unlike Qt and GTK which are heavy cross-platform libraries because they can "draw" their own widgets themsel…
> [...] GTK is perfectly fine for Linux. This is great news, so now it is the best time to make thin wrappers around these stable things so that we can all go make useful software.. Hoping not to start any kind of framework quarrel, but my understanding was that quite many applications (such as Wireshark, Subsurface, and OpenShot) are moving from GTK to Qt very much due to Qt being more stable. Or is the main reason…
As someone who would like to create a commercial application for desktop, I really appreciate that at least the UI frameworks for Windows and OSX are quite stable.
Re: Libui: GUI library in C
#84Re: Libui: GUI library in C
#85This is a very good approach for the current times! As far as I understand from the source code, libui is a thin C wrapper that makes calls to each platform native ui framework. For instance, to create a window on OSX it calls the corresponding Cocoa function, for Linux the corresponding GTK function, etc. So, unlike Qt and GTK which are heavy cross-platform libraries because they can "draw" their own widgets themsel…
It's not a new approach, though. SWT (for the JVM) and wxWidgets (C++, with bindings for more than a dozen languages) have been following it for years.
This library seems to be implemented in C so that higher level languages can make use of it. C is much simpler to interface than C++. For instance, you mention WxWidgets, but that thing is so god-damn complex that there's still no stable WxPython for pyhton 3..
I really hope that this libui stays as just a simple simple thin wrapper so that we can build complex things no top of it in each language. For instance, python guys may create a declarative framework on top of this while lisp/haskell guys may create a Functional Reactive "thing" on top of it. As long as libui stays simple enough, everyone can extended it in ways that make sense for their own languages..
Re: Libui: GUI library in C
#86Finally. I'm hoping that a native UI toolkit that can be used via FFI from nearly any language might take a chunk out of the Web-as-application-delivery-platform mindset. I don't blame anyone for making non-native apps with Electron and HTML5, because it's so difficult to make them work on every platform. But here's to hoping someone finally got it right, and that native applications can take back some ground. Death…
Well, plenty of people tried this approach (off the top of my head, wxWidgets, Tk (the TCL framework, still powering Python, Perl and Ruby GUIs), FLTK). Unfortunately, all those frameworks fail for the same reason: they're all 90% there but fall short on the small details. Still, let's hope that libui does great --- it's already quite a feat to have the basic window controls working the same on three different platfo…
That 90% constitutes a lingua franca.
Not knocking the nice UI/UX folks - they work their corner, I work mine, and it's nice to have a technology to bridge schedules. My observation is that that 10% consumes as much as 1000% of the schedule at times :)
Re: Libui: GUI library in C
#87Earlier quoted context omitted.
C is simply the Correct Tool For the Job when writing cross-platform (native) UI's. It's simple, it's callable from almost any other language, and all OS GUI API's are already in C. There has been a lot of negativity/arguments against C here lately, which in my opinion has been very exaggerated. Seriously, how often do you guys write GUI apps that _also need to be secure_? An application isn't secure just because you…
Any app i write needs to be secure as much as reasonably possible. If you communicate over a Network with not fully trusted remote endpoints, and handle text you have a fair chance of remote code execution in C. A git front end. A text editor. Anything written in C has a fair chance to making a mistake. Your very basic attitude is an example to the problem the industry is having! We will always make mistakes, no matt…
2) Some things very much need to never be on a wider network with untrusted nodes. This is easier than it sounds...
Re: Libui: GUI library in C
#88These APIs are notoriously hard to get right and coherent, and releasing at such an early stage will make it hard to change anything when building up on this. That said I do not know of any cross platform library in C, so this does seem to fill a niche.
Re: Libui: GUI library in C
#89The main thing holding me back from investigating this further is requiring GTK3+ on linux, when my mint box works just fine with GTK2/Mate.
Re: Libui: GUI library in C
#90Earlier quoted context omitted.
Well, plenty of people tried this approach (off the top of my head, wxWidgets, Tk (the TCL framework, still powering Python, Perl and Ruby GUIs), FLTK). Unfortunately, all those frameworks fail for the same reason: they're all 90% there but fall short on the small details. Still, let's hope that libui does great --- it's already quite a feat to have the basic window controls working the same on three different platfo…
I've used Tk many, many times as a foundation of a temporary strawman interface while the real UI experts ... do whatever it is they do. I've also used it for custom instrumentation GUIs. That 90% constitutes a lingua franca. Not knocking the nice UI/UX folks - they work their corner, I work mine, and it's nice to have a technology to bridge schedules. My observation is that that 10% consumes as much as 1000% of the…
In my experience, the story of using a layered UI like this is that for a short while you use it, then customers start asking for features it cannot deliver and you start writing platform-specific code, then after a while the portable code is a minority. At some point there's a meeting in which someone points out that a particular platform is 90% of the value and wouldn't it be better to make do with just that 90%? Are these other platforms really worth the effort?