Repository navigation
Expand file tree
/
Copy pathapp.lua
More file actions
62 lines (53 loc) · 1.74 KB
/
Copy pathapp.lua
File metadata and controls
62 lines (53 loc) · 1.74 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---@meta soluna.app
---输入法候选窗口矩形
---IME candidate window rectangle.
---@class soluna.app.ImeRect
---@field x number 左上角 X / Left coordinate
---@field y number 左上角 Y / Top coordinate
---@field width number 宽度 / Width
---@field height number 高度 / Height
---@field text_color? integer 文本 ARGB 颜色;alpha 为 0 时补为 0xff / Text color in ARGB; alpha 0 is promoted to 0xff
---应用控制模块
---Application control module.
---@class soluna.app
local app = {}
---@alias soluna.app.MouseCursor
---| '"default"'
---| '"arrow"'
---| '"ibeam"'
---| '"crosshair"'
---| '"pointing_hand"'
---| '"resize_ew"'
---| '"resize_ns"'
---| '"resize_nwse"'
---| '"resize_nesw"'
---| '"resize_all"'
---| '"not_allowed"'
---请求应用优雅退出
---Requests graceful application quit.
function app.quit()
end
---设置系统鼠标光标样式;nil 恢复默认样式。
---Sets the system mouse cursor; nil restores the default cursor.
---@param cursor? soluna.app.MouseCursor
function app.set_mouse_cursor(cursor)
end
---设置输入法字体
---Sets the IME font face and pixel size.
---@overload fun()
---@overload fun(font_size: number)
---@param font_name? string 字体名;nil 表示平台默认字体 / Font face; nil uses platform default
---@param font_size number 字体像素大小 / Font size in pixels
function app.set_ime_font(font_name, font_size)
end
---设置输入法候选窗口矩形
---Sets the IME candidate window rectangle.
---@param rect? soluna.app.ImeRect nil 会清除矩形 / nil clears the rectangle
function app.set_ime_rect(rect)
end
---写入系统剪贴板文本
---Writes text to the system clipboard.
---@param text string UTF-8 文本 / UTF-8 text
function app.set_clipboard_text(text)
end
return app