diff options
Diffstat (limited to 'src/libjin/graphics/window.h')
-rw-r--r-- | src/libjin/graphics/window.h | 176 |
1 files changed, 88 insertions, 88 deletions
diff --git a/src/libjin/graphics/window.h b/src/libjin/graphics/window.h index c279e9b..605cebe 100644 --- a/src/libjin/graphics/window.h +++ b/src/libjin/graphics/window.h @@ -11,94 +11,94 @@ namespace JinEngine { - namespace Graphics - { - /// - /// - /// - class Window - : public Subsystem<Window> - { - public: - /// - /// - /// - struct Setting : SettingBase - { - public: - const char* title; ///< window title - const char* icon; ///< window icon - bool fullscreen; ///< full screen - int width, height; ///< window size - bool vsync; ///< vsync - int fps; ///< frame per second - bool resizable; ///< resizable - }; - - /// - /// - /// - Window() {}; - - /// - /// - /// - virtual ~Window() {}; - - /// - /// - /// - void setTitle(const char* title); - - /// - /// - /// - inline int getW(){ return mSize.w(); } - - /// - /// - /// - inline int getH(){ return mSize.h(); } - - /// - /// - /// - inline int getFPS(){ return mFps; } - - /// - /// - /// - void present(); - - /// - /// - /// - inline void hide() { SDL_HideWindow(mWnd); }; - - /// - /// - /// - void show() { SDL_ShowWindow(mWnd); }; - - private: - - /// - /// - /// - bool startSystem(const SettingBase* setting) override; - - /// - /// - /// - void quitSystem() override; - - SDL_Window* mWnd; - JinEngine::Math::Vector2<unsigned int> mSize; - int mFps; - - }; - - } // namespace Graphics + namespace Graphics + { + /// + /// + /// + class Window + : public Subsystem<Window> + { + public: + /// + /// + /// + struct Setting : SettingBase + { + public: + const char* title; ///< window title + const char* icon; ///< window icon + bool fullscreen; ///< full screen + int width, height; ///< window size + bool vsync; ///< vsync + int fps; ///< frame per second + bool resizable; ///< resizable + }; + + /// + /// + /// + Window() {}; + + /// + /// + /// + virtual ~Window() {}; + + /// + /// + /// + void setTitle(const char* title); + + /// + /// + /// + inline int getW(){ return mSize.w(); } + + /// + /// + /// + inline int getH(){ return mSize.h(); } + + /// + /// + /// + inline int getFPS(){ return mFps; } + + /// + /// + /// + void present(); + + /// + /// + /// + inline void hide() { SDL_HideWindow(mWnd); }; + + /// + /// + /// + void show() { SDL_ShowWindow(mWnd); }; + + private: + + /// + /// + /// + bool startSystem(const SettingBase* setting) override; + + /// + /// + /// + void quitSystem() override; + + SDL_Window* mWnd; + JinEngine::Math::Vector2<unsigned int> mSize; + int mFps; + + }; + + } // namespace Graphics } // namespace JinEngine #endif // jin_graphics |