AppEasy Core SDK  1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
IzPlatformInput.h
Go to the documentation of this file.
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(_CIZ_PLATFORM_INPUT_H_)
00015 #define _CIZ_PLATFORM_INPUT_H_
00016 
00017 #include "CzPlatform.h"
00018 
00019 #define PLATFORM_INPUT      PLATFORM->getInput()
00020 
00021 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
00022 //
00023 // IzPlatformInput
00024 //
00025 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
00026 class IzPlatformInput
00027 {
00028     // Properties
00029 protected:
00030     bool        Initialised;
00031 public:
00032     bool        isInitialised() const   { return Initialised; }
00033     // Properties end
00034 public:
00035     // Init
00036     virtual int     Init() = 0;
00037     virtual void    Release() = 0;
00038     // Feature query
00039     virtual bool    isPointerAvailable() = 0;
00040     virtual bool    isMultiTouch() = 0;
00041     virtual bool    isKeysAvailable() = 0;
00042     virtual bool    isOSKeyboardAvailable() = 0;
00043     virtual bool    isAccelerometerAvailable() = 0;
00044     virtual bool    isCompassAvailable() = 0;
00045     // Buttons query
00046     virtual bool    wasBackButtonReleased() = 0;
00047     virtual bool    wasMenuButtonReleased() = 0;
00048     // Key query
00049     virtual uint8*  getKeyMappingTable() = 0;
00050     virtual bool    isKeyDown(int key) = 0;
00051     virtual bool    isKeyUp(int key) = 0;
00052     virtual bool    wasKeyPressed(int key) = 0;
00053     virtual bool    wasKeyReleased(int key) = 0;
00054     virtual int     getLastKey() const = 0;
00055     // Acclerometer
00056     virtual bool    startAccelerometer() = 0;
00057     virtual void    stopAccelerometer() = 0;
00058     virtual void    getAccelerometer(CzVec3& data) = 0;
00059     // Compass
00060     virtual bool    startCompass() = 0;
00061     virtual void    stopCompass() = 0;
00062     virtual float   getCompassDirection() = 0;
00063     virtual bool    getCompassHeading(CzVec3& data) = 0;
00064     // OS Keyboard
00065     virtual const char* OsKeyboardRead(const char* prompt, const char* default_text, int flags) = 0;
00066 
00067     // Update
00068     virtual bool    Update() = 0;
00069 };
00070 
00071 #endif  // _CIZ_PLATFORM_INPUT_H_