#include <NEngine/Window.h>
Public Member Functions | |
virtual bool | createWindow (const USize2 &winSize, const unsigned short bpp, const bool isFullscreen, const std::string &windowName, const std::string &windowIcon="", const bool showCursor=false)=0 |
open the window | |
virtual USize2 | getWindowSize (void) const =0 |
Get the size of the Window. | |
virtual int | getBitsPerPixel (void) const =0 |
Get the number of bits per pixel. | |
virtual void | destroyWindow (void)=0 |
Close the Window. | |
virtual bool | needWindowClosure (void) const =0 |
Return if the window should be closed. | |
Protected Member Functions | |
virtual void * | getNativeWindow (void) const =0 |
return a pointer to the native window handle | |
Friends | |
class | Renderer |
Window interface.
The Window class gives an interface to implement new platform specific windows in the game. Only basic features are implemented (e.g.: the strict minimum for games) such as opening the window, closing it, get the size. An additional function 'needWindowClosure()' should report if the window need to be closed or not (e.g.: after an event on the red cross)
bool NE::Window::createWindow | ( | const USize2 & | winSize, | |
const unsigned short | bpp, | |||
const bool | isFullscreen, | |||
const std::string & | windowName, | |||
const std::string & | windowIcon = "" , |
|||
const bool | showCursor = false | |||
) | [pure virtual] |
open the window
winSize | the size of the window to open | |
bpp | the bits per pixel needed by the window | |
isFullscreen | true if the window must be fullscreen | |
windowName | the name of the window to display | |
windowIcon | the path to the icon to use | |
showCursor | true if the cursor is visible when on the window |
Implemented in NE::SDL_Window.
int NE::Window::getBitsPerPixel | ( | void | ) | const [pure virtual] |
Get the number of bits per pixel.
Implemented in NE::SDL_Window.
void * NE::Window::getNativeWindow | ( | void | ) | const [protected, pure virtual] |
return a pointer to the native window handle
Implemented in NE::SDL_Window.
USize2 NE::Window::getWindowSize | ( | void | ) | const [pure virtual] |
bool NE::Window::needWindowClosure | ( | void | ) | const [pure virtual] |
Return if the window should be closed.
Implemented in NE::SDL_Window.