Wizard Engine
2D cross-platform game engine built around SDL2
 
Loading...
Searching...
No Matches
wze::window Class Referencefinal

Static Public Member Functions

static uint16_t width ()
 
static uint16_t height ()
 
static std::string title ()
 
static void set_title (std::string const &title)
 
static void set_icon (std::shared_ptr< image > const &icon)
 
static bool visible ()
 
static bool focused ()
 

Detailed Description

Definition at line 34 of file window.hpp.

Member Function Documentation

◆ width()

uint16_t wze::window::width ( )
staticnodiscard

Definition at line 36 of file window.cpp.

36 {
37 return _width;
38}

◆ height()

uint16_t wze::window::height ( )
staticnodiscard

Definition at line 40 of file window.cpp.

40 {
41 return _height;
42}

◆ title()

std::string wze::window::title ( )
staticnodiscard

Definition at line 44 of file window.cpp.

44 {
45 return SDL_GetWindowTitle(base());
46}

◆ set_title()

void wze::window::set_title ( std::string const & title)
static

Definition at line 48 of file window.cpp.

48 {
49 SDL_SetWindowTitle(base(), title.c_str());
50}

◆ set_icon()

void wze::window::set_icon ( std::shared_ptr< image > const & icon)
static

Definition at line 52 of file window.cpp.

52 {
53 SDL_SetWindowIcon(base(), icon.get());
54}

◆ visible()

bool wze::window::visible ( )
staticnodiscard

Definition at line 56 of file window.cpp.

56 {
57 return (bool)(SDL_GetWindowFlags(base()) & SDL_WINDOW_SHOWN);
58}

◆ focused()

bool wze::window::focused ( )
staticnodiscard

Definition at line 60 of file window.cpp.

60 {
61 return (bool)(SDL_GetWindowFlags(base()) & SDL_WINDOW_INPUT_FOCUS);
62}

The documentation for this class was generated from the following files: