AppEasy Core SDK
1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
|
00001 // 00002 // 00003 // AppEasy SDK - Cross Platform Multi-purpose Game and App Engine 00004 // 00005 // Developed by Matthew Hopwood of Pocketeers Limited - www.pocketeers.co.uk 00006 // 00007 // For updates, tutorials and more details check out www.appeasymobile.com 00008 // 00009 // This code is provided free of charge and without any warranty whatsoever. You must ensure that this whole notice is present in all files and derivatives, so the reader knows its origin. 00010 // If you use this SDK in your product then please ensure that you credit AppEasy's usage appropriately. Please see www.appeasymobile.com for licensing details and support 00011 // 00012 // 00013 00014 #if !defined(_CCZ_PLATFORM_INPUT_H_) 00015 #define _CCZ_PLATFORM_INPUT_H_ 00016 00017 #include "IzPlatformInput.h" 00018 #include "CzUtil.h" 00019 00020 class CzPlatformInput : public IzPlatformInput 00021 { 00022 // Properties 00023 protected: 00024 static uint8 AppEasyToPlatformKeyCodeMapping[]; 00025 static uint8 PlatformToAppeasyKeyCodeMapping[]; 00026 00027 public: 00028 // Properties end 00029 public: 00030 // Init 00031 int Init(); 00032 void Release(); 00033 // Feature query 00034 bool isPointerAvailable(); 00035 bool isMultiTouch(); 00036 bool isKeysAvailable(); 00037 bool isOSKeyboardAvailable(); 00038 bool isAccelerometerAvailable(); 00039 bool isCompassAvailable(); 00040 // Buttons query 00041 bool wasBackButtonReleased(); 00042 bool wasMenuButtonReleased(); 00043 // Key query 00044 uint8* getKeyMappingTable(); 00045 bool isKeyDown(int key); 00046 bool isKeyUp(int key); 00047 bool wasKeyPressed(int key); 00048 bool wasKeyReleased(int key); 00049 int getLastKey() const; 00050 // Acclerometer 00051 bool startAccelerometer(); 00052 void stopAccelerometer(); 00053 void getAccelerometer(CzVec3& data); 00054 // Compass 00055 bool startCompass(); 00056 void stopCompass(); 00057 float getCompassDirection(); 00058 bool getCompassHeading(CzVec3& data); 00059 // OS Keyboard 00060 const char* OsKeyboardRead(const char* prompt, const char* default_text, int flags); 00061 // Update 00062 bool Update(); 00063 }; 00064 00065 00066 #endif // _CCZ_PLATFORM_INPUT_H_