22 #ifndef ILLUSIONS_INPUT_H 23 #define ILLUSIONS_INPUT_H 25 #include "common/array.h" 26 #include "common/events.h" 27 #include "common/keyboard.h" 28 #include "common/rect.h" 29 #include "illusions/illusions.h" 35 MOUSE_LEFT_BUTTON = 1,
36 MOUSE_RIGHT_BUTTON = 2
60 void addMouseButton(
int mouseButton);
72 uint getBitMask()
const {
return _bitMask; }
82 bool pollEvent(uint evt);
84 void discardEvent(uint evt);
85 void discardAllEvents();
86 bool pollButton(uint bitMask);
87 void activateButton(uint bitMask);
88 void deactivateButton(uint bitMask);
92 InputEvent& setInputEvent(uint evt, uint bitMask);
93 bool isCursorMovedByKeyboard()
const {
return _cursorMovedByKeyboard; }
94 bool isCheatModeActive();
95 void setCheatModeActive(
bool active);
98 uint _buttonStates, _newButtons, _buttonsDown;
103 bool _cursorMovedByKeyboard;
105 void handleKey(Common::KeyCode key,
int mouseButton,
bool down);
106 void handleMouseButton(
int mouseButton,
bool down);
107 void discardButtons(uint bitMask);
108 bool lookButtonStates(uint bitMask);
109 bool lookNewButtons(uint bitMask);
110 void setButtonState(uint bitMask);
111 void moveCursorByKeyboard(
int deltaX,
int deltaY);
116 #endif // ILLUSIONS_INPUT_H
uint32 CustomEventType
Definition: events.h:193