From 0f8f98b9005803ab154b43dcad0db1f292072a4d Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Mon, 17 Nov 2025 12:54:55 +0800 Subject: Refactor window host. --- include/cru/base/Event.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/cru/base') diff --git a/include/cru/base/Event.h b/include/cru/base/Event.h index 276c313f..c26bea83 100644 --- a/include/cru/base/Event.h +++ b/include/cru/base/Event.h @@ -128,6 +128,13 @@ class Event : public EventBase, public IEvent { EventHandlerToken current_token_ = 0; }; +#define CRU_DEFINE_EVENT(name, arg_type) \ + private: \ + ::cru::Event name##Event_; \ + \ + public: \ + ::cru::IEvent* name##Event() { return &name##Event_; } + namespace details { struct EventHandlerRevokerDestroyer { void operator()(EventHandlerRevoker* p) { -- cgit v1.2.3