mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[feat] Add haptic feedback (#5380)
References <https://github.com/koreader/koreader/issues/5374>.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
--[[--
|
||||
Generic device abstraction.
|
||||
|
||||
This module defines stubs for common methods.
|
||||
--]]
|
||||
|
||||
local logger = require("logger")
|
||||
local _ = require("gettext")
|
||||
|
||||
@@ -25,6 +31,7 @@ local Device = {
|
||||
hasDPad = no,
|
||||
hasWifiToggle = yes,
|
||||
hasWifiManager = no,
|
||||
isHapticFeedbackEnabled = no,
|
||||
isTouchDevice = no,
|
||||
hasFrontlight = no,
|
||||
hasLightLevelFallback = no,
|
||||
@@ -290,6 +297,13 @@ function Device:setDateTime(year, month, day, hour, min, sec) end
|
||||
-- Device specific method if any setting needs being saved
|
||||
function Device:saveSettings() end
|
||||
|
||||
--[[--
|
||||
Device specific method for performing haptic feedback.
|
||||
|
||||
@string type Type of haptic feedback. See <https://developer.android.com/reference/android/view/HapticFeedbackConstants.html>.
|
||||
--]]
|
||||
function Device:performHapticFeedback(type) end
|
||||
|
||||
-- Device specific method for toggling the GSensor
|
||||
function Device:toggleGSensor(toggle) end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user