Skip to content

Latest commit

 

History

233 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

window.h - minimalistic windowing library

window.h is a single-header minimalistic windowing solution for GNU/Linux, unix-like and win32 systems.

#include <stdio.h>
#
#define WINDOW_IMPLEMENTATION
#include <window.h>

int main(void) {
    /* init window.h */
    library_t library = 0;
    win_init(&library);
    
    /* create window */
    window_t window = 0;
    win_window_create(library, &window, 800, 600, "Hello, window.h!");
    if (!window) { win_quit(library); return (1); }

    /* map window */
    win_window_map(library, window);

    /* update loop */
    int exit = 0;
    while (!exit) {
        /* poll events */
        event_t event = { 0 };
        while (win_event_poll(library, &event)) {
            switch (event.type) {
                case (WINDOW_EVENT_QUIT): {
                    printf("WINDOW_EVENT_QUIT\n");
                    exit = 1;
                } break;
            }
        }
    }

    /* quit */
    win_quit(library);
    return (0);
}

Contributions

1. Contributing new backend.

TODO: add this section

Resources

Resources used in this project:

Specific resources used in this project:

(and a bit of ai but it output was mostly trash slop)

Licence

This project is licenced under LGPL-3 Licence.

Releases

Contributors

Languages