2
// C++ Interface: IInputAdapter
7
// Author: Erik Hjortsberg <erik.hjortsberg@gmail.com>, (C) 2005
9
// This program is free software; you can redistribute it and/or modify
10
// it under the terms of the GNU General Public License as published by
11
// the Free Software Foundation; either version 2 of the License, or
12
// (at your option) any later version.
14
// This program is distributed in the hope that it will be useful,
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
// GNU General Public License for more details.
19
// You should have received a copy of the GNU General Public License
20
// along with this program; if not, write to the Free Software
21
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.//
23
#ifndef EMBEROGREIINPUTADAPTOR_H
24
#define EMBEROGREIINPUTADAPTOR_H
35
@brief An adapter class which is used to listen to events from the Input class, when the system is in gui input mode.
36
Use instances of this if you want to hook into the input system and override the default gui handling.
37
@author Erik Hjortsberg <erik.hjortsberg@gmail.com>
43
virtual ~IInputAdapter() {}
45
* Injects a mouse move. Returns false if the event shouldn't be processed any more.
48
* @return true if other IInputAdapters should continue handle the event, false if no more handling should happen
50
virtual bool injectMouseMove(const MouseMotion& motion, bool& freezeMouse) = 0;
52
* Injects a mouse button up event. Returns false if the event shouldn't be processed any more.
54
* @return true if other IInputAdapters should continue handle the event, false if no more handling should happen
56
virtual bool injectMouseButtonUp(const Input::MouseButton& button) = 0;
58
* Injects a mouse button down event. Returns false if the event shouldn't be processed any more.
60
* @return true if other IInputAdapters should continue handle the event, false if no more handling should happen
62
virtual bool injectMouseButtonDown(const Input::MouseButton& button) = 0;
64
* Injects a character. Returns false if the event shouldn't be processed any more.
66
* @return true if other IInputAdapters should continue handle the event, false if no more handling should happen
68
virtual bool injectChar(char character) = 0;
70
* Injects a key down event. Returns false if the event shouldn't be processed any more.
72
* @return true if other IInputAdapters should continue handle the event, false if no more handling should happen
74
virtual bool injectKeyDown(const SDLKey& key) = 0;
76
* Injects a key up event. Returns false if the event shouldn't be processed any more.
78
* @return true if other IInputAdapters should continue handle the event, false if no more handling should happen
80
virtual bool injectKeyUp(const SDLKey& key) = 0;