Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00043 #ifndef _orxSYSTEM_H_
00044 #define _orxSYSTEM_H_
00045
00046 #include "orxInclude.h"
00047
00048 #if defined(__orxIPHONE__) && defined(__orxOBJC__)
00049
00050 #import <UIKit/UIKit.h>
00051
00052 #endif
00053
00054
00057 typedef enum __orxSYSTEM_EVENT_t
00058 {
00059 orxSYSTEM_EVENT_CLOSE = 0,
00060 orxSYSTEM_EVENT_FOCUS_GAINED,
00061 orxSYSTEM_EVENT_FOCUS_LOST,
00062 orxSYSTEM_EVENT_MOUSE_IN,
00063 orxSYSTEM_EVENT_MOUSE_OUT,
00064
00065 orxSYSTEM_EVENT_BACKGROUND,
00066 orxSYSTEM_EVENT_FOREGROUND,
00067
00068 orxSYSTEM_EVENT_GAME_LOOP_START,
00069 orxSYSTEM_EVENT_GAME_LOOP_STOP,
00070
00071 orxSYSTEM_EVENT_TOUCH_BEGIN,
00072 orxSYSTEM_EVENT_TOUCH_MOVE,
00073 orxSYSTEM_EVENT_TOUCH_END,
00074 orxSYSTEM_EVENT_ACCELERATE,
00075 orxSYSTEM_EVENT_MOTION_SHAKE,
00076
00077 orxSYSTEM_EVENT_NUMBER,
00078
00079 orxSYSTEM_EVENT_NONE = orxENUM_NONE
00080
00081 } orxSYSTEM_EVENT;
00082
00085 typedef struct __orxSYSTEM_EVENT_PAYLOAD_t
00086 {
00087 orxU32 u32FrameCounter;
00088
00089 #if defined(__orxIPHONE__) && defined(__orxOBJC__)
00090 union
00091 {
00092
00093 struct
00094 {
00095 UIEvent *poUIEvent;
00096
00097 union
00098 {
00099
00100 NSSet *poTouchList;
00101
00102
00103 UIEventSubtype eMotion;
00104 };
00105 };
00106
00107
00108 struct
00109 {
00110 UIAccelerometer *poAccelerometer;
00111 UIAcceleration *poAcceleration;
00112 };
00113 };
00114 #elif defined(__orxANDROID__) || defined(__orxANDROID_NATIVE__)
00115 union
00116 {
00117
00118 struct
00119 {
00120 orxU32 u32ID;
00121 orxFLOAT fX, fY, fPressure;
00122 } stTouch;
00123
00124
00125 struct
00126 {
00127 void *pAccelerometer;
00128 orxFLOAT fX, fY, fZ;
00129 } stAccelerometer;
00130 };
00131 #endif
00132
00133 } orxSYSTEM_EVENT_PAYLOAD;
00134
00135
00138 extern orxDLLAPI void orxFASTCALL orxSystem_Setup();
00139
00143 extern orxDLLAPI orxSTATUS orxFASTCALL orxSystem_Init();
00144
00147 extern orxDLLAPI void orxFASTCALL orxSystem_Exit();
00148
00152 extern orxDLLAPI orxDOUBLE orxFASTCALL orxSystem_GetTime();
00153
00157 extern orxDLLAPI orxS32 orxFASTCALL orxSystem_GetRealTime();
00158
00162 extern orxDLLAPI void orxFASTCALL orxSystem_Delay(orxFLOAT _fSeconds);
00163
00164 #endif
00165