input, macos: initial work on keymapper and macos usage of it

This commit is contained in:
Mitchell Hashimoto
2023-08-08 10:49:01 -07:00
parent a042b5db9c
commit 3d23f26326
9 changed files with 808 additions and 1 deletions

View File

@@ -35,6 +35,7 @@ pub fn link(
.file = .{ .path = comptime thisDir() ++ "/text/ext.c" },
.flags = flags.items,
});
step.linkFramework("Carbon");
step.linkFramework("CoreFoundation");
step.linkFramework("CoreText");
return lib;

View File

@@ -19,6 +19,10 @@ pub const Data = opaque {
pub fn release(self: *Data) void {
foundation.CFRelease(self);
}
pub fn getPointer(self: *Data) *const anyopaque {
return @ptrCast(c.CFDataGetBytePtr(@ptrCast(self)));
}
};
test {