25 #include <SDL2/SDL_video.h>
68 window(
const std::string& title,
73 const uint32_t window_flags,
74 const uint32_t render_flags);
137 void fill(uint8_t r, uint8_t
g, uint8_t
b, uint8_t a = 0);
149 void set_title(
const std::string& title);
198 operator SDL_Window*();
203 operator SDL_Renderer*();
The wrapper class for the SDL_Window class.
SDL_Point get_output_size()
Gets the window's renderer output size, in pixels.
void set_size(const int w, const int h)
Wrapper for SDL_SetWindowSize.
void to_window()
Dummy function for returning the window to windowed mode.
uint32_t pixel_format()
The current pixel format of the renderer.
window & operator=(const window &)=delete
window(const window &)=delete
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.
point get_logical_size() const
void center()
Dummy function for centering the window.
void render()
Renders the contents of the window.
void restore()
Dummy function for restoring the window.
void set_minimum_size(int min_w, int min_h)
Set minimum size of the window.
SDL_Window * window_
The SDL_Window we own.
void full_screen()
Dummy function for setting the window to fullscreen mode.
SDL_Point get_size()
Gets the window's size, in screen coordinates.
void set_icon(const surface &icon)
Sets the icon of the window.
void set_logical_size(int w, int h)
Sets the desired size of the rendering surface.
void maximize()
Dummy function for maximizing the window.
uint32_t pixel_format_
The preferred pixel format for the renderer.
void set_title(const std::string &title)
Sets the title of the window.