aboutsummaryrefslogtreecommitdiff
path: root/include/cru/win/gui/WindowNativeMessageEventArgs.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-05-15 13:56:40 +0800
committercrupest <crupest@outlook.com>2022-05-15 13:56:40 +0800
commit9e0c9d3499bc50c3534b4dc500d8b5d0b5f22752 (patch)
tree7342f6991771fa31b16fd6a5ed892ff6025f3d05 /include/cru/win/gui/WindowNativeMessageEventArgs.h
parent41de54bad2c0f857821fcc83f41af3334d068b6d (diff)
downloadcru-9e0c9d3499bc50c3534b4dc500d8b5d0b5f22752.tar.gz
cru-9e0c9d3499bc50c3534b4dc500d8b5d0b5f22752.tar.bz2
cru-9e0c9d3499bc50c3534b4dc500d8b5d0b5f22752.zip
...
Diffstat (limited to 'include/cru/win/gui/WindowNativeMessageEventArgs.h')
-rw-r--r--include/cru/win/gui/WindowNativeMessageEventArgs.h40
1 files changed, 0 insertions, 40 deletions
diff --git a/include/cru/win/gui/WindowNativeMessageEventArgs.h b/include/cru/win/gui/WindowNativeMessageEventArgs.h
deleted file mode 100644
index bc85a597..00000000
--- a/include/cru/win/gui/WindowNativeMessageEventArgs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#pragma once
-#include "Base.h"
-
-#include "cru/common/Base.h"
-
-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