first
This commit is contained in:
44
source/engin/window.h
Normal file
44
source/engin/window.h
Normal 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
|
||||
Reference in New Issue
Block a user