Files
punchie-engine/include/Window.h
T

38 lines
750 B
C

#ifndef WINDOW_H
#define WINDOW_H
#include "Renderer.h"
#include "SDL.h"
#include "SDL_pixels.h"
#include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif // !__cplusplus
typedef struct window_size {
int32_t width;
int32_t height;
} WindowSize;
typedef struct window {
WindowSize defined_size;
WindowSize drawable_size;
Renderer *renderer;
SDL_Window *SDL_base_window;
SDL_Color background_color;
} Window;
bool init_window(Window *wnd, const char *title, WindowSize size,
SDL_Color color, bool full_screen);
void clear_window(const Window *wnd);
void swap_render_buffers(const Window *wnd);
void destroy_window(Window *wnd);
#ifdef __cplusplus
}
#endif // !__cplusplus
#endif // !WINDOW_H