From 376d5bfe0f3b9658cbf2d4ca9b00c0600341ee85 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Tue, 25 Nov 2025 17:15:16 +0800 Subject: Clean code. Clean events of native window. --- include/cru/base/Event.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/cru/base/Event.h') diff --git a/include/cru/base/Event.h b/include/cru/base/Event.h index bdaf3ea6..71c0ac6b 100644 --- a/include/cru/base/Event.h +++ b/include/cru/base/Event.h @@ -141,6 +141,13 @@ class Event : public EventBase, public IEvent { public: \ ::cru::IEvent* name##Event() { return &name##Event_; } +#define CRU_DEFINE_EVENT_OVERRIDE(name, arg_type) \ + private: \ + ::cru::Event name##Event_; \ + \ + public: \ + ::cru::IEvent* name##Event() override { return &name##Event_; } + namespace details { struct EventHandlerRevokerCaller { void operator()(const EventHandlerRevoker& revoker) { revoker(); } -- cgit v1.2.3