Debian Codegraph @

tools/build-tool/data/ios/xcode_project/cge_project_name/castleiosappglue.h

raw symbols SCIP
1 /*
2 Copyright 2013-2017 Jan Adamec, Michalis Kamburelis.
3
4 This file is part of "Castle Game Engine".
5
6 "Castle Game Engine" is free software; see the file COPYING.txt,
7 included in the "Castle Game Engine" distribution,
8 for details about the copyright.
9
10 "Castle Game Engine" is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
14 ----------------------------------------------------------------------------
15 */
16
17
18 #ifndef CGE_IOSAPPGLUE_INCLUDED
19 #define CGE_IOSAPPGLUE_INCLUDED
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 enum ECgeTouchCtlInterface
26 {
27 ecgetciNone = 0,
28 ecgetciCtlWalkCtlRotate = 1,
29 ecgetciCtlWalkDragRotate = 2,
30 etciCtlFlyCtlWalkDragRotate = 3,
31 etciCtlPanXYDragRotate = 4,
32 };
33
34 enum ECgeMouseCursor
35 {
36 ecgecursorDefault = 0,
37 ecgecursorWait = 1,
38 ecgecursorHand = 2,
39 ecgecursorText = 3,
40 ecgecursorNone = 4,
41 };
42
43 enum ECgeLibCallbackCode
44 {
45 ecgelibNeedsDisplay = 0, // app should repaint the view (content changed)
46 ecgelibSetMouseCursor = 1, // sends ECgeMouseCursor in iParam1
47 ecgelibNavigationTypeChanged = 2, // sends ECgeNavigationType in iParam1
48 ecgelibSetMousePosition = 3, // sends x in iParam1 and y in iParam2
49 ecgelibWarning = 4, // sends message in szParam
50 };
51
52 enum ECgeKey // values for these constants have to be same as in unit CastleKeysMouse (TKey)
53 {
54 kcge_None = 0,
55 kcge_PrintScreen = 1,
56 kcge_CapsLock = 2,
57 kcge_ScrollLock = 3,
58 kcge_NumLock = 4,
59 kcge_Pause = 5,
60 kcge_Apostrophe = 6,
61 kcge_Semicolon = 7,
62 kcge_BackSpace = 8,
63 kcge_Tab = 9,
64 kcge_Slash = 10,
65 kcge_BackQuote = 11,
66 kcge_Minus = 12,
67 kcge_Enter = 13,
68 kcge_Equal = 14,
69 kcge_BackSlash = 15,
70 kcge_Shift = 16,
71 kcge_Ctrl = 17,
72 kcge_Alt = 18,
73 kcge_Plus = 19,
74 kcge_Escape = 27,
75 kcge_Space = 32,
76 kcge_PageUp = 33,
77 kcge_PageDown = 34,
78 kcge_End = 35,
79 kcge_Home = 36,
80 kcge_Left = 37,
81 kcge_Up = 38,
82 kcge_Right = 39,
83 kcge_Down = 40,
84 kcge_Insert = 45,
85 kcge_Delete = 46,
86 kcge_0 = 48,
87 kcge_1 = 49,
88 kcge_2 = 50,
89 kcge_3 = 51,
90 kcge_4 = 52,
91 kcge_5 = 53,
92 kcge_6 = 54,
93 kcge_7 = 55,
94 kcge_8 = 56,
95 kcge_9 = 57,
96 kcge_A = 65,
97 kcge_B = 66,
98 kcge_C = 67,
99 kcge_D = 68,
100 kcge_E = 69,
101 kcge_F = 70,
102 kcge_G = 71,
103 kcge_H = 72,
104 kcge_I = 73,
105 kcge_J = 74,
106 kcge_K = 75,
107 kcge_L = 76,
108 kcge_M = 77,
109 kcge_N = 78,
110 kcge_O = 79,
111 kcge_P = 80,
112 kcge_Q = 81,
113 kcge_R = 82,
114 kcge_S = 83,
115 kcge_T = 84,
116 kcge_U = 85,
117 kcge_V = 86,
118 kcge_W = 87,
119 kcge_X = 88,
120 kcge_Y = 89,
121 kcge_Z = 90,
122 kcge_LeftBracket = 91,
123 kcge_RightBracket = 92,
124 kcge_Numpad_Plus = 107,
125 kcge_Numpad_Minus = 109,
126 kcge_F1 = 112,
127 kcge_F2 = 113,
128 kcge_F3 = 114,
129 kcge_F4 = 115,
130 kcge_F5 = 116,
131 kcge_F6 = 117,
132 kcge_F7 = 118,
133 kcge_F8 = 119,
134 kcge_F9 = 120,
135 kcge_F10 = 121,
136 kcge_F11 = 122,
137 kcge_F12 = 123,
138 kcge_Numpad_0 = 140,
139 kcge_Numpad_1 = 141,
140 kcge_Numpad_2 = 142,
141 kcge_Numpad_3 = 143,
142 kcge_Numpad_4 = 144,
143 kcge_Numpad_5 = 145,
144 kcge_Numpad_6 = 146,
145 kcge_Numpad_7 = 147,
146 kcge_Numpad_8 = 148,
147 kcge_Numpad_9 = 149,
148 kcge_Numpad_End = 150,
149 kcge_Numpad_Down = 151,
150 kcge_Numpad_PageDown = 152,
151 kcge_Numpad_Left = 153,
152 kcge_Numpad_Begin = 154,
153 kcge_Numpad_Right = 155,
154 kcge_Numpad_Home = 156,
155 kcge_Numpad_Up = 157,
156 kcge_Numpad_PageUp = 158,
157 kcge_Numpad_Insert = 159,
158 kcge_Numpad_Delete = 160,
159 kcge_Numpad_Enter = 161,
160 kcge_Numpad_Multiply = 162,
161 kcge_Numpad_Divide = 163,
162 kcge_Pad_A = 164,
163 kcge_Pad_B = 165,
164 kcge_Pad_X = 166,
165 kcge_Pad_Y = 167,
166 kcge_Pad_L = 168,
167 kcge_Pad_R = 169,
168 kcge_Pad_ZL = 170,
169 kcge_Pad_ZR = 171,
170 kcge_Pad_Plus = 172,
171 kcge_Pad_Minus = 173,
172 kcge_Pad_Left = 174,
173 kcge_Pad_Up = 175,
174 kcge_Pad_Right = 176,
175 kcge_Pad_Down = 177,
176 kcge_Comma = 188,
177 kcge_Period = 190,
178 };
179
180 // __cdecl here causes warning:
181 // /Users/michalis/sources/cat-astrophe-games/escape_universe/trunk/castle-engine-output/ios/xcode_project/escape_universe/castleiosappglue.h:166:14: Calling convention '__cdecl' ignored for this target
182
183 typedef int (*TCgeLibraryCallback)(int /*ECgeLibCallbackCode*/eCode, int iParam1, int iParam2, const char *szParam);
184 typedef void (*TCgeReceiveMessageFromPascalCallback)(const char *message);
185
186 //-----------------------------------------------------------------------------
187
188 // Initialize the library, this function must be called first (required).
189 // Then CGEApp_Open and CGEApp_Close may be called multiple times.
190 extern void CGEApp_Initialize(const char *applicationConfigDirectory);
191 extern void CGEApp_Finalize(void);
192
193 extern int CGEApp_ContextProperties(int* redBits, int* greenBits, int* blueBits, int* alphaBits, int* depthBits, int* stencilBits, int* multiSampling);
194
195 extern void CGEApp_Open(unsigned initialWidth, unsigned initialHeight, unsigned initialStatusBarHeight, unsigned nDpi);
196 extern void CGEApp_Close(bool quitWhenLastWindowClosed);
197
198 extern void CGEApp_Resize(unsigned uiViewWidth, unsigned uiViewHeight, unsigned uiStatusBarHeight); // let the library know about the viewport size changes
199 extern void CGEApp_Render(void); // paints the 3d scene into the context
200 extern void CGEApp_SetLibraryCallbackProc(TCgeLibraryCallback pProc); // set callback function
201 extern void CGEApp_Update(void); // let the 3d engine perform the animations, etc
202
203 extern void CGEApp_MouseDown(int x, int y, bool bLeftBtn, int nFingerIdx); // [0,0] is the bottom-left corner!
204 extern void CGEApp_Motion(int x, int y, int nFingerIdx);
205 extern void CGEApp_MouseUp(int x, int y, bool bLeftBtn, int nFingerIdx, bool trackReleased);
206
207 extern void CGEApp_KeyDown(int /*ECgeKey*/ eKey);
208 extern void CGEApp_KeyUp(int /*ECgeKey*/ eKey);
209
210 extern void CGEApp_JoystickAxis(int joystickIndex, float x, float y);
211 extern void CGEApp_JoystickCount(int joystickCount);
212
213 extern int CGEApp_HandleOpenUrl(const char *szUrl); // open URL, return 1 if processed
214
215 extern void CGEApp_SetReceiveMessageFromPascalCallback(TCgeReceiveMessageFromPascalCallback aCallback);
216 extern void CGEApp_SendMessageToPascal(const char *message);
217
218 #ifdef __cplusplus
219 }
220 #endif
221
222 #endif //CGE_IOSAPPGLUE_INCLUDED