mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 18:12:19 +02:00
Add more events on button (long_tap, repeated_tap, double_tap)
This commit is contained in:
@@ -43,6 +43,21 @@ function M.unsubscribe(self, callback)
|
||||
end
|
||||
|
||||
|
||||
--- Return true, if event have at lease one handler
|
||||
-- @function event:is_exist
|
||||
-- @treturn boolean True if event have handlers
|
||||
function M.is_exist(self)
|
||||
return #self._callbacks > 0
|
||||
end
|
||||
|
||||
|
||||
--- Clear the all event handlers
|
||||
-- @function event:clear
|
||||
function M.clear(self)
|
||||
self._callbacks = {}
|
||||
end
|
||||
|
||||
|
||||
--- Trigger the event and call all subscribed callbacks
|
||||
-- @function event:trigger
|
||||
-- @param ... All event params
|
||||
|
Reference in New Issue
Block a user