aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/host/WindowHost.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/ui/host/WindowHost.h')
-rw-r--r--include/cru/ui/host/WindowHost.h8
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_;