blob: fc0f4d3f557a9e136c109d32b0f0fcf5b18fe505 (
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
40
|
---@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 }?
---@class Lense
---@field stale boolean
---@field name string
---@field query fun(self, input: string): (Entry|Entry[])?
---@field mark_stale fun(self)
---@field interrupt fun(self)
---@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 Lense[]
---@field util Util
---@field net Net
local qnative = require "qnative"
package.cpath = old_cpath
return qnative
|