added optional button to restart game (door, panel and touch variants)
[rocksndiamonds.git] / src / events.h
1 // ============================================================================
2 // Rocks'n'Diamonds - McDuffin Strikes Back!
3 // ----------------------------------------------------------------------------
4 // (c) 1995-2014 by Artsoft Entertainment
5 //                  Holger Schemel
6 //                  info@artsoft.org
7 //                  https://www.artsoft.org/
8 // ----------------------------------------------------------------------------
9 // events.h
10 // ============================================================================
11
12 #ifndef EVENTS_H
13 #define EVENTS_H
14
15 #include "main.h"
16
17
18 #define USEREVENT_NONE                  0
19 #define USEREVENT_ANIM_DELAY_ACTION     1
20 #define USEREVENT_ANIM_EVENT_ACTION     2
21 #define USEREVENT_GADGET_PRESSED        3
22
23
24 void SetPlayfieldMouseCursorEnabled(boolean);
25
26 int FilterMouseMotionEvents(void *, Event *);
27 boolean NextValidEvent(Event *);
28 void StopProcessingEvents(void);
29
30 void EventLoop(void);
31 void HandleOtherEvents(Event *);
32 void ClearAutoRepeatKeyEvents(void);
33 void ClearEventQueue(void);
34 void ClearPlayerAction(void);
35
36 void HandleButtonEvent(ButtonEvent *);
37 void HandleMotionEvent(MotionEvent *);
38 void HandleWheelEvent(WheelEvent *);
39 void HandleWindowEvent(WindowEvent *);
40 void HandleFingerEvent(FingerEvent *);
41 void HandleTextEvent(TextEvent *);
42 void HandlePauseResumeEvent(PauseResumeEvent *);
43 boolean HandleKeysDebug(Key, int);
44 void HandleKeyEvent(KeyEvent *);
45 void HandleDropEvent(Event *);
46 void HandleUserEvent(UserEvent *);
47
48 void HandleToonAnimations(void);
49
50 void HandleButton(int, int, int, int);
51 void HandleKey(Key, int);
52 void HandleJoystick(void);
53 void HandleSpecialGameControllerButtons(Event *);
54 void HandleSpecialGameControllerKeys(Key, int);
55
56 boolean DoKeysymAction(int);
57
58 #endif