22 #include <SDL2/SDL_video.h> 65 window(
const std::string& title,
70 const uint32_t window_flags,
71 const uint32_t render_flags);
84 void set_size(
const int w,
const int h);
134 void fill(uint8_t r, uint8_t
g, uint8_t
b, uint8_t
a = 0);
146 void set_title(
const std::string& title);
176 operator SDL_Window*();
181 operator SDL_Renderer*();
void full_screen()
Dummy function for setting the window to fullscreen mode.
void set_size(const int w, const int h)
Wrapper for SDL_SetWindowSize.
void restore()
Dummy function for restoring the window.
uint32_t pixel_format_
The preferred pixel format for the renderer.
void fill(uint8_t r, uint8_t g, uint8_t b, uint8_t a=0)
Clears the contents of the window with a given color.
The wrapper class for the SDL_Window class.
void set_icon(const surface &icon)
Sets the icon of the window.
void maximize()
Dummy function for maximizing the window.
SDL_Point get_size()
Gets the window's size, in screen coordinates.
SDL_Point get_output_size()
Gets the window's renderer output size, in pixels.
void set_title(const std::string &title)
Sets the title of the window.
SDL_Window * window_
The SDL_Window we own.
window(const window &)=delete
window & operator=(const window &)=delete
void set_minimum_size(int min_w, int min_h)
Set minimum size of the window.
void render()
Renders the contents of the window.
void to_window()
Dummy function for returning the window to windowed mode.
void center()
Dummy function for centering the window.