Debian Codegraph @

src/gengine/InputAgent.h

raw
1 #ifndef HEADER_INPUTAGENT_H
2 #define HEADER_INPUTAGENT_H
3
4 class KeyBinder;
5 class InputHandler;
6
7 #include "BaseAgent.h"
8 #include "Name.h"
9 #include "V2.h"
10
11 #include "SDL.h"
12
13 /**
14 * Forward input events to handlers.
15 */
16 class InputAgent : public BaseAgent {
17 AGENT(InputAgent, Name::INPUT_NAME);
18 private:
19 Uint8 *m_keys;
20 KeyBinder *m_keyBinder;
21 InputHandler *m_handler;
22 private:
23 V2 getMouseState(Uint8 *out_buttons);
24 protected:
25 virtual void own_init();
26 virtual void own_update();
27 virtual void own_shutdown();
28 public:
29 void installHandler(InputHandler *handler);
30
31 KeyBinder *keyBinder() { return m_keyBinder; }
32 };
33
34 #endif