WIP: Somewm migration

This commit is contained in:
Alexander Gehrke 2026-08-12 18:09:07 +02:00
parent f5caff6684
commit ce56320097
17 changed files with 342 additions and 238 deletions

26
.definitions/client.d.lua Normal file
View file

@ -0,0 +1,26 @@
---@meta
---@class client: gearsobject
client = {}
---Commands the character to say "Hello {name}"
---@param name string
function client.hello(name) end
--- Get the number of instances.
--- @return integer # The number of client objects alive.
function client.instances() end
--- Set a __index metamethod for all client instances.
--- @param cb function The meta-method
function client.set_index_miss_handler(cb) end
--- Set a __newindex metamethod for all client instances.
--- @param cb function The meta-method
function client.set_newindex_miss_handler(cb) end
--- Get all clients into a table.
---
--- @param screen? integer|screen A screen number to filter clients on.
--- @param stacked? boolean Return clients in stacking order? (ordered from
--- top to bottom).
--- @return table # A table with clients.
function client.get(screen, stacked) end

14
.definitions/object.d.lua Normal file
View file

@ -0,0 +1,14 @@
---@meta
---@class gearsobject
gearsobject = {}
---
--- Connect to a signal
--- @param signal string
--- @param handler function
function gearsobject.connect_signal(signal, handler) end
--- Disconnect from a signal
--- @param signal string
--- @param handler function
function gearsobject.disconnect_signal(signal, handler) end