cli/gtk: replace @hasDecl for performAction-style API

Instead of using @hasDecl, use a performAction-stype API. The C
interface for interfacing with macOS (or any other apprt where Ghostty
is embedded) is unfinished.
This commit is contained in:
Jeffrey C. Ollie
2025-07-13 21:59:13 -05:00
parent 72e47cf8bc
commit 81358c8dca
9 changed files with 291 additions and 48 deletions

View File

@@ -1,6 +1,21 @@
const std = @import("std");
const Allocator = std.mem.Allocator;
const internal_os = @import("../os/main.zig");
const apprt = @import("../apprt.zig");
pub const resourcesDir = internal_os.resourcesDir;
pub const App = struct {};
pub const Surface = struct {};
/// Functions for inter-process communication.
pub const IPC = struct {};
pub const IPC = struct {
/// Always return false as there is no apprt to communicate with.
pub fn sendIPC(
_: Allocator,
_: apprt.ipc.Target,
comptime action: apprt.ipc.Action.Key,
_: apprt.ipc.Action.Value(action),
) !bool {
return false;
}
};