2013-02-16 19:36:21 +08:00
|
|
|
#ifndef __CCDEVICE_H__
|
|
|
|
#define __CCDEVICE_H__
|
|
|
|
|
|
|
|
#include "CCPlatformMacros.h"
|
2013-11-23 08:09:05 +08:00
|
|
|
#include "ccMacros.h"
|
2013-02-16 19:36:21 +08:00
|
|
|
|
|
|
|
NS_CC_BEGIN
|
|
|
|
|
2013-06-20 14:13:12 +08:00
|
|
|
class CC_DLL 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-11-23 08:09:05 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
CC_DISALLOW_IMPLICIT_CONSTRUCTORS(Device);
|
2013-02-16 19:36:21 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
NS_CC_END
|
|
|
|
|
|
|
|
#endif /* __CCDEVICE_H__ */
|