aboutsummaryrefslogtreecommitdiff
path: root/.config/awesome/quarrel/native/init.lua
blob: 6a823babf5a892b9e5b62b667a86968982818de5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---@meta

local old_cpath = package.cpath
local cfg = require("gears.filesystem").get_configuration_dir()
package.cpath = package.cpath .. ";" .. cfg .. "quarrel/native/lib?.so"

---@class Entry
---@field message string
---@field exec { [1]: string, [2]: boolean }?

---@alias query fun(input: string): Entry[]

---@class Lenses
---@field [1] query Calculator lense
---@field [2] query Application lense

---@alias ReadMode "l" | "n" | string

---@class FileHandle
---@field read fun(self, mode: ReadMode): string | number
---@field write fun(self, content: string): number
---@field lines fun(self): string[]
---@field rewind fun(self)

---@class Util
---@field decode_html fun(input: string): string
---@field open_file fun(path: string): FileHandle

---@class Net
---@field get_essid fun(): string

---@class QuarrelNative
---@field lenses Lenses
---@field util Util
---@field net Net
local qnative = require "qnative"

package.cpath = old_cpath
return qnative