A minimalist(*) and platform-agnostic application layer for writing graphical applications.
Available as either a single header file or a directory of headers (a "unity build" setup).
Can be complied in either C or C++.
(*A bare-bone application executable on Windows measures at around 13 KB(!))
The platform layer only uses operating-system headers (no standard library used).
The application layer itself has no dependencies whatsoever.
It is just a library that the platform layer uses - it has no knowledge of the platform.
More details on this architecture here.
The single header file variant includes everything.
Otherwise, specific headers can be included from the directory variant.
Only the entry point needs to be defined (see example below).
SlimApp aims to provide only the absolute bare necessities needed for a windowed application.
For a more feature rich base for a 2D/3D graphical application, see: SlimEngine.
Well documented example applications cover the features:
- Bare-bone application (one-liner): Well-behaved window (can be resized minimized/maximized and closed)
- Overridable window defaults: Initial dimensions and title.
- Timers and window-title control:
- Drawable window content: Basic shape drawing (Lines, rectangles, triangles and circles)
- Text: String and number drawing:
- Mouse: Buttons (+wheel), cursor position/movement and 'raw' mouse input (captured outside the window).
- Keyboard: General key tracking + built-in tracking of control keys status (Ctrl, Alt, Shift, Space)
- Memory: Arena allocator can be used for heap memory, then bound to the global app instance.
- File: Opening/closing and reading/writing files in a platform-agnostic way (using os-specific API).
*All input capturing for mouse and keyboard is extendable through callbacks