mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-05 21:34:42 +00:00
pkg/macos: yeet more usingns
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
pub usingnamespace @cImport({
|
||||
pub const c = @cImport({
|
||||
@cInclude("CoreText/CoreText.h");
|
||||
});
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user