pkg/macos: foundation yeet usingns

This commit is contained in:
Mitchell Hashimoto
2024-08-16 16:33:47 -07:00
parent 480487b440
commit 2f578a0b97
11 changed files with 42 additions and 21 deletions

View File

@ -1,14 +1,35 @@
pub const c = @import("foundation/c.zig");
pub usingnamespace @import("foundation/array.zig");
pub usingnamespace @import("foundation/attributed_string.zig");
pub usingnamespace @import("foundation/base.zig");
pub usingnamespace @import("foundation/character_set.zig");
pub usingnamespace @import("foundation/data.zig");
pub usingnamespace @import("foundation/dictionary.zig");
pub usingnamespace @import("foundation/number.zig");
pub usingnamespace @import("foundation/string.zig");
pub usingnamespace @import("foundation/type.zig");
pub usingnamespace @import("foundation/url.zig");
const array = @import("foundation/array.zig");
const attributed_string = @import("foundation/attributed_string.zig");
const base = @import("foundation/base.zig");
const character_set = @import("foundation/character_set.zig");
const data = @import("foundation/data.zig");
const dictionary = @import("foundation/dictionary.zig");
const number = @import("foundation/number.zig");
const string = @import("foundation/string.zig");
const typepkg = @import("foundation/type.zig");
const url = @import("foundation/url.zig");
pub const c = @import("foundation/c.zig").c;
pub const Array = array.Array;
pub const MutableArray = array.MutableArray;
pub const AttributedString = attributed_string.AttributedString;
pub const MutableAttributedString = attributed_string.MutableAttributedString;
pub const ComparisonResult = base.ComparisonResult;
pub const Range = base.Range;
pub const FourCharCode = base.FourCharCode;
pub const CharacterSet = character_set.CharacterSet;
pub const Data = data.Data;
pub const Dictionary = dictionary.Dictionary;
pub const MutableDictionary = dictionary.MutableDictionary;
pub const Number = number.Number;
pub const String = string.String;
pub const MutableString = string.MutableString;
pub const StringComparison = string.StringComparison;
pub const StringEncoding = string.StringEncoding;
pub const stringGetSurrogatePairForLongCharacter = string.stringGetSurrogatePairForLongCharacter;
pub const URL = url.URL;
pub const URLPathStyle = url.URLPathStyle;
pub const CFRelease = typepkg.CFRelease;
test {
@import("std").testing.refAllDecls(@This());

View File

@ -1,7 +1,7 @@
const std = @import("std");
const Allocator = std.mem.Allocator;
const base = @import("base.zig");
const c = @import("c.zig");
const c = @import("c.zig").c;
const cftype = @import("type.zig");
const ComparisonResult = base.ComparisonResult;
const Range = base.Range;

View File

@ -3,7 +3,7 @@ const assert = std.debug.assert;
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 AttributedString = opaque {
pub fn create(

View File

@ -1,6 +1,6 @@
const std = @import("std");
const assert = std.debug.assert;
const c = @import("c.zig");
const c = @import("c.zig").c;
pub const ComparisonResult = enum(c_int) {
less = -1,

View File

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

View File

@ -2,7 +2,7 @@ const std = @import("std");
const assert = std.debug.assert;
const Allocator = std.mem.Allocator;
const foundation = @import("../foundation.zig");
const c = @import("c.zig");
const c = @import("c.zig").c;
pub const CharacterSet = opaque {
pub fn createWithCharactersInString(

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 Data = opaque {
pub fn createWithBytesNoCopy(data: []const u8) Allocator.Error!*Data {

View File

@ -2,7 +2,7 @@ const std = @import("std");
const assert = std.debug.assert;
const Allocator = std.mem.Allocator;
const foundation = @import("../foundation.zig");
const c = @import("c.zig");
const c = @import("c.zig").c;
pub const Dictionary = opaque {
pub fn create(

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 Number = opaque {
pub fn create(

View File

@ -2,7 +2,7 @@ const std = @import("std");
const assert = std.debug.assert;
const Allocator = std.mem.Allocator;
const foundation = @import("../foundation.zig");
const c = @import("c.zig");
const c = @import("c.zig").c;
pub const String = opaque {
pub fn createWithBytes(

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 URL = opaque {
pub fn createWithString(str: *foundation.String, base: ?*URL) Allocator.Error!*URL {