From 5c4851e586b97f96f17180ba2574f02857be298a Mon Sep 17 00:00:00 2001 From: hyzboy Date: Thu, 17 Jul 2025 02:25:42 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E5=91=BD=E5=90=8DEventDispat?= =?UTF-8?q?cher?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Win/WinMessage.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Win/WinMessage.cpp b/src/Win/WinMessage.cpp index 52c85f5..cbf3852 100644 --- a/src/Win/WinMessage.cpp +++ b/src/Win/WinMessage.cpp @@ -17,7 +17,7 @@ namespace hgl #define PROP_DPIISOLATION L"PROP_ISOLATION" static KeyboardButton KeyConvert[256]{}; - static void (*WMProc[2048])(EventDispatch *,uint32,uint32){}; //消息处理队列 + static void (*WMProc[2048])(EventDispatcher *,uint32,uint32){}; //消息处理队列 void InitKeyConvert() { @@ -180,7 +180,7 @@ namespace hgl static EventHeader event_header; static WindowEventData window_event_data; - void WMProcDestroy(EventDispatch *ie,uint32,uint32) + void WMProcDestroy(EventDispatcher *ie,uint32,uint32) { event_header.type =InputEventSource::Window; event_header.index =0; @@ -192,7 +192,7 @@ namespace hgl static MouseEventData mouse_event_data; - #define WMEF_MOUSE(mouse_button,action) void WMProcMouse##mouse_button##action(EventDispatch *ie,uint32 wParam,uint32 lParam) \ + #define WMEF_MOUSE(mouse_button,action) void WMProcMouse##mouse_button##action(EventDispatcher *ie,uint32 wParam,uint32 lParam) \ { \ mouse_event_data.x=LOWORD(lParam); \ mouse_event_data.y=HIWORD(lParam); \ @@ -217,7 +217,7 @@ namespace hgl WMEF_MOUSE(Right,Released); WMEF_MOUSE(Right,DblClicked); - void WMProcMouseMove(EventDispatch *ie,uint32 wParam,uint32 lParam) + void WMProcMouseMove(EventDispatcher *ie,uint32 wParam,uint32 lParam) { mouse_event_data.x=LOWORD(lParam); mouse_event_data.y=HIWORD(lParam); @@ -231,7 +231,7 @@ namespace hgl } #undef WMEF_MOUSE - #define WMEF2(name) void name(EventDispatch *ie,uint32 wParam,uint32 lParam) + #define WMEF2(name) void name(EventDispatcher *ie,uint32 wParam,uint32 lParam) WMEF2(WMProcMouseWheel) { const int zDelta=GET_WHEEL_DELTA_WPARAM(wParam); @@ -279,7 +279,7 @@ namespace hgl static KeyboardEventData keyboard_event_data; - #define WMEF1(name) void name(EventDispatch *ie,uint32 wParam,uint32) + #define WMEF1(name) void name(EventDispatcher *ie,uint32 wParam,uint32) WMEF1(WMProcKeyDown) { event_header.type =InputEventSource::Keyboard; @@ -368,7 +368,7 @@ namespace hgl if(uMsg<2048) if(WMProc[uMsg]) { - EventDispatch *ie=(EventDispatch *)GetWindowLongPtrW(hWnd,GWLP_USERDATA); + EventDispatcher *ie=(EventDispatcher *)GetWindowLongPtrW(hWnd,GWLP_USERDATA); if(ie) WMProc[uMsg](ie,wParam,lParam);