bool EventLoop::HandleMessage(const Message &msg){ auto header = msg.Header(); wm_Event e = WM_ParseMessage(&header); if(e.window_id){ return HandleEvent(e); } return true; }
void BTOS_PumpEvents(_THIS){ bt_msg_filter filt = WM_GetEventFilter(); bt_msg_header msg = bt_recv_filtered(filt, false); if(msg.valid){ wm_Event event = WM_ParseMessage(&msg); if(event.type & wm_KeyboardEvents){ _BTOS_HandleKeyboardEvent(&event); }else if(event.type & wm_PointerEvents){ _BTOS_HandlePointerEvent(&event); }else if(event.type & wm_FrameEvents){ _BTOS_HandleFrameEvent(&event); } } }