MajkLib is a lightweight utility and framework library written entirely in C, designed to simplify low-level application development while exposing the underlying concepts of system programming.
The library provides abstractions over native operating system APIs and offers essential functionality such as window management, rendering, input processing, timing utilities, file operations, and memory-related helpers.
Originally created as a personal learning project, MajkLib focuses on understanding how frameworks work internally while remaining simple, reusable, and easy to extend.
- Native window creation
- Window lifecycle management
- Window event processing
- Main application loop helpers
- Basic rendering functionality
- Integration with Windows GDI
- Foundation for future graphics backends
- Keyboard input processing
- Mouse input support
- Real-time input state tracking
- Timing and delta time utilities
- File handling helpers
- Memory-related utilities
- General-purpose helper functions
- Minimal dependencies
- Small and straightforward API
- Easy integration into existing projects
- Written entirely in standard C
MajkLib wraps low-level system functionality into a simplified API while still keeping the underlying mechanisms transparent.
-
Initialize the Window
- Create a native operating system window.
-
Start the Application Loop
- Process system events and user input.
-
Execute Application Logic
- Update program state.
- Handle rendering operations.
-
Shutdown
- Release allocated resources.
- Close the application cleanly.
#include "MajkLib.h"
int main(void)
{
OpenWindow(800, 600, "MajkLib Window");
while (!WindowShouldClose())
{
ProcessWindow();
}
return 0;
}Application
│
▼
MajkLib
│
┌────┼─────────────┐
│ │ │ │
▼ ▼ ▼ ▼
Window Input Timing Utilities
│
▼
Windows API / GDI
│
▼
Operating System
SplitString()allocates each token intooutput[i].- Caller owns those allocations and must free them after use.
- Use
FreeSplitString(output, count)to release all token buffers returned bySplitString().
MajkLib was created to:
- learn low-level systems programming,
- understand framework architecture,
- explore how operating systems interact with applications,
- build reusable software components,
- experiment with rendering systems,
- maintain a lightweight and approachable codebase.
Future development may include:
- 2D renderer,
- OpenGL rendering backend,
- texture loading,
- font rendering,
- event dispatching system,
- UI components,
- audio support,
- networking utilities,
- cross-platform compatibility.
gcc main.c MajkLib.c -o app.exe -lgdi32- Windows
- GCC or another compatible C compiler
- Windows GDI libraries
- C
- Windows API
- Windows GDI
- Native event handling
- Low-level systems programming concepts
MajkLib is suitable for:
- learning how frameworks are built internally,
- experimenting with low-level programming,
- creating simple desktop applications,
- prototyping graphics systems,
- educational projects focused on system APIs,
- serving as a foundation for a custom game or application framework.
MajkLib prioritizes simplicity, readability, and learning value over feature completeness. The project serves both as a practical utility library and as an exploration of how higher-level frameworks abstract operating system functionality.
MIT License
Developed as a personal project focused on low-level programming, framework architecture, and understanding how software works behind the scenes.