HardCoreCodin SlimApp Save

A minimalist andf platform-agnostic application layer for writing graphical applications, with a strong emphasis on simplicity and ease of use.

Project README

SlimApp_logo

A minimalist(*) and platform-agnostic application layer for writing graphical applications.
A bare-bone application executable on Windows measures at around 13 KB(!)
Available as either a single header file or a directory of headers (a "unity build" setup).
Can be complied in either C or C++.

Examples of projects using this one are SlimEngine and SlimTracin.

Architecture:

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.

Usage:

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 comes with pre-configured CMake targets for all examples.
For manual builds on Windows, the typical system libraries need to be linked
(winmm.lib, gdi32.lib, shell32.lib, user32.lib) and the SUBSYSTEM needs to be set to WINDOWS

All examples were tested in all combinations of:
Source: Single header file (SlimApp.h), Directory of headers (specific includes)
Compiler: MSVC, MinGW, CLang
Language: C, C++
CPU Arch: x86, x64

Features:

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)

    1_app 1_app_code

  • Overridable window defaults: Initial dimensions and title.

    2_defaults 2_defaults_code

  • Timers and window-title control:

    3_time 3_time_code

  • Drawable window content: Basic shape drawing (Lines, rectangles, triangles and circles)

    4_shapes 4_shapes_code

  • Text: String and number drawing:

    5_text 5_text_code

  • Mouse: Buttons (+wheel), cursor position/movement and 'raw' mouse input (captured outside the window).

    6_mouse 6_mouse_code

  • Keyboard: General key tracking + built-in tracking of control keys status (Ctrl, Alt, Shift, Space)

    7_keyboard 7_keyboard_code

  • Memory: Arena allocator can be used for heap memory, then bound to the global app instance.

    8_memory 8_memory_code

  • File: Opening/closing and reading/writing files in a platform-agnostic way (using os-specific API).

    9_files 9_files_code

*All input capturing for mouse and keyboard is extendable through callbacks

Open Source Agenda is not affiliated with "HardCoreCodin SlimApp" Project. README Source: HardCoreCodin/SlimApp
Stars
35
Open Issues
1
Last Commit
2 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating