commit | author | age
|
9bb554
|
1 |
#pragma once |
H |
2 |
|
|
3 |
#include <stdint.h> |
|
4 |
|
|
5 |
#ifdef __OBJC__ |
|
6 |
@class UIScreen; |
|
7 |
@class UIWindow; |
|
8 |
@class UIView; |
|
9 |
@class UIViewController; |
|
10 |
@class UIEvent; |
|
11 |
@class UILocalNotification; |
|
12 |
@class NSString; |
|
13 |
@class NSDictionary; |
|
14 |
@class NSSet; |
|
15 |
@class NSData; |
|
16 |
@class NSError; |
|
17 |
@class NSBundle; |
|
18 |
|
|
19 |
@class UnityViewControllerBase; |
|
20 |
#else |
|
21 |
typedef struct objc_object UIScreen; |
|
22 |
typedef struct objc_object UIWindow; |
|
23 |
typedef struct objc_object UIView; |
|
24 |
typedef struct objc_object UIViewController; |
|
25 |
typedef struct objc_object UIEvent; |
|
26 |
typedef struct objc_object UILocalNotification; |
|
27 |
typedef struct objc_object NSString; |
|
28 |
typedef struct objc_object NSDictionary; |
|
29 |
typedef struct objc_object NSSet; |
|
30 |
typedef struct objc_object NSError; |
|
31 |
typedef struct objc_object NSData; |
|
32 |
typedef struct objc_object NSBundle; |
|
33 |
|
|
34 |
typedef struct objc_object UnityViewControllerBase; |
|
35 |
#endif |
|
36 |
|
|
37 |
// unity internal audio effect definition struct |
|
38 |
struct UnityAudioEffectDefinition; |
|
39 |
|
|
40 |
// new unity rendering api |
|
41 |
struct IUnityInterfaces; |
|
42 |
|
|
43 |
// be aware that this struct is shared with unity implementation so you should absolutely not change it |
|
44 |
struct UnityFrameStats |
|
45 |
{ |
|
46 |
uint64_t fixedBehaviourManagerDt; |
|
47 |
uint64_t fixedPhysicsManagerDt; |
|
48 |
uint64_t dynamicBehaviourManagerDt; |
|
49 |
uint64_t coroutineDt; |
|
50 |
uint64_t skinMeshUpdateDt; |
|
51 |
uint64_t animationUpdateDt; |
|
52 |
uint64_t renderDt; |
|
53 |
uint64_t cullingDt; |
|
54 |
uint64_t clearDt; |
|
55 |
int fixedUpdateCount; |
|
56 |
|
|
57 |
int batchCount; |
|
58 |
uint64_t drawCallTime; |
|
59 |
int drawCallCount; |
|
60 |
int triCount; |
|
61 |
int vertCount; |
|
62 |
|
|
63 |
uint64_t dynamicBatchDt; |
|
64 |
int dynamicBatchCount; |
|
65 |
int dynamicBatchedDrawCallCount; |
|
66 |
int dynamicBatchedTris; |
|
67 |
int dynamicBatchedVerts; |
|
68 |
|
|
69 |
int staticBatchCount; |
|
70 |
int staticBatchedDrawCallCount; |
|
71 |
int staticBatchedTris; |
|
72 |
int staticBatchedVerts; |
|
73 |
}; |
|
74 |
|
|
75 |
|
|
76 |
// be aware that this enum is shared with unity implementation so you should absolutely not change it |
|
77 |
typedef enum |
|
78 |
LogType |
|
79 |
{ |
|
80 |
logError = 0, |
|
81 |
logAssert = 1, |
|
82 |
logWarning = 2, |
|
83 |
logLog = 3, |
|
84 |
logException = 4, |
|
85 |
logDebug = 5, |
|
86 |
} |
|
87 |
LogType; |
|
88 |
|
|
89 |
|
|
90 |
// be aware that this enum is shared with unity implementation so you should absolutely not change it |
|
91 |
typedef enum |
|
92 |
DeviceGeneration |
|
93 |
{ |
|
94 |
deviceUnknown = 0, |
|
95 |
deviceiPhone3GS = 3, |
|
96 |
deviceiPhone4 = 8, |
|
97 |
deviceiPodTouch4Gen = 9, |
|
98 |
deviceiPad2Gen = 10, |
|
99 |
deviceiPhone4S = 11, |
|
100 |
deviceiPad3Gen = 12, |
|
101 |
deviceiPhone5 = 13, |
|
102 |
deviceiPodTouch5Gen = 14, |
|
103 |
deviceiPadMini1Gen = 15, |
|
104 |
deviceiPad4Gen = 16, |
|
105 |
deviceiPhone5C = 17, |
|
106 |
deviceiPhone5S = 18, |
|
107 |
deviceiPadAir1 = 19, |
|
108 |
deviceiPadMini2Gen = 20, |
|
109 |
deviceiPhone6 = 21, |
|
110 |
deviceiPhone6Plus = 22, |
|
111 |
deviceiPadMini3Gen = 23, |
|
112 |
deviceiPadAir2 = 24, |
|
113 |
deviceiPhone6S = 25, |
|
114 |
deviceiPhone6SPlus = 26, |
|
115 |
deviceiPadPro1Gen = 27, |
|
116 |
deviceiPadMini4Gen = 28, |
|
117 |
deviceiPhoneSE1Gen = 29, |
|
118 |
deviceiPadPro10Inch1Gen = 30, |
|
119 |
deviceiPhone7 = 31, |
|
120 |
deviceiPhone7Plus = 32, |
|
121 |
deviceiPodTouch6Gen = 33, |
|
122 |
deviceiPad5Gen = 34, |
|
123 |
deviceiPadPro2Gen = 35, |
|
124 |
deviceiPadPro10Inch2Gen = 36, |
|
125 |
|
|
126 |
deviceiPhoneUnknown = 10001, |
|
127 |
deviceiPadUnknown = 10002, |
|
128 |
deviceiPodTouchUnknown = 10003, |
|
129 |
} |
|
130 |
DeviceGeneration; |
|
131 |
|
|
132 |
|
|
133 |
// be aware that this enum is shared with unity implementation so you should absolutely not change it |
|
134 |
typedef enum |
|
135 |
ScreenOrientation |
|
136 |
{ |
|
137 |
orientationUnknown, |
|
138 |
portrait, |
|
139 |
portraitUpsideDown, |
|
140 |
landscapeLeft, |
|
141 |
landscapeRight, |
|
142 |
|
|
143 |
orientationCount, |
|
144 |
} |
|
145 |
ScreenOrientation; |
|
146 |
|
|
147 |
|
|
148 |
// be aware that this enum is shared with unity implementation so you should absolutely not change it |
|
149 |
typedef enum |
|
150 |
AppInBackgroundBehavior |
|
151 |
{ |
|
152 |
appbgCustom = -1, |
|
153 |
appbgSuspend = 0, |
|
154 |
appbgExit = 1, |
|
155 |
} |
|
156 |
AppInBackgroundBehavior; |
|
157 |
|
|
158 |
|
|
159 |
// this dictates touches processing on os level: should we transform touches to unity view coords or not. |
|
160 |
// N.B. touch.position will always be adjusted to current resolution |
|
161 |
// i.e. if you touch right border of view, touch.position.x will be Screen.width, not view.width |
|
162 |
// to get coords in view space (os-coords), use touch.rawPosition |
|
163 |
typedef enum |
|
164 |
ViewTouchProcessing |
|
165 |
{ |
|
166 |
// the touches originated from view will be ignored by unity |
|
167 |
touchesIgnored = 0, |
|
168 |
|
|
169 |
// touches would be processed as if they were originated in unity view: |
|
170 |
// coords will be transformed from view coords to unity view coords |
|
171 |
touchesTransformedToUnityViewCoords = 1, |
|
172 |
|
|
173 |
// touches coords will be kept intact (in originated view coords) |
|
174 |
// it is default value |
|
175 |
touchesKeptInOriginalViewCoords = 2, |
|
176 |
} |
|
177 |
ViewTouchProcessing; |
|
178 |
|
|
179 |
#ifdef __cplusplus |
|
180 |
extern bool _ios42orNewer; |
|
181 |
extern bool _ios43orNewer; |
|
182 |
extern bool _ios50orNewer; |
|
183 |
extern bool _ios60orNewer; |
|
184 |
extern bool _ios70orNewer; |
|
185 |
extern bool _ios80orNewer; |
|
186 |
extern bool _ios81orNewer; |
|
187 |
extern bool _ios82orNewer; |
|
188 |
extern bool _ios90orNewer; |
|
189 |
extern bool _ios91orNewer; |
|
190 |
extern bool _ios100orNewer; |
|
191 |
#endif |