4 ms·
> Instead, what we need is a simple API with opaque handles and C function calls. No fancy OOP or macro preprocessors. Simple OpenGL style. Something like the
by adrianratnapala 8y ago
> Instead, what we need is a simple API with opaque handles and C function calls. No fancy OOP or macro preprocessors. Simple OpenGL style.
Something like the enlightenment foundation libraries might be what you want[1]. I haven't tried it out properly, but I liked the look of it from the docs, it's a C api and moderately minimalistic.
However, even with C APIs, all these things end up with something like "fancy OOP" (after all, even Gtk is a C Api). That's because GUI widgets seem to be one of the few places really well suited to OO ideas like inheritance and non-trivial getter-setters.
[1]: https://docs.enlightenment.org/efl/current/ https://docs.enlightenment.org/efl/current/
- flukus 8y ago> However, even with C APIs, all these things end up with something like "fancy OOP" (after all, even Gtk is a C Api). That's because GUI widgets seem to be one of the few places really well suited to OO ideas like inheritance and non-trivial getter-setters. How much of the GObject system is there for the benefit of Gtk and C developers and how much is there for interop with other languages and gui builders though? Programming against the C API it seems to be very much not OOP, you're always casting to a base class to call methods on that level, it doesn't appear that the OO system is used much internally.
- pjmlp 8y agoXlib Athena Widgets, OpenLook, and CDE were also pretty much OOP in C.