This commit is contained in:
2026-07-02 21:59:55 -07:00
commit e14550ce63
12 changed files with 370 additions and 0 deletions

44
source/engin/window.h Normal file
View File

@@ -0,0 +1,44 @@
#ifndef WINDOW_H
#define WINDOW_H
typedef int(*window_evnet_cb)(int argc, void* argv);
typedef struct {
const char* Log;
window_evnet_cb callback;
}window_event;
#ifdef _GLFW_WAYLAND
#define GLEW_STATIC
#include <GL/glew.h>
#include <GLFW/glfw3.h>
typedef GLFWwindow context;
#else
// If not using GLFW
#endif
typedef struct {
const char* Name;
const char* Description;
int width;
int height;
window_event windowClosedEvent;
window_event windowOpenEvent;
window_event windowKeyEvent;
}window_config;
typedef struct {
const char* Name;
const char* Description;
int width;
int height;
context* ctx;
}window;
int WindowCreate(window* w,window_config* config);
int WindowHandleInput(window* w);
int WindowEventHandler(window* w);
int GetKeyDown(const char* keyName);
#endif