update zig-objc

This commit is contained in:
Mitchell Hashimoto
2023-11-14 12:28:36 -08:00
parent abe2400ed9
commit 67dce5ce0e
8 changed files with 14 additions and 14 deletions

View File

@@ -70,7 +70,7 @@ fn setLangFromCocoa() void {
defer pool.deinit();
// The classes we're going to need.
const NSLocale = objc.Class.getClass("NSLocale") orelse {
const NSLocale = objc.getClass("NSLocale") orelse {
log.err("NSLocale class not found. Locale may be incorrect.", .{});
return;
};

View File

@@ -7,7 +7,7 @@ const objc = @import("objc");
pub fn macosVersionAtLeast(major: i64, minor: i64, patch: i64) bool {
assert(builtin.target.isDarwin());
const NSProcessInfo = objc.Class.getClass("NSProcessInfo").?;
const NSProcessInfo = objc.getClass("NSProcessInfo").?;
const info = NSProcessInfo.msgSend(objc.Object, objc.sel("processInfo"), .{});
return info.msgSend(bool, objc.sel("isOperatingSystemAtLeastVersion:"), .{
NSOperatingSystemVersion{ .major = major, .minor = minor, .patch = patch },

View File

@@ -9,7 +9,7 @@ const log = std.log.scoped(.os);
pub fn clickInterval() ?u32 {
// On macOS, we can ask the system.
if (comptime builtin.target.isDarwin()) {
const NSEvent = objc.Class.getClass("NSEvent") orelse {
const NSEvent = objc.getClass("NSEvent") orelse {
log.err("NSEvent class not found. Can't get click interval.", .{});
return null;
};