mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-06-07 08:30:26 +00:00
hostevents: add prost-processing signal.
This commit is contained in:
parent
233ab778b6
commit
6b8fe50f50
|
@ -67,4 +67,7 @@ void EventManager::poll_events()
|
||||||
unhandled_events++;
|
unhandled_events++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// perform post-processing
|
||||||
|
this->_post_signal.emit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,12 +71,18 @@ public:
|
||||||
_mouse_signal.connect_method(inst, func);
|
_mouse_signal.connect_method(inst, func);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
void add_post_handler(T *inst, void (T::*func)()) {
|
||||||
|
_post_signal.connect_method(inst, func);
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static EventManager* event_manager;
|
static EventManager* event_manager;
|
||||||
EventManager() {}; // private constructor to implement a singleton
|
EventManager() {}; // private constructor to implement a singleton
|
||||||
|
|
||||||
CoreSignal<const WindowEvent&> _window_signal;
|
CoreSignal<const WindowEvent&> _window_signal;
|
||||||
CoreSignal<const MouseEvent&> _mouse_signal;
|
CoreSignal<const MouseEvent&> _mouse_signal;
|
||||||
|
CoreSignal<> _post_signal;
|
||||||
|
|
||||||
uint64_t events_captured = 0;
|
uint64_t events_captured = 0;
|
||||||
uint64_t unhandled_events = 0;
|
uint64_t unhandled_events = 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user