22 #ifndef FIFE_EVENTCHANNEL_EVENTMANAGER_H
23 #define FIFE_EVENTCHANNEL_EVENTMANAGER_H
39 #include "eventchannel/command/ec_command.h"
40 #include "eventchannel/command/ec_icommandcontroller.h"
41 #include "eventchannel/command/ec_icommandlistener.h"
43 #include "eventchannel/key/ec_ikeycontroller.h"
44 #include "eventchannel/key/ec_ikeylistener.h"
45 #include "eventchannel/key/ec_keyevent.h"
46 #include "eventchannel/key/ec_key.h"
48 #include "eventchannel/mouse/ec_imousecontroller.h"
49 #include "eventchannel/mouse/ec_imouselistener.h"
50 #include "eventchannel/mouse/ec_mouseevent.h"
52 #include "eventchannel/sdl/ec_isdleventcontroller.h"
53 #include "eventchannel/sdl/ec_isdleventlistener.h"
57 class ICommandListener;
110 void processActiveEvent(SDL_Event event);
111 void processKeyEvent(SDL_Event event);
112 void processMouseEvent(SDL_Event event);
113 bool combineEvents(SDL_Event& event1,
const SDL_Event& event2);
116 bool dispatchSdlEvent(SDL_Event& evt);
117 void dispatchKeyEvent(
KeyEvent& evt);
122 void fillKeyEvent(
const SDL_Event& sdlevt,
KeyEvent& keyevt);
123 void fillMouseEvent(
const SDL_Event& sdlevt,
MouseEvent& mouseevt);
125 std::deque<ICommandListener*> m_commandlisteners;
126 std::deque<ICommandListener*> m_pending_commandlisteners;
127 std::deque<ICommandListener*> m_pending_commandlisteners_front;
128 std::deque<ICommandListener*> m_pending_cldeletions;
130 std::deque<IKeyListener*> m_keylisteners;
131 std::deque<IKeyListener*> m_pending_keylisteners;
132 std::deque<IKeyListener*> m_pending_keylisteners_front;
133 std::deque<IKeyListener*> m_pending_kldeletions;
135 std::deque<IMouseListener*> m_mouselisteners;
136 std::deque<IMouseListener*> m_pending_mouselisteners;
137 std::deque<IMouseListener*> m_pending_mouselisteners_front;
138 std::deque<IMouseListener*> m_pending_mldeletions;
140 std::deque<ISdlEventListener*> m_sdleventlisteners;
141 std::deque<ISdlEventListener*> m_pending_sdleventlisteners;
142 std::deque<ISdlEventListener*> m_pending_sdleventlisteners_front;
143 std::deque<ISdlEventListener*> m_pending_sdldeletions;
145 std::map<int, bool> m_keystatemap;