ScummVM API documentation
input_translator.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef ULTIMA_SHARED_ENGINE_INPUT_TRANSLATOR_H
23 #define ULTIMA_SHARED_ENGINE_INPUT_TRANSLATOR_H
24 
25 #include "common/keyboard.h"
26 #include "ultima/shared/engine/messages.h"
27 
28 namespace Ultima {
29 namespace Shared {
30 
31 class InputHandler;
32 
34 private:
38  int getButtons(int special) const;
39 public:
40  InputHandler *_inputHandler;
41 public:
42  InputTranslator(InputHandler *inputHandler);
43 
44  void mouseMove(int special, const Point &pt);
45  void mouseDrag(int special, const Point &pt);
46  void leftButtonDown(int special, const Point &pt);
47  void leftButtonUp(int special, const Point &pt);
48  void leftButtonDoubleClick(int special, const Point &pt);
49  void middleButtonDown(int special, const Point &pt);
50  void middleButtonUp(int special, const Point &pt);
51  void middleButtonDoubleClick(int special, const Point &pt);
52  void rightButtonDown(int special, const Point &pt);
53  void rightButtonUp(int special, const Point &pt);
54  void mouseWheel(bool wheelUp, const Point &pt);
55  void rightButtonDoubleClick(int special, const Point &pt);
56  void keyDown(const Common::KeyState &keyState);
57 
61  bool isMousePressed() const;
62 };
63 
64 } // End of namespace Shared
65 } // End of namespace Ultima
66 
67 #endif
Definition: input_translator.h:33
Definition: input.h:165
Definition: input_handler.h:33
Definition: detection.h:27
Definition: rect.h:45
Definition: keyboard.h:294