예제 #1
0
	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;
	}
예제 #2
0
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);
	    }
	}
}