diff options
author | crupest <crupest@outlook.com> | 2022-02-08 21:15:31 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-02-08 21:15:31 +0800 |
commit | 5d7dcef619bd1f866684b57351dde2efbda6959c (patch) | |
tree | ab63bd149854ce0cf4cad338dd962e5ea613010b /include | |
parent | fa1764d7cb77aa683c6049f915a46b981f9161f7 (diff) | |
download | cru-5d7dcef619bd1f866684b57351dde2efbda6959c.tar.gz cru-5d7dcef619bd1f866684b57351dde2efbda6959c.tar.bz2 cru-5d7dcef619bd1f866684b57351dde2efbda6959c.zip |
...
Diffstat (limited to 'include')
-rw-r--r-- | include/cru/ui/host/WindowHost.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/cru/ui/host/WindowHost.h b/include/cru/ui/host/WindowHost.h index caa50397..8a8f1da5 100644 --- a/include/cru/ui/host/WindowHost.h +++ b/include/cru/ui/host/WindowHost.h @@ -29,7 +29,9 @@ class CRU_UI_API WindowHost : public Object { ~WindowHost() override; public: - platform::gui::INativeWindow* GetNativeWindow() { return native_window_; } + platform::gui::INativeWindow* GetNativeWindow() { + return native_window_.get(); + } // Mark the layout as invalid, and arrange a re-layout later. // This method could be called more than one times in a message cycle. But @@ -103,7 +105,7 @@ class CRU_UI_API WindowHost : public Object { void SetOverrideCursor(std::shared_ptr<platform::gui::ICursor> cursor); private: - gsl::not_null<platform::gui::INativeWindow*> CreateNativeWindow(); + std::unique_ptr<platform::gui::INativeWindow> CreateNativeWindow(); //*************** region: native messages *************** void OnNativeDestroy(platform::gui::INativeWindow* window, std::nullptr_t); @@ -140,7 +142,7 @@ class CRU_UI_API WindowHost : public Object { controls::Control* root_control_ = nullptr; render::RenderObject* root_render_object_ = nullptr; - platform::gui::INativeWindow* native_window_ = nullptr; + std::unique_ptr<platform::gui::INativeWindow> native_window_; std::unique_ptr<LayoutPaintCycler> layout_paint_cycler_; |