2021-11-30 21:29:18 -06:00
|
|
|
#ifndef WINDOW_H
|
|
|
|
#define WINDOW_H
|
|
|
|
|
2023-08-31 02:05:06 -05:00
|
|
|
|
2022-02-06 10:14:57 -06:00
|
|
|
#include "render.h"
|
2021-11-30 21:29:18 -06:00
|
|
|
#include <stdbool.h>
|
2022-02-06 10:14:57 -06:00
|
|
|
#include <stdint.h>
|
2021-11-30 21:29:18 -06:00
|
|
|
|
2022-11-03 16:58:03 -05:00
|
|
|
struct window {
|
2023-08-31 02:05:06 -05:00
|
|
|
int id;
|
|
|
|
int width;
|
|
|
|
int height;
|
2023-09-18 21:55:37 -05:00
|
|
|
double dpi;
|
|
|
|
int rwidth;
|
|
|
|
int rheight;
|
2023-08-31 02:05:06 -05:00
|
|
|
bool render;
|
|
|
|
bool mouseFocus;
|
|
|
|
bool keyboardFocus;
|
|
|
|
bool fullscreen;
|
|
|
|
bool minimized;
|
|
|
|
bool iconified;
|
|
|
|
bool focus;
|
|
|
|
bool shown;
|
2021-11-30 21:29:18 -06:00
|
|
|
};
|
|
|
|
|
2022-01-19 16:43:21 -06:00
|
|
|
struct Texture;
|
2021-11-30 21:29:18 -06:00
|
|
|
|
2023-08-31 02:05:06 -05:00
|
|
|
extern struct window mainwin;
|
|
|
|
|
|
|
|
void window_resize(int width, int height);
|
|
|
|
void window_quit();
|
|
|
|
void window_focused(int focus);
|
|
|
|
void window_iconified(int s);
|
|
|
|
void window_suspended(int s);
|
2022-02-06 10:14:57 -06:00
|
|
|
|
2022-11-03 16:58:03 -05:00
|
|
|
void window_makefullscreen(struct window *w);
|
|
|
|
void window_togglefullscreen(struct window *w);
|
|
|
|
void window_unfullscreen(struct window *w);
|
2023-08-31 02:05:06 -05:00
|
|
|
|
|
|
|
void window_set_icon(const char *png);
|
2022-11-03 16:58:03 -05:00
|
|
|
void window_seticon(struct window *w, struct Texture *icon);
|
|
|
|
|
|
|
|
void window_render(struct window *w);
|
2022-02-06 10:14:57 -06:00
|
|
|
|
2021-11-30 21:29:18 -06:00
|
|
|
#endif
|