Skip to content

Commit 0278bee

Browse files
committed
feat: return .ctype and .enum from evdev.libevdev-uinput
1 parent 975b7a5 commit 0278bee

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

evdev/libevdev-uinput.lua

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ int libevdev_uinput_write_event(const struct libevdev_uinput *uinput_dev, unsign
1919

2020
--luacheck: pop
2121

22+
---@diagnostic disable: undefined-field
23+
--
24+
local enum = {
25+
---@type number
26+
LIBEVDEV_UINPUT_OPEN_MANAGED = ffi.C.LIBEVDEV_UINPUT_OPEN_MANAGED,
27+
}
28+
29+
---@diagnostic enable: undefined-field
30+
31+
enum.libevdev_uinput_open_mode = {
32+
MANAGED = enum.LIBEVDEV_UINPUT_OPEN_MANAGED,
33+
}
34+
2235
--luacheck: push no max line length
2336

2437
---@class libevdev_uinput
@@ -32,7 +45,13 @@ local libevdev_uinput = ffi.load("evdev")
3245

3346
--luacheck: pop
3447

48+
local ctype = {
49+
libevdev_uinput_ptr = ffi.typeof("struct libevdev_uinput *[1]"),
50+
}
51+
3552
local mod = {
53+
ctype = ctype,
54+
enum = enum,
3655
lib = libevdev_uinput,
3756
}
3857

0 commit comments

Comments
 (0)