inital support for hooks...

Currently the following hooks are available:
 - WinMapPre
 - WinMapPost
This commit is contained in:
Squibid 2025-11-21 23:28:40 -05:00
parent b45544c97a
commit b3322eeb90
Signed by: squibid
GPG key ID: BECE5684D3C4005D
7 changed files with 193 additions and 0 deletions

View file

@ -8,6 +8,7 @@ const Bridge = @import("bridge.zig");
const Fs = @import("fs.zig");
const Input = @import("input.zig");
const Api = @import("api.zig");
const Hook = @import("hook.zig");
const gpa = std.heap.c_allocator;
@ -64,6 +65,11 @@ pub fn init(self: *Lua) !void {
self.state.newLib(input_funcs);
self.state.setField(-2, "input");
}
{
const hook_funcs = zlua.fnRegsFromType(Hook);
self.state.newLib(hook_funcs);
self.state.setField(-2, "hook");
}
{
const api_funcs = zlua.fnRegsFromType(Api);
self.state.newLib(api_funcs);