-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwindow.h
More file actions
51 lines (39 loc) · 1.25 KB
/
Copy pathwindow.h
File metadata and controls
51 lines (39 loc) · 1.25 KB
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
48
49
50
51
#ifndef _WINDOW_H_
#define _WINDOW_H_
/// @file window.h
/// @defgroup Window
/// @{
#include "renderer.h"
#ifdef _WIN32
#include <SDL.h>
#else
#include <SDL2/SDL.h>
#endif
#define WINDOW_WIDTH 1280
#define WINDOW_HEIGHT 720
/// @brief Structure représentant une fenêtre SDL avec son moteur de rendu.
typedef struct Window_s
{
/// @brief La fenêtre SDL.
SDL_Window *m_windowSDL;
/// @brief Le moteur de rendu associé à la fenêtre.
Renderer *m_renderer;
} Window;
/// @brief Crée une nouvelle fenêtre.
/// @param[in] width la largeur (en pixels) de la fenêtre.
/// @param[in] height la hauteur (en pixels) de la fenêtre.
/// @return La fenêtre créée.
Window *Window_new(int width, int height);
/// @brief Détruit une fenêtre préalablement allouée avec Window_new();
/// @param[in,out] window la fenêtre à détruire.
void Window_free(Window * window);
/// @brief Renvoie le moteur de rendu associé à la fenêtre.
/// @param[in] window la fenêtre.
/// @return Le moteur de rendu de la fenêtre.
Renderer *Window_getRenderer(Window *window);
/// @brief Initialise la SDL.
/// @return EXIT_SUCCESS ou EXIT_FAILURE.
int SDL_init();
/// @brief Quitte la SDL.
void SDL_quit();
#endif