CUI is basic user interface library for the c programming language.
| operating system | backend(s) | software renderer | opengl es 2.0 renderer | metal renderer | direct3d11 renderer |
|---|---|---|---|---|---|
| Linux | X11, Wayland | ✔️ | ✔️ | ❌ | ❌ |
| macOS | AppKit | ✔️ | ❌ | ✔️ | ❌ |
| Windows | Win32 | ✔️ | ❌ | ❌ | ✔️ |
| Android | Android | ❌ | ✔️ | ❌ | ❌ |
To use CUI in your project you just need the header file under include/ and
one of the generated libraries (static or dynamic) to link against.
#include <cui.h>$ cc -o c_make c_make.c # only needs to happen once
$ ./c_make setup build build_type=[debug|reldebug|release]
$ ./c_make build buildThis creates a Debug (debug), Release Debug (reldebug) or Release
(release) build. The result can be found under build/. You can use the
dynamic (libcui.so) or the static (libcui.a) library.
Per default the build will use background jobs to parallelize the compilation.
This will lead to error messages getting printed out of order. To get them in
order use ./c_make build build --sequential.
$ cl -Fec_make.exe c_make.c # only needs to happen once
$ c_make setup build build_type=[debug|reldebug|release]
$ c_make build buildThis creates a Debug (debug), Release Debug (reldebug) or Release
(release) build. The result can be found under build/. You can use the
static library cui.lib.
Per default the build will use background jobs to parallelize the compilation.
This will lead to error messages getting printed out of order. To get them in
order use c_make build build --sequential.
$ cc -o c_make c_make.c # only needs to happen once
$ ./c_make setup build target_platform=android target_architecture=[amd64|aarch64] build_type=[debug|reldebug|release]
$ ./c_make build buildThis creates a Debug (debug), Release Debug (reldebug) or Release
(release) build. The result can be found under build/. You can use the
dynamic (libcui.so) or the static (libcui.a) library.
Per default the build will use background jobs to parallelize the compilation.
This will lead to error messages getting printed out of order. To get them in
order use ./c_make build build --sequential.
If you want to configure your CUI build to your liking you can edit the c_make.txt file
in the build folder. You can enable and disable different rendering backends and for linux
the display protocol backends that are compiled in.
CUI comes with a few example projects which should give you a pretty good idea on
how to use it in your own code. You can find all of these in examples. All examples
are build with CUI automatically. Just run one of the build_* files mentioned above.
color_tool- Color conversion toolfile_search- A file search utilityimage_viewer- Simple image viewer which supports QOI, BMP and JPEGinterface_browser- An overview app for all the available widget types