Gooey: A GPU-accelerated UI framework for Zig(github.com) |
Gooey: A GPU-accelerated UI framework for Zig(github.com) |
#include <graphics.h> #include <conio.h>
int main() { int gd = DETECT, gm;
initgraph(&gd, &gm, "C:\\TURBOC3\\BGI");
circle(320, 240, 100);
getch();
closegraph();
return 0;
}Making some shapes and forms wasn't that much work either.
If I think back to VB and Windows (whatever it was then) making a basic window, form and some buttons was so simple and easy, they even made GUI builders because they were so good.
Somewhere along the lines GUIs became overly complex to implement.
#include <QApplication>
#include <QWidget>
#include <QPainter>
class widget : public QWidget {
void paintEvent(QPaintEvent*) override {
QPainter p(this).drawEllipse(QPoint(320, 240), 100, 100);
}
};
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
widget w;
w.resize(640, 480);
w.show();
return app.exec();
}
It doesn't seem too complicated to me.(Don't tell me here. Make your docs better, so everyone benefits!)
> GPUI - Zed's GPU UI framework
Cool, but a comparison would also be very helpful.
If I decide to make a GUI app with Zig, how do I choose between Gooey and GPUI?
So far, all I know that GPUI is more mature and has at least one successful project built with it, so...
Also:
> Gooey: Turn (almost) any Python 3 Console Program into a GUI application with one line
GPUI is for rust, not zig
(Author of Gooey [1], a GUI framework for WebASM in Go)
And in early 2000, I was in a mailing list for designing a successor/replacement to X11, code-named "Gooey" that never went anywhere.