mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 18:37:44 +02:00
25 lines
441 B
Lua
25 lines
441 B
Lua
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
|
|
|
|
--- Druid inner module to acquire/release input
|
|
-- @module helper.input
|
|
-- @local
|
|
|
|
local M = {}
|
|
|
|
local ADD_FOCUS = hash("acquire_input_focus")
|
|
local REMOVE_FOCUS = hash("release_input_focus")
|
|
local PATH_OBJ = "."
|
|
|
|
|
|
function M.focus()
|
|
msg.post(PATH_OBJ, ADD_FOCUS)
|
|
end
|
|
|
|
|
|
function M.remove()
|
|
msg.post(PATH_OBJ, REMOVE_FOCUS)
|
|
end
|
|
|
|
|
|
return M
|