summaryrefslogtreecommitdiff
path: root/meta/3rd/Cocos4.0/cc.Device.lua
diff options
context:
space:
mode:
Diffstat (limited to 'meta/3rd/Cocos4.0/cc.Device.lua')
-rw-r--r--meta/3rd/Cocos4.0/cc.Device.lua33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/3rd/Cocos4.0/cc.Device.lua b/meta/3rd/Cocos4.0/cc.Device.lua
new file mode 100644
index 00000000..79a2622c
--- /dev/null
+++ b/meta/3rd/Cocos4.0/cc.Device.lua
@@ -0,0 +1,33 @@
+
+---@class cc.Device
+local Device={ }
+cc.Device=Device
+
+
+
+
+---* To enable or disable accelerometer.
+---@param isEnabled boolean
+---@return self
+function Device:setAccelerometerEnabled (isEnabled) end
+---* Sets the interval of accelerometer.
+---@param interval float
+---@return self
+function Device:setAccelerometerInterval (interval) end
+---* Controls whether the screen should remain on.<br>
+---* param keepScreenOn One flag indicating that the screen should remain on.
+---@param keepScreenOn boolean
+---@return self
+function Device:setKeepScreenOn (keepScreenOn) end
+---* Vibrate for the specified amount of time.<br>
+---* If vibrate is not supported, then invoking this method has no effect.<br>
+---* Some platforms limit to a maximum duration of 5 seconds.<br>
+---* Duration is ignored on iOS due to API limitations.<br>
+---* param duration The duration in seconds.
+---@param duration float
+---@return self
+function Device:vibrate (duration) end
+---* Gets the DPI of device<br>
+---* return The DPI of device.
+---@return int
+function Device:getDPI () end \ No newline at end of file