-
Notifications
You must be signed in to change notification settings - Fork 0
/
Windowing.h
47 lines (34 loc) · 997 Bytes
/
Windowing.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef HOMEWORK_WINDOWING_H
#define HOMEWORK_WINDOWING_H
#include <SDL.h>
#include <SDL_ttf.h>
#include <SDL_image.h>
#include "Utility.h"
#include <time.h>
#include <stdbool.h>
#include "Input.h"
typedef struct SDLWindow {
SDL_Window *window;
SDL_Renderer *renderer;
int id;
int w;
int h;
bool shown;
bool mouseFocus;
bool keyboardFocus;
bool requestClose;
bool maximized;
Input input;
} SDLWindow;
bool window_init_SDL();
void window_quit_SDL();
SDLWindow window_create(char *title, int w, int h, unsigned int windowFlags, unsigned int rendererFlags);
void window_show(SDLWindow *window);
void window_hide(SDLWindow *window);
void window_get_focus(SDLWindow *window);
void window_maximize(SDLWindow *window);
void window_begin_event_handling(SDLWindow *window);
void window_begin_event_handling(SDLWindow *window);
void window_handle_event(SDLWindow *window, SDL_Event *e);
void window_free(SDLWindow *window);
#endif //HOMEWORK_WINDOWING_H