From 8fc4e33b97372d93b1bcc4b598e5c8e2f15652d8 Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 3 Jan 2020 00:43:46 +0800 Subject: ... --- include/cru/platform/native/window.hpp | 1 + include/cru/ui/window.hpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'include/cru') diff --git a/include/cru/platform/native/window.hpp b/include/cru/platform/native/window.hpp index 84193a13..9f2e2e71 100644 --- a/include/cru/platform/native/window.hpp +++ b/include/cru/platform/native/window.hpp @@ -69,6 +69,7 @@ struct INativeWindow : virtual INativeResource { // See INativeWindow for more info. struct INativeWindowResolver : virtual INativeResource { + // Think twice before you save the return value. virtual INativeWindow* Resolve() = 0; }; } // namespace cru::platform::native diff --git a/include/cru/ui/window.hpp b/include/cru/ui/window.hpp index 105063d9..9f37c9d5 100644 --- a/include/cru/ui/window.hpp +++ b/include/cru/ui/window.hpp @@ -17,6 +17,8 @@ namespace render { class WindowRenderObject; } +// TODO: Make Window able to be invalid and handle operations in invalidity +// situation. class Window final : public ContentControl, public SelfResolvable { friend class Control; @@ -43,7 +45,7 @@ class Window final : public ContentControl, public SelfResolvable { render::RenderObject* GetRenderObject() const override; - platform::native::INativeWindow* GetNativeWindow(); + platform::native::INativeWindow* ResolveNativeWindow(); // Get current control that mouse hovers on. This ignores the mouse-capture // control. Even when mouse is captured by another control, this function -- cgit v1.2.3