2013-02-16 19:36:21 +08:00
|
|
|
#ifndef __CCDEVICE_H__
|
|
|
|
#define __CCDEVICE_H__
|
|
|
|
|
|
|
|
#include "CCPlatformMacros.h"
|
|
|
|
|
|
|
|
NS_CC_BEGIN
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL Device
|
2013-02-16 19:36:21 +08:00
|
|
|
{
|
|
|
|
private:
|
2013-06-20 14:13:12 +08:00
|
|
|
Device();
|
2013-02-16 19:36:21 +08:00
|
|
|
public:
|
2013-02-17 17:13:06 +08:00
|
|
|
/**
|
|
|
|
* Gets the DPI of device
|
|
|
|
* @return The DPI of device.
|
|
|
|
*/
|
|
|
|
static int getDPI();
|
2013-09-03 18:22:03 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* To enable or disable accelerometer.
|
|
|
|
*/
|
|
|
|
static void setAccelerometerEnabled(bool isEnabled);
|
|
|
|
/**
|
|
|
|
* Sets the interval of accelerometer.
|
|
|
|
*/
|
|
|
|
static void setAccelerometerInterval(float interval);
|
2013-02-16 19:36:21 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
NS_CC_END
|
|
|
|
|
|
|
|
#endif /* __CCDEVICE_H__ */
|