File SDLWindowManager.h¶
-
namespace
Gsage -
class
SDLWindow: public Window Public Functions
-
SDLWindow(const std::string &name, SDL_Window *window)¶
-
virtual
~SDLWindow()¶
-
unsigned long long
getWindowHandle()¶ Get window handle
-
void *
getGLContext()¶ Get GL context
-
std::tuple<int, int>
getPosition() const¶ Get window position
-
virtual void
setPosition(int x, int y)¶ Sets window position
- Parameters
x:y:
-
virtual std::tuple<int, int>
getSize()¶ Get window size
-
void
setSize(int width, int height)¶ Set window size
- Parameters
width:height:
-
virtual std::tuple<int, int, int, int>
getDisplayBounds()¶ Get display size information Selects the display which contains current window position
-
virtual float
getScaleFactor() const¶ Get screen DPI that is used to display the window
-
virtual int
getDisplay() const¶ Get display index that contains the window
-
virtual void
show()¶ Show window
-
virtual void
hide()¶ Hide window
Friends
-
friend
Gsage::SDLWindowManager
-
-
class
SDLWindowManager: public WindowManager - #include <SDLWindowManager.h>
SDL Window Manager implementation
Public Functions
-
virtual
~SDLWindowManager()¶
-
bool
initialize(const DataProxy &config)¶ Inialize SDL system
- Parameters
config: SDLWindowManager
-
WindowPtr
createWindow(const std::string &name, unsigned int width, unsigned int height, bool fullscreen, const DataProxy ¶ms)¶ Create a window
- Return
newly created window pointer
- Parameters
create: a windowwidth: window widthheight: window heightfullscreen: create a fullscreen windowparams: additional parameters
-
virtual bool
destroyWindow(WindowPtr window)¶ Close a window
- Return
true if succeed
- Parameters
window: window pointer to destroy
-
virtual void
update(double time)¶ Update is used to render windows, whose rendering is handled by SDL2 itself
- Parameters
time: Delta time
Private Types
-
typedef std::unique_ptr<SDLRenderer>
SDLRendererPtr¶
-
virtual
-
class