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);
}TODO: add this section
Resources used in this project:
- glfw/glfw
- libsdl-org/SDL
- ColleagueRiley/RGFW
- mirror/libX11
- HID Usage Tables FOR Universal Serial Bus (USB)
- The X Window system
- The Xlib Manual
- EGL Reference Pages
Specific resources used in this project:
- MaJerle/c-code-style
- Create an OpenGL context using Xlib and EGL
- RGFW Under the Hood: OpenGL context creation
- exebook/x11clipboard
- Implementing copy/paste in X11
- QWERTY
(and a bit of ai but it output was mostly trash slop)
This project is licenced under LGPL-3 Licence.