From 7351020a582d70a1495249fba87d342c8a1fb634 Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 10 Apr 2019 19:42:46 +0800 Subject: Refactor. --- include/cru/ui/window.hpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'include/cru/ui/window.hpp') diff --git a/include/cru/ui/window.hpp b/include/cru/ui/window.hpp index 9a76f30f..0a81e2e1 100644 --- a/include/cru/ui/window.hpp +++ b/include/cru/ui/window.hpp @@ -5,7 +5,7 @@ #include -namespace cru::platform { +namespace cru::platform::native { struct NativeWindow; } @@ -38,7 +38,7 @@ class Window final : public ContentControl { render::RenderObject* GetRenderObject() const override; - platform::NativeWindow* GetNativeWindow() const { return native_window_; } + platform::native::NativeWindow* GetNativeWindow() const { return native_window_; } Control* GetMouseHoverControl() const { return mouse_hover_control_; } @@ -66,13 +66,14 @@ class Window final : public ContentControl { void OnNativeMouseEnterLeave(bool enter); void OnNativeMouseMove(const Point& point); - void OnNativeMouseDown(platform::MouseButton button, const Point& point); - void OnNativeMouseUp(platform::MouseButton button, const Point& point); + void OnNativeMouseDown(platform::native::MouseButton button, + const Point& point); + void OnNativeMouseUp(platform::native::MouseButton button, + const Point& point); void OnNativeKeyDown(int virtual_code); void OnNativeKeyUp(int virtual_code); - //*************** region: event dispatcher helper *************** void DispatchMouseHoverControlChangeEvent(Control* old_control, @@ -80,7 +81,7 @@ class Window final : public ContentControl { const Point& point); private: - platform::NativeWindow* native_window_; + platform::native::NativeWindow* native_window_; EventRevokerGuard event_revoker_guard_; std::shared_ptr render_object_; -- cgit v1.2.3