aboutsummaryrefslogtreecommitdiff
path: root/include/cru/win/gui/WindowNativeMessageEventArgs.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-02-08 16:53:51 +0800
committercrupest <crupest@outlook.com>2022-02-08 16:53:51 +0800
commit74bb9cd27242b9320f99ff4d2b50c3051576cc14 (patch)
tree744bac5799c593d1d6f81e7b09581bea626f2cde /include/cru/win/gui/WindowNativeMessageEventArgs.hpp
parentb90c398de829d1ba5329651d75bae82f5e4085fe (diff)
downloadcru-74bb9cd27242b9320f99ff4d2b50c3051576cc14.tar.gz
cru-74bb9cd27242b9320f99ff4d2b50c3051576cc14.tar.bz2
cru-74bb9cd27242b9320f99ff4d2b50c3051576cc14.zip
...
Diffstat (limited to 'include/cru/win/gui/WindowNativeMessageEventArgs.hpp')
-rw-r--r--include/cru/win/gui/WindowNativeMessageEventArgs.hpp40
1 files changed, 0 insertions, 40 deletions
diff --git a/include/cru/win/gui/WindowNativeMessageEventArgs.hpp b/include/cru/win/gui/WindowNativeMessageEventArgs.hpp
deleted file mode 100644
index 7e62c19d..00000000
--- a/include/cru/win/gui/WindowNativeMessageEventArgs.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-#pragma once
-#include "Base.hpp"
-
-#include "cru/common/Base.hpp"
-
-namespace cru::platform::gui::win {
-struct CRU_WIN_GUI_API WindowNativeMessage {
- HWND hwnd;
- UINT msg;
- WPARAM w_param;
- LPARAM l_param;
-};
-
-class CRU_WIN_GUI_API WindowNativeMessageEventArgs : public Object {
- public:
- WindowNativeMessageEventArgs(const WindowNativeMessage& message)
- : message_(message) {}
- CRU_DEFAULT_COPY(WindowNativeMessageEventArgs)
- CRU_DEFAULT_MOVE(WindowNativeMessageEventArgs)
- ~WindowNativeMessageEventArgs() override = default;
-
- const WindowNativeMessage& GetWindowMessage() const { return message_; }
-
- LRESULT GetResult() const { return result_; }
- void SetResult(LRESULT result) { result_ = result; }
-
- bool IsHandled() const { return handled_; }
- void SetHandled(bool handled) { handled_ = handled; }
-
- void HandleWithResult(LRESULT result) {
- handled_ = true;
- result_ = result;
- }
-
- private:
- WindowNativeMessage message_;
- LRESULT result_;
- bool handled_ = false;
-};
-} // namespace cru::platform::gui::win