pkg/macos: yeet more usingns

This commit is contained in:
Mitchell Hashimoto
2024-08-16 16:50:41 -07:00
parent 17d844e7bf
commit 318dc85c02
15 changed files with 63 additions and 40 deletions

View File

@@ -1,3 +1,3 @@
pub usingnamespace @cImport({
pub const c = @cImport({
@cInclude("CoreText/CoreText.h");
});

View File

@@ -4,7 +4,7 @@ const Allocator = std.mem.Allocator;
const foundation = @import("../foundation.zig");
const graphics = @import("../graphics.zig");
const text = @import("../text.zig");
const c = @import("c.zig");
const c = @import("c.zig").c;
pub const Font = opaque {
pub fn createWithFontDescriptor(desc: *const text.FontDescriptor, size: f32) Allocator.Error!*Font {

View File

@@ -2,7 +2,7 @@ const std = @import("std");
const Allocator = std.mem.Allocator;
const foundation = @import("../foundation.zig");
const text = @import("../text.zig");
const c = @import("c.zig");
const c = @import("c.zig").c;
pub const FontCollection = opaque {
pub fn createFromAvailableFonts() Allocator.Error!*FontCollection {

View File

@@ -1,7 +1,7 @@
const std = @import("std");
const Allocator = std.mem.Allocator;
const foundation = @import("../foundation.zig");
const c = @import("c.zig");
const c = @import("c.zig").c;
pub const FontDescriptor = opaque {
pub fn createWithNameAndSize(name: *foundation.String, size: f64) Allocator.Error!*FontDescriptor {

View File

@@ -1,7 +1,7 @@
const std = @import("std");
const Allocator = std.mem.Allocator;
const foundation = @import("../foundation.zig");
const c = @import("c.zig");
const c = @import("c.zig").c;
pub fn createFontDescriptorsFromURL(url: *foundation.URL) ?*foundation.Array {
return @ptrFromInt(@intFromPtr(c.CTFontManagerCreateFontDescriptorsFromURL(

View File

@@ -4,7 +4,7 @@ const Allocator = std.mem.Allocator;
const foundation = @import("../foundation.zig");
const graphics = @import("../graphics.zig");
const text = @import("../text.zig");
const c = @import("c.zig");
const c = @import("c.zig").c;
pub const Frame = opaque {
pub fn release(self: *Frame) void {

View File

@@ -4,7 +4,7 @@ const Allocator = std.mem.Allocator;
const foundation = @import("../foundation.zig");
const graphics = @import("../graphics.zig");
const text = @import("../text.zig");
const c = @import("c.zig");
const c = @import("c.zig").c;
pub const Framesetter = opaque {
pub fn createWithAttributedString(str: *foundation.AttributedString) Allocator.Error!*Framesetter {

View File

@@ -4,7 +4,7 @@ const Allocator = std.mem.Allocator;
const foundation = @import("../foundation.zig");
const graphics = @import("../graphics.zig");
const text = @import("../text.zig");
const c = @import("c.zig");
const c = @import("c.zig").c;
pub const Line = opaque {
pub fn createWithAttributedString(str: *foundation.AttributedString) Allocator.Error!*Line {

View File

@@ -4,7 +4,7 @@ const Allocator = std.mem.Allocator;
const foundation = @import("../foundation.zig");
const graphics = @import("../graphics.zig");
const text = @import("../text.zig");
const c = @import("c.zig");
const c = @import("c.zig").c;
// https://developer.apple.com/documentation/coretext/ctparagraphstyle?language=objc
pub const ParagraphStyle = opaque {

View File

@@ -4,7 +4,7 @@ const Allocator = std.mem.Allocator;
const foundation = @import("../foundation.zig");
const graphics = @import("../graphics.zig");
const text = @import("../text.zig");
const c = @import("c.zig");
const c = @import("c.zig").c;
pub const Run = opaque {
pub fn release(self: *Run) void {

View File

@@ -1,5 +1,5 @@
const foundation = @import("../foundation.zig");
const c = @import("c.zig");
const c = @import("c.zig").c;
pub const StringAttribute = enum {
font,