lainchan / λ
(untitled)
Sipho Nkosi · 2021-12-30 19:06
I want to develop a cross platform GUI toolkit for desktop and mobile.
I'm thinking of using SDL and implementing simple vector graphics primitives on top of it. SDL has audio support so that's nice.
I've also considered rust pathfinder, it already implements a subset of the HTML5 canvas API but audio would have to come from a different library.
I'm not new to programming but I never did anything related to graphics. I have a good foundation in linear algebra and geometry.
Recommend me resources and alternatives to SDL (vector graphics support is good, mobile is a must).
Linda Lee · 2021-12-30 20:22
>>29248
Forgot to mention: C bindings are important.
Skia for example doesn't have C bindings.
Crash Override · 2021-12-31 02:46
maybe dissect imgui
https://github.com/ocornut/imgui
Zuse · 2021-12-31 09:43
>>29248
if you are good at linear algebra and geometry why wasting time on GUI toolkit? There are so many more related to these branches of math things to do as a programmer.
Chan Siu Ming · 2021-12-31 18:55
>>29265
Not him, but all of the major GUI toolkits are fuarrrking dreadful. Having a sane one written by a competent would be a godsend.
Church · 2021-12-31 21:30
>>29265
What this person said: >>29270
It’s a relevant problem that I would like to solve.
You don’t need that much geometry and LA to write a GUI btw, I only mentioned it to avoid naysayers.
>>29259
Good idea.
Spike Spiegel · 2022-01-01 00:53
>>29270
What is Motif?
Switch · 2022-01-01 17:37
>>29275
A fuarrrking dreadful framework with no mobile support.
Joe Bloggs · 2022-01-02 13:36
>>29285
>A fuarrrking dreadful framework with no mobile support.
Which is a plus. Why would you want to have anything to do with normalcattle thought dispensing antennas?
Roy Batty · 2022-01-02 13:45
don't we have like 2 threads about GUIs already?
>>29270
tk is good.
Hitomi · 2022-01-02 16:53
>>29295
Why would you post without reading the OP?
>>29296
Sort of and only on desktop.
Morpheus · 2022-01-02 22:32
>>29296
Tk's problem is that it's tied to Tcl. Embedding an entire scripting language just to make GUI programming easier seems a bit excessive.
Lunch · 2022-01-06 23:00
>>29301
>Why would you post without reading the OP?
They sort of have a point, though. Desktop and mobile are not the same thing. This idea of having a cross platform framework that should reduce the workload for programmers is, imho, a pipe dream in our current state. Every time I see a GUI that tries this "convergence" soykaf bad things happen (see gnome 3 and windows 8 for patently bad examples).
In other words, I think we first have a UX problem to solve, then we can start talking about cross-platform frameworks.
protected · 2022-01-07 00:58
>>29350
Lots of software works fine with convergent GUIs. There might not a be a formula for everything but whatever.
Emmanuel · 2022-01-07 03:18
>>29350
I feel like the best approach is to copy how web browsers do it, where you have the same basic elements across every platform, but with their behavior and layout changing depending on the device they're running on.
Cypher · 2022-03-07 14:57
OP here I decided to go with skia.
Frank Garza · 2022-03-08 15:25
>>30325
Great. Let us know when you give up after you realize what it actually takes to make a GUI library with more features than ImGUI and doesn't suck.
After you get disillusioned however, try to remember you can make things not suck by helping an ecosystem like GTK that is in dire need of non-retards to help drive it forward, and GTK4 is a great base to work on top of. Things like Relm4 are a good proof of concept that you can bake a good development experience on top of a procedural, retained UI library.
Incognito · 2022-03-09 05:15
>>30339
You sound like a bitter person. Thankfully I don’t let your kind bother me anymore.
Spike Spiegel · 2022-03-09 08:41
>>30339
gtk and gnome are backed by a big corporation (redhat)
gtk wouldn't need to have you scout volunteers if it was already great.
the serenity os guy made a gui library on top of making an os - its nowhere near an impossible task for a single person.
Incognito · 2022-03-09 15:14
>>30339
>GTK
GTK is like kicking dead whales down the beach. wxWidgets and QT are better.
Iverson · 2022-03-09 20:41
>>29248
Out of all of the GUI toolkits that i've tried, flutter is, so far, the nicest, most 'wrapped up' GUI toolkit that i've used, once you get used to it's antics, that is. The mindset required is much closer to something like react or vue, or other similar webshit frameworks.
It's advantages, however, come from the fact that all you need to know to learn it is dart, which is automatically familiar to anyone who has ever worked with anything with a C-like syntax. The layout, widgets, and other graphical elements are defined in a delcarative style. In essence, you get all of the advantages of writing a webapp (speed of development, ease of debugging, cross-platform capability), but with none of the issues that come with using web technologies (working with 3 diff langs, dependency hell, needing a browser, no ability for low-level interactivity, etc).
One major disadvantage of flutter/dart is it's soykafty (and forced) threading model. You don't have threads, but 'isolates', which may or may not run on a separate thread (depends on platform, can't multithread on the web, after all), and they can pass messages (as native objects) between eachother.
To me, flutter seems to be the only sane choice. Call me a wage slave, idc.
Dr. X · 2022-03-09 22:11
>>30359
Thanks for your input. I don't feel strongly either way about flutter but it's definitely better than electron and friends.
Browsers now do support webworkers but I don't know if flutter will incorporate it.