From b711ac8a4222e8ad5c610387aea6c09cab64b1da Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 18 Dec 2023 08:20:29 -0800 Subject: [PATCH] apprt/glfw: implement openconfig --- src/apprt/glfw.zig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/apprt/glfw.zig b/src/apprt/glfw.zig index 18593672b..9b19b501b 100644 --- a/src/apprt/glfw.zig +++ b/src/apprt/glfw.zig @@ -20,6 +20,7 @@ const Renderer = renderer.Renderer; const apprt = @import("../apprt.zig"); const CoreApp = @import("../App.zig"); const CoreSurface = @import("../Surface.zig"); +const configpkg = @import("../config.zig"); const Config = @import("../config.zig").Config; // Get native API access on certain platforms so we can do more customization. @@ -127,6 +128,11 @@ pub const App = struct { glfw.postEmptyEvent(); } + /// Open the configuration in the system editor. + pub fn openConfig(self: *App) !void { + try configpkg.edit.open(self.app.alloc); + } + /// Reload the configuration. This should return the new configuration. /// The old value can be freed immediately at this point assuming a /// successful return.