22 #ifndef ULTIMA4_EVENTS_EVENT_HANDLER_H 23 #define ULTIMA4_EVENTS_EVENT_HANDLER_H 25 #include "ultima/ultima4/events/timed_event_mgr.h" 26 #include "ultima/ultima4/controllers/key_handler_controller.h" 27 #include "ultima/ultima4/core/types.h" 28 #include "ultima/ultima4/gfx/screen.h" 29 #include "common/events.h" 30 #include "common/list.h" 31 #include "common/rect.h" 32 #include "common/str.h" 37 #define eventHandler (EventHandler::getInstance()) 39 #if defined(IOS_ULTIMA4) 41 typedef void *TimedManagerHelper;
42 typedef void *UIEvent;
44 @class TimedManagerHelper;
49 typedef void(*updateScreenCallback)();
57 int _ticksCtr, _ticksPerWalk;
58 KeybindingAction _action;
63 WalkTrigger() : _ticksCtr(0), _ticksPerWalk(0), _action(KEYBIND_NONE) {
74 void setDelta(Direction dir,
int distance);
91 bool _isRightButtonDown;
94 void handleMouseButtonDownEvent(
const Common::Event &event,
Controller *controller, updateScreenCallback updateScreen);
95 void handleMouseButtonUpEvent(
const Common::Event &event,
Controller *controller, updateScreenCallback updateScreen);
98 static bool _controllerDone;
102 MouseAreaList _mouseAreaSets;
103 updateScreenCallback _updateScreen;
118 static void sleep(uint usec);
123 static void wait_msecs(uint msecs);
128 static void wait_cycles(uint cycles);
130 static void setControllerDone(
bool exit =
true);
135 static bool getControllerDone();
143 void setScreenUpdate(
void (*updateScreen)(
void));
144 #if defined(IOS_ULTIMA4) 145 void handleEvent(UIEvent *);
146 static void controllerStopped_helper();
147 updateScreenCallback screenCallback() {
169 void popKeyHandler();
187 void pushMouseAreaSet(
const MouseArea *mouseAreas);
188 void popMouseAreaSet();
193 const MouseArea *getMouseAreaSet()
const;
195 const MouseArea *mouseAreaForPoint(
int x,
int y);
201 return _isRightButtonDown ? _walk.
getAction() : KEYBIND_NONE;
KeybindingAction getAction()
Definition: event_handler.h:200
Definition: event_handler.h:55
Definition: controller.h:35
Definition: timed_event_mgr.h:63
Definition: detection.h:27
WalkTrigger()
Definition: event_handler.h:63
Definition: key_handler_controller.h:33
void setDelta(Direction dir, int distance)
KeybindingAction getAction()
Definition: event_handler.h:86