prosperon/source/engine/window.h
2024-03-18 12:38:32 -05:00

47 lines
953 B
C

#ifndef WINDOW_H
#define WINDOW_H
#include <HandmadeMath.h>
struct window {
int id;
HMM_Vec2 size; // Actual width and height of the window
HMM_Vec2 rendersize; // The desired rendering resolution, what the assets are at
HMM_Vec2 psize;
float left;
float top;
double dpi;
int render;
int mouseFocus;
int keyboardFocus;
int fullscreen;
int minimized;
int iconified;
int focus;
int shown;
int mode;
float aspect;
float raspect;
char *title;
int start;
};
typedef struct window window;
struct texture;
extern struct window mainwin;
void window_resize(int width, int height);
void window_focused(int focus);
void window_iconified(int s);
void window_suspended(int s);
void window_apply(window *w);
void window_free(window *w);
void window_setfullscreen(window *w, int f);
void set_icon(const char *png);
void window_seticon(struct window *w, struct texture *icon);
void window_render(struct window *w);
#endif