22#ifndef WINTERMUTE_PLUGIN_EVENT_H
23#define WINTERMUTE_PLUGIN_EVENT_H
31 WME_EVENT_SCENE_DRAW_BEGIN,
32 WME_EVENT_SCENE_DRAW_END,
34 WME_EVENT_SCENE_SHUTDOWN,
35 WME_EVENT_GAME_BEFORE_SAVE,
36 WME_EVENT_GAME_AFTER_LOAD,
40typedef void (*PluginApplyEvent)(
void *,
void *);
44 PluginApplyEvent _callback;
54 for (
auto it = _entries.begin(); it != _entries.end(); ++it) {
55 if (event._type == it->_type && event._callback == it->_callback) {
59 _entries.push_back(event);
63 for (
auto it = _entries.begin(); it != _entries.end(); ++it) {
64 if (event._type == it->_type && event._callback == it->_callback) {
71 void applyEvent(EWmeEvent type,
void *eventData) {
72 for (
auto it = _entries.begin(); it != _entries.end(); ++it) {
73 if (type == it->_type && it->_callback !=
nullptr) {
74 it->_callback(eventData, it->_plugin);
Definition: plugin_event.h:48
Definition: plugin_event.h:42