Rename Display to Window.
It makes more sense to be consistent and always call it window.
This commit is contained in:
parent
416a71f744
commit
24da7f45e0
33 changed files with 257 additions and 255 deletions
48
include/Spectre/Window/DisplayMode.h
Normal file
48
include/Spectre/Window/DisplayMode.h
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
|
||||
#ifndef SPECTRE_DISPLAY_DISPLAYMODE_H
|
||||
#define SPECTRE_DISPLAY_DISPLAYMODE_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace sp {
|
||||
|
||||
class DisplayMode
|
||||
{
|
||||
public :
|
||||
DisplayMode();
|
||||
DisplayMode(unsigned int width, unsigned int height, unsigned int bpp = 32);
|
||||
|
||||
static std::vector<DisplayMode> getFullscreenModes();
|
||||
|
||||
static DisplayMode getDesktopMode();
|
||||
|
||||
// Returns true if width hight and bpp are not set (eg. zero)
|
||||
// useful to determine if a DisplayMode object is set or not.
|
||||
// this is equal to:
|
||||
// DisplayMode a;
|
||||
// if (a == DisplayMode()) {
|
||||
// // empty
|
||||
// }
|
||||
bool empty() const;
|
||||
|
||||
inline bool operator==(const DisplayMode& other)
|
||||
{
|
||||
return width == other.width
|
||||
&& height == other.height
|
||||
&& bpp == other.bpp;
|
||||
}
|
||||
|
||||
inline bool operator!=(const DisplayMode& other)
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
public :
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
unsigned int bpp; /* Bits per pixel. */
|
||||
};
|
||||
|
||||
} // namespace sp
|
||||
|
||||
#endif /* SPECTRE_DISPLAY_DISPLAYMODE_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue