summaryrefslogtreecommitdiff
path: root/src/Effect.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Effect.zig')
-rw-r--r--src/Effect.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Effect.zig b/src/Effect.zig
index ba8e5d60..3ec87ff1 100644
--- a/src/Effect.zig
+++ b/src/Effect.zig
@@ -73,6 +73,10 @@ pub const Effect = union(enum) {
/// The pane receives the completion/error message from the native host.
dump_themes: struct { pane: u8 },
detach: struct { pane: u8 },
+ /// An addon loaded, let go, or let go and loaded again (Addon.zig):
+ /// `arg` its path, or for unload its kind's name. Answered by an
+ /// `addon` event.
+ addon: struct { op: @import("Kind.zig").AddonOp, pane: u8, arg: Buf(effect_path_cap) },
quit,
pub fn Buf(comptime n: usize) type {
@@ -231,6 +235,8 @@ pub fn perform(p: *Pardes, e: Effect) void {
f(p.host.ctx)
else
p.reportError(d.pane, "detach", error.NotAttached),
+ // dlopen is the same on every host, so none has a method of its own.
+ .addon => |a| @import("Addon.zig").perform(p, a.op, a.pane, a.arg.slice()),
// the loop's own condition; a host tears down after its own loop
.quit => p.quit = true,
}