mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
21 lines
542 B
Zig
21 lines
542 B
Zig
const std = @import("std");
|
|
const c = @import("c.zig");
|
|
const objc = @import("main.zig");
|
|
const MsgSend = @import("msg_send.zig").MsgSend;
|
|
|
|
pub const Object = struct {
|
|
value: c.id,
|
|
|
|
pub usingnamespace MsgSend(Object);
|
|
};
|
|
|
|
test {
|
|
const testing = std.testing;
|
|
const NSObject = objc.Class.getClass("NSObject").?;
|
|
|
|
// Should work with our wrappers
|
|
const obj = NSObject.msgSend(objc.Object, objc.Sel.registerName("alloc"), .{});
|
|
try testing.expect(obj.value != null);
|
|
obj.msgSend(void, objc.sel("dealloc"), .{});
|
|
}
|