| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- /*
- * author: Patrick-Christopher Mattulat
- * e-mail: webmaster@lynarstudios.com
- */
- #ifndef LS_ATLANTIS_ENGINE_WINDOW_SDL_WINDOW_API_HPP
- #define LS_ATLANTIS_ENGINE_WINDOW_SDL_WINDOW_API_HPP
- #include <Export.hpp>
- #include <interface/AStatusCode.hpp>
- #include <interface/ISdlApi.hpp>
- #include <interface/IWindowApi.hpp>
- #include <functional>
- #include <memory>
- namespace ls::atlantis::window
- {
- class LS_ATLANTIS_DYNAMIC_GOAL SdlWindowApi : public ls::atlantis::interfaces::IWindowApi
- {
- public:
- SdlWindowApi();
- explicit SdlWindowApi(const ::std::shared_ptr<ls::atlantis::interfaces::ISdlApi> &_sdlApi);
- ~SdlWindowApi() override;
- [[nodiscard]] ls::atlantis::glossary::WindowApiTypes getWindowApiType() override;
- [[nodiscard]] ::std::shared_ptr<ls::atlantis::interfaces::AStatusCode> init() override;
- private:
- [[nodiscard]] ::std::shared_ptr<ls::atlantis::interfaces::AStatusCode> _createWindow();
- [[nodiscard]] ::std::shared_ptr<ls::atlantis::interfaces::AStatusCode> _initApi() const;
- ::std::shared_ptr<ls::atlantis::interfaces::ISdlApi> sdlApi{};
- ::std::unique_ptr<SDL_Window, ::std::function<void(SDL_Window *)>> window{nullptr, [](SDL_Window *) {}};
- ls::atlantis::glossary::WindowApiTypes windowApiType{};
- };
- }
- #endif
|