ScummVM API documentation
ios7_common.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 BACKENDS_PLATFORM_IOS7_IOS7_COMMON_H
23 #define BACKENDS_PLATFORM_IOS7_IOS7_COMMON_H
24 
25 #include "graphics/surface.h"
26 
27 
28 enum InputEvent {
29  kInputTouchBegan,
30  kInputTouchMoved,
31  kInputMouseLeftButtonDown,
32  kInputMouseLeftButtonUp,
33  kInputMouseRightButtonDown,
34  kInputMouseRightButtonUp,
35  kInputMouseDelta,
36  kInputOrientationChanged,
37  kInputKeyPressed,
38  kInputApplicationSuspended,
39  kInputApplicationResumed,
40  kInputApplicationSaveState,
41  kInputApplicationClearState,
42  kInputApplicationRestoreState,
43  kInputSwipe,
44  kInputTap,
45  kInputLongPress,
46  kInputMainMenu,
47  kInputJoystickAxisMotion,
48  kInputJoystickButtonDown,
49  kInputJoystickButtonUp,
50  kInputScreenChanged,
51  kInputTouchModeChanged
52 };
53 
54 enum ScreenOrientation {
55  kScreenOrientationAuto,
56  kScreenOrientationPortrait,
57  kScreenOrientationFlippedPortrait,
58  kScreenOrientationLandscape,
59  kScreenOrientationFlippedLandscape
60 };
61 
62 enum DirectionalInput {
63  kDirectionalInputThumbstick,
64  kDirectionalInputDpad,
65 };
66 
67 enum TouchMode {
68  kTouchModeDirect,
69  kTouchModeTouchpad,
70 };
71 
72 enum UIViewSwipeDirection {
73  kUIViewSwipeUp = 1,
74  kUIViewSwipeDown = 2,
75  kUIViewSwipeLeft = 4,
76  kUIViewSwipeRight = 8
77 };
78 
79 enum UIViewTapDescription {
80  kUIViewTapSingle = 1,
81  kUIViewTapDouble = 2
82 };
83 
84 enum UIViewLongPressDescription {
85  UIViewLongPressStarted = 1,
86  UIViewLongPressEnded = 2
87 };
88 
89 struct InternalEvent {
90  InternalEvent() : type(), value1(), value2() {}
91  InternalEvent(InputEvent t, int v1, int v2) : type(t), value1(v1), value2(v2) {}
92 
93  InputEvent type;
94  int value1, value2;
95 };
96 
97 // On the ObjC side
98 
99 extern int iOS7_argc;
100 extern char **iOS7_argv;
101 
102 bool iOS7_fetchEvent(InternalEvent *event);
103 bool iOS7_isBigDevice();
104 
105 void iOS7_buildSharedOSystemInstance();
106 void iOS7_main(int argc, char **argv);
107 Common::String iOS7_getDocumentsDir();
108 Common::String iOS7_getAppBundleDir();
109 TouchMode iOS7_getCurrentTouchMode();
110 
111 #endif
Definition: str.h:59
Definition: ios7_common.h:89