mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
Merge pull request #2110 from ghostty-org/yeet-usingns2
Yeet Usingnamespace (Part 2, no calls in the repository)
This commit is contained in:
@ -1,24 +1,4 @@
|
|||||||
const c = @cImport({
|
pub const c = @cImport({
|
||||||
@cDefine("CIMGUI_DEFINE_ENUMS_AND_STRUCTS", "1");
|
@cDefine("CIMGUI_DEFINE_ENUMS_AND_STRUCTS", "1");
|
||||||
@cInclude("cimgui.h");
|
@cInclude("cimgui.h");
|
||||||
});
|
});
|
||||||
|
|
||||||
// Export all of the C API
|
|
||||||
pub usingnamespace c;
|
|
||||||
|
|
||||||
// OpenGL
|
|
||||||
pub extern fn ImGui_ImplOpenGL3_Init(?[*:0]const u8) callconv(.C) bool;
|
|
||||||
pub extern fn ImGui_ImplOpenGL3_Shutdown() callconv(.C) void;
|
|
||||||
pub extern fn ImGui_ImplOpenGL3_NewFrame() callconv(.C) void;
|
|
||||||
pub extern fn ImGui_ImplOpenGL3_RenderDrawData(*c.ImDrawData) callconv(.C) void;
|
|
||||||
|
|
||||||
// Metal
|
|
||||||
pub extern fn ImGui_ImplMetal_Init(*anyopaque) callconv(.C) bool;
|
|
||||||
pub extern fn ImGui_ImplMetal_Shutdown() callconv(.C) void;
|
|
||||||
pub extern fn ImGui_ImplMetal_NewFrame(*anyopaque) callconv(.C) void;
|
|
||||||
pub extern fn ImGui_ImplMetal_RenderDrawData(*c.ImDrawData, *anyopaque, *anyopaque) callconv(.C) void;
|
|
||||||
|
|
||||||
// OSX
|
|
||||||
pub extern fn ImGui_ImplOSX_Init(*anyopaque) callconv(.C) bool;
|
|
||||||
pub extern fn ImGui_ImplOSX_Shutdown() callconv(.C) void;
|
|
||||||
pub extern fn ImGui_ImplOSX_NewFrame(*anyopaque) callconv(.C) void;
|
|
||||||
|
@ -1,3 +1,20 @@
|
|||||||
pub const c = @import("c.zig");
|
pub const c = @import("c.zig").c;
|
||||||
|
|
||||||
|
// OpenGL
|
||||||
|
pub extern fn ImGui_ImplOpenGL3_Init(?[*:0]const u8) callconv(.C) bool;
|
||||||
|
pub extern fn ImGui_ImplOpenGL3_Shutdown() callconv(.C) void;
|
||||||
|
pub extern fn ImGui_ImplOpenGL3_NewFrame() callconv(.C) void;
|
||||||
|
pub extern fn ImGui_ImplOpenGL3_RenderDrawData(*c.ImDrawData) callconv(.C) void;
|
||||||
|
|
||||||
|
// Metal
|
||||||
|
pub extern fn ImGui_ImplMetal_Init(*anyopaque) callconv(.C) bool;
|
||||||
|
pub extern fn ImGui_ImplMetal_Shutdown() callconv(.C) void;
|
||||||
|
pub extern fn ImGui_ImplMetal_NewFrame(*anyopaque) callconv(.C) void;
|
||||||
|
pub extern fn ImGui_ImplMetal_RenderDrawData(*c.ImDrawData, *anyopaque, *anyopaque) callconv(.C) void;
|
||||||
|
|
||||||
|
// OSX
|
||||||
|
pub extern fn ImGui_ImplOSX_Init(*anyopaque) callconv(.C) bool;
|
||||||
|
pub extern fn ImGui_ImplOSX_Shutdown() callconv(.C) void;
|
||||||
|
pub extern fn ImGui_ImplOSX_NewFrame(*anyopaque) callconv(.C) void;
|
||||||
|
|
||||||
test {}
|
test {}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
pub usingnamespace @cImport({
|
pub const c = @cImport({
|
||||||
@cInclude("fontconfig/fontconfig.h");
|
@cInclude("fontconfig/fontconfig.h");
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const CharSet = opaque {
|
pub const CharSet = opaque {
|
||||||
pub fn create() *CharSet {
|
pub fn create() *CharSet {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const Error = @import("main.zig").Error;
|
const Error = @import("main.zig").Error;
|
||||||
|
|
||||||
pub const Weight = enum(c_uint) {
|
pub const Weight = enum(c_uint) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const Error = @import("main.zig").Error;
|
const Error = @import("main.zig").Error;
|
||||||
const CharSet = @import("char_set.zig").CharSet;
|
const CharSet = @import("char_set.zig").CharSet;
|
||||||
const FontSet = @import("font_set.zig").FontSet;
|
const FontSet = @import("font_set.zig").FontSet;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const Pattern = @import("pattern.zig").Pattern;
|
const Pattern = @import("pattern.zig").Pattern;
|
||||||
|
|
||||||
pub const FontSet = opaque {
|
pub const FontSet = opaque {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const Config = @import("config.zig").Config;
|
const Config = @import("config.zig").Config;
|
||||||
|
|
||||||
pub fn init() bool {
|
pub fn init() bool {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const LangSet = opaque {
|
pub const LangSet = opaque {
|
||||||
pub fn create() *LangSet {
|
pub fn create() *LangSet {
|
||||||
|
@ -1,16 +1,40 @@
|
|||||||
pub const c = @import("c.zig");
|
const initpkg = @import("init.zig");
|
||||||
pub usingnamespace @import("init.zig");
|
const char_set = @import("char_set.zig");
|
||||||
pub usingnamespace @import("char_set.zig");
|
const common = @import("common.zig");
|
||||||
pub usingnamespace @import("common.zig");
|
const config = @import("config.zig");
|
||||||
pub usingnamespace @import("config.zig");
|
const errorpkg = @import("error.zig");
|
||||||
pub usingnamespace @import("error.zig");
|
const font_set = @import("font_set.zig");
|
||||||
pub usingnamespace @import("font_set.zig");
|
const lang_set = @import("lang_set.zig");
|
||||||
pub usingnamespace @import("lang_set.zig");
|
const matrix = @import("matrix.zig");
|
||||||
pub usingnamespace @import("matrix.zig");
|
const object_set = @import("object_set.zig");
|
||||||
pub usingnamespace @import("object_set.zig");
|
const pattern = @import("pattern.zig");
|
||||||
pub usingnamespace @import("pattern.zig");
|
const range = @import("range.zig");
|
||||||
pub usingnamespace @import("range.zig");
|
const value = @import("value.zig");
|
||||||
pub usingnamespace @import("value.zig");
|
|
||||||
|
pub const c = @import("c.zig").c;
|
||||||
|
pub const init = initpkg.init;
|
||||||
|
pub const fini = initpkg.fini;
|
||||||
|
pub const initLoadConfig = initpkg.initLoadConfig;
|
||||||
|
pub const initLoadConfigAndFonts = initpkg.initLoadConfigAndFonts;
|
||||||
|
pub const version = initpkg.version;
|
||||||
|
pub const CharSet = char_set.CharSet;
|
||||||
|
pub const Weight = common.Weight;
|
||||||
|
pub const Slant = common.Slant;
|
||||||
|
pub const Spacing = common.Spacing;
|
||||||
|
pub const Property = common.Property;
|
||||||
|
pub const Result = common.Result;
|
||||||
|
pub const MatchKind = common.MatchKind;
|
||||||
|
pub const Config = config.Config;
|
||||||
|
pub const Error = errorpkg.Error;
|
||||||
|
pub const FontSet = font_set.FontSet;
|
||||||
|
pub const LangSet = lang_set.LangSet;
|
||||||
|
pub const Matrix = matrix.Matrix;
|
||||||
|
pub const ObjectSet = object_set.ObjectSet;
|
||||||
|
pub const Pattern = pattern.Pattern;
|
||||||
|
pub const Range = range.Range;
|
||||||
|
pub const Type = value.Type;
|
||||||
|
pub const Value = value.Value;
|
||||||
|
pub const ValueBinding = value.ValueBinding;
|
||||||
|
|
||||||
test {
|
test {
|
||||||
@import("std").testing.refAllDecls(@This());
|
@import("std").testing.refAllDecls(@This());
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Matrix = extern struct {
|
pub const Matrix = extern struct {
|
||||||
xx: f64,
|
xx: f64,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const Property = @import("main.zig").Property;
|
const Property = @import("main.zig").Property;
|
||||||
|
|
||||||
pub const ObjectSet = opaque {
|
pub const ObjectSet = opaque {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const Error = @import("main.zig").Error;
|
const Error = @import("main.zig").Error;
|
||||||
const ObjectSet = @import("main.zig").ObjectSet;
|
const ObjectSet = @import("main.zig").ObjectSet;
|
||||||
const Property = @import("main.zig").Property;
|
const Property = @import("main.zig").Property;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Range = opaque {
|
pub const Range = opaque {
|
||||||
pub fn destroy(self: *Range) void {
|
pub fn destroy(self: *Range) void {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const CharSet = @import("main.zig").CharSet;
|
const CharSet = @import("main.zig").CharSet;
|
||||||
const LangSet = @import("main.zig").LangSet;
|
const LangSet = @import("main.zig").LangSet;
|
||||||
const Matrix = @import("main.zig").Matrix;
|
const Matrix = @import("main.zig").Matrix;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const Library = @This();
|
const Library = @This();
|
||||||
|
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const Face = @import("face.zig").Face;
|
const Face = @import("face.zig").Face;
|
||||||
const errors = @import("errors.zig");
|
const errors = @import("errors.zig");
|
||||||
const Error = errors.Error;
|
const Error = errors.Error;
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
pub usingnamespace @cImport({
|
pub const c = @cImport({
|
||||||
@cInclude("freetype-zig.h");
|
@cInclude("freetype-zig.h");
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
/// Compute (a*b)/0x10000 with maximum accuracy. Its main use is to multiply
|
/// Compute (a*b)/0x10000 with maximum accuracy. Its main use is to multiply
|
||||||
/// a given value by a 16.16 fixed-point factor.
|
/// a given value by a 16.16 fixed-point factor.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
// Thanks to Mach (https://github.com/hexops/mach) for this work, I didn't
|
// Thanks to Mach (https://github.com/hexops/mach) for this work, I didn't
|
||||||
// do this manually. I wrote the other Freetype bindings by hand but this
|
// do this manually. I wrote the other Freetype bindings by hand but this
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const errors = @import("errors.zig");
|
const errors = @import("errors.zig");
|
||||||
const Library = @import("Library.zig");
|
const Library = @import("Library.zig");
|
||||||
const Tag = @import("tag.zig").Tag;
|
const Tag = @import("tag.zig").Tag;
|
||||||
|
@ -1,10 +1,16 @@
|
|||||||
pub const c = @import("c.zig");
|
const computations = @import("computations.zig");
|
||||||
|
const errors = @import("errors.zig");
|
||||||
|
const face = @import("face.zig");
|
||||||
|
const tag = @import("tag.zig");
|
||||||
|
|
||||||
|
pub const c = @import("c.zig").c;
|
||||||
pub const testing = @import("test.zig");
|
pub const testing = @import("test.zig");
|
||||||
pub const Library = @import("Library.zig");
|
pub const Library = @import("Library.zig");
|
||||||
pub usingnamespace @import("computations.zig");
|
|
||||||
pub usingnamespace @import("errors.zig");
|
pub const Error = errors.Error;
|
||||||
pub usingnamespace @import("face.zig");
|
pub const Face = face.Face;
|
||||||
pub usingnamespace @import("tag.zig");
|
pub const Tag = tag.Tag;
|
||||||
|
pub const mulFix = computations.mulFix;
|
||||||
|
|
||||||
test {
|
test {
|
||||||
@import("std").testing.refAllDecls(@This());
|
@import("std").testing.refAllDecls(@This());
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
pub usingnamespace @cImport({
|
pub const c = @cImport({
|
||||||
@cInclude("glslang/Include/glslang_c_interface.h");
|
@cInclude("glslang/Include/glslang_c_interface.h");
|
||||||
@cInclude("glslang/Public/resource_limits_c.h");
|
@cInclude("glslang/Public/resource_limits_c.h");
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub fn init() !void {
|
pub fn init() !void {
|
||||||
if (c.glslang_initialize_process() == 0) return error.GlslangInitFailed;
|
if (c.glslang_initialize_process() == 0) return error.GlslangInitFailed;
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
pub const c = @import("c.zig");
|
const initpkg = @import("init.zig");
|
||||||
|
const program = @import("program.zig");
|
||||||
|
const shader = @import("shader.zig");
|
||||||
|
|
||||||
|
pub const c = @import("c.zig").c;
|
||||||
pub const testing = @import("test.zig");
|
pub const testing = @import("test.zig");
|
||||||
pub usingnamespace @import("init.zig");
|
|
||||||
pub usingnamespace @import("program.zig");
|
pub const init = initpkg.init;
|
||||||
pub usingnamespace @import("shader.zig");
|
pub const finalize = initpkg.finalize;
|
||||||
|
pub const Program = program.Program;
|
||||||
|
pub const Shader = shader.Shader;
|
||||||
|
|
||||||
test {
|
test {
|
||||||
@import("std").testing.refAllDecls(@This());
|
@import("std").testing.refAllDecls(@This());
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const testlib = @import("test.zig");
|
const testlib = @import("test.zig");
|
||||||
const Shader = @import("shader.zig").Shader;
|
const Shader = @import("shader.zig").Shader;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const testlib = @import("test.zig");
|
const testlib = @import("test.zig");
|
||||||
|
|
||||||
pub const Shader = opaque {
|
pub const Shader = opaque {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const Error = @import("errors.zig").Error;
|
const Error = @import("errors.zig").Error;
|
||||||
|
|
||||||
/// Data type holding the memory modes available to client programs.
|
/// Data type holding the memory modes available to client programs.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const common = @import("common.zig");
|
const common = @import("common.zig");
|
||||||
const Error = @import("errors.zig").Error;
|
const Error = @import("errors.zig").Error;
|
||||||
const Direction = common.Direction;
|
const Direction = common.Direction;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const builtin = @import("builtin");
|
const builtin = @import("builtin");
|
||||||
|
|
||||||
pub usingnamespace @cImport({
|
pub const c = @cImport({
|
||||||
@cInclude("hb.h");
|
@cInclude("hb.h");
|
||||||
@cInclude("hb-ft.h");
|
@cInclude("hb-ft.h");
|
||||||
if (builtin.os.tag == .macos) @cInclude("hb-coretext.h");
|
if (builtin.os.tag == .macos) @cInclude("hb-coretext.h");
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
/// The direction of a text segment or buffer.
|
/// The direction of a text segment or buffer.
|
||||||
///
|
///
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const macos = @import("macos");
|
const macos = @import("macos");
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const Face = @import("face.zig").Face;
|
const Face = @import("face.zig").Face;
|
||||||
const Font = @import("font.zig").Font;
|
const Font = @import("font.zig").Font;
|
||||||
const Error = @import("errors.zig").Error;
|
const Error = @import("errors.zig").Error;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
/// A font face is an object that represents a single face from within a font family.
|
/// A font face is an object that represents a single face from within a font family.
|
||||||
///
|
///
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const Face = @import("face.zig").Face;
|
const Face = @import("face.zig").Face;
|
||||||
const Error = @import("errors.zig").Error;
|
const Error = @import("errors.zig").Error;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const freetype = @import("freetype");
|
const freetype = @import("freetype");
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const Face = @import("face.zig").Face;
|
const Face = @import("face.zig").Face;
|
||||||
const Font = @import("font.zig").Font;
|
const Font = @import("font.zig").Font;
|
||||||
const Error = @import("errors.zig").Error;
|
const Error = @import("errors.zig").Error;
|
||||||
|
@ -1,14 +1,29 @@
|
|||||||
pub const c = @import("c.zig");
|
const blob = @import("blob.zig");
|
||||||
pub usingnamespace @import("blob.zig");
|
const buffer = @import("buffer.zig");
|
||||||
pub usingnamespace @import("buffer.zig");
|
const common = @import("common.zig");
|
||||||
pub usingnamespace @import("common.zig");
|
const errors = @import("errors.zig");
|
||||||
pub usingnamespace @import("errors.zig");
|
const face = @import("face.zig");
|
||||||
pub usingnamespace @import("face.zig");
|
const font = @import("font.zig");
|
||||||
pub usingnamespace @import("font.zig");
|
const shapepkg = @import("shape.zig");
|
||||||
pub usingnamespace @import("shape.zig");
|
const versionpkg = @import("version.zig");
|
||||||
pub usingnamespace @import("version.zig");
|
|
||||||
|
pub const c = @import("c.zig").c;
|
||||||
pub const freetype = @import("freetype.zig");
|
pub const freetype = @import("freetype.zig");
|
||||||
pub const coretext = @import("coretext.zig");
|
pub const coretext = @import("coretext.zig");
|
||||||
|
pub const MemoryMode = blob.MemoryMode;
|
||||||
|
pub const Blob = blob.Blob;
|
||||||
|
pub const Buffer = buffer.Buffer;
|
||||||
|
pub const Direction = common.Direction;
|
||||||
|
pub const Script = common.Script;
|
||||||
|
pub const Language = common.Language;
|
||||||
|
pub const Feature = common.Feature;
|
||||||
|
pub const Face = face.Face;
|
||||||
|
pub const Font = font.Font;
|
||||||
|
pub const shape = shapepkg.shape;
|
||||||
|
pub const Version = versionpkg.Version;
|
||||||
|
pub const version = versionpkg.version;
|
||||||
|
pub const versionAtLeast = versionpkg.versionAtLeast;
|
||||||
|
pub const versionString = versionpkg.versionString;
|
||||||
|
|
||||||
test {
|
test {
|
||||||
@import("std").testing.refAllDecls(@This());
|
@import("std").testing.refAllDecls(@This());
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const Font = @import("font.zig").Font;
|
const Font = @import("font.zig").Font;
|
||||||
const Buffer = @import("buffer.zig").Buffer;
|
const Buffer = @import("buffer.zig").Buffer;
|
||||||
const Feature = @import("common.zig").Feature;
|
const Feature = @import("common.zig").Feature;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Version = struct {
|
pub const Version = struct {
|
||||||
major: u32,
|
major: u32,
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
pub const c = @import("animation/c.zig");
|
pub const c = @import("animation/c.zig").c;
|
||||||
pub usingnamespace @import("animation/layer.zig");
|
|
||||||
|
/// https://developer.apple.com/documentation/quartzcore/calayer/contents_gravity_values?language=objc
|
||||||
|
pub extern "c" const kCAGravityTopLeft: *anyopaque;
|
||||||
|
|
||||||
test {
|
test {
|
||||||
@import("std").testing.refAllDecls(@This());
|
@import("std").testing.refAllDecls(@This());
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
pub usingnamespace @cImport({
|
pub const c = @cImport({
|
||||||
@cInclude("QuartzCore/CALayer.h");
|
@cInclude("QuartzCore/CALayer.h");
|
||||||
});
|
});
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
/// https://developer.apple.com/documentation/quartzcore/calayer/contents_gravity_values?language=objc
|
|
||||||
pub extern "c" const kCAGravityTopLeft: *anyopaque;
|
|
@ -1,4 +1,4 @@
|
|||||||
pub const c = @import("dispatch/c.zig");
|
pub const c = @import("dispatch/c.zig").c;
|
||||||
pub const data = @import("dispatch/data.zig");
|
pub const data = @import("dispatch/data.zig");
|
||||||
pub const queue = @import("dispatch/queue.zig");
|
pub const queue = @import("dispatch/queue.zig");
|
||||||
pub const Data = data.Data;
|
pub const Data = data.Data;
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
pub usingnamespace @cImport({
|
pub const c = @cImport({
|
||||||
@cInclude("dispatch/dispatch.h");
|
@cInclude("dispatch/dispatch.h");
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const foundation = @import("../foundation.zig");
|
const foundation = @import("../foundation.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Data = opaque {
|
pub const Data = opaque {
|
||||||
pub const DESTRUCTOR_DEFAULT = c.DISPATCH_DATA_DESTRUCTOR_DEFAULT;
|
pub const DESTRUCTOR_DEFAULT = c.DISPATCH_DATA_DESTRUCTOR_DEFAULT;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Queue = *anyopaque; // dispatch_queue_t
|
pub const Queue = *anyopaque; // dispatch_queue_t
|
||||||
|
|
||||||
|
@ -1,14 +1,35 @@
|
|||||||
pub const c = @import("foundation/c.zig");
|
const array = @import("foundation/array.zig");
|
||||||
pub usingnamespace @import("foundation/array.zig");
|
const attributed_string = @import("foundation/attributed_string.zig");
|
||||||
pub usingnamespace @import("foundation/attributed_string.zig");
|
const base = @import("foundation/base.zig");
|
||||||
pub usingnamespace @import("foundation/base.zig");
|
const character_set = @import("foundation/character_set.zig");
|
||||||
pub usingnamespace @import("foundation/character_set.zig");
|
const data = @import("foundation/data.zig");
|
||||||
pub usingnamespace @import("foundation/data.zig");
|
const dictionary = @import("foundation/dictionary.zig");
|
||||||
pub usingnamespace @import("foundation/dictionary.zig");
|
const number = @import("foundation/number.zig");
|
||||||
pub usingnamespace @import("foundation/number.zig");
|
const string = @import("foundation/string.zig");
|
||||||
pub usingnamespace @import("foundation/string.zig");
|
const typepkg = @import("foundation/type.zig");
|
||||||
pub usingnamespace @import("foundation/type.zig");
|
const url = @import("foundation/url.zig");
|
||||||
pub usingnamespace @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 {
|
test {
|
||||||
@import("std").testing.refAllDecls(@This());
|
@import("std").testing.refAllDecls(@This());
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const base = @import("base.zig");
|
const base = @import("base.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const cftype = @import("type.zig");
|
const cftype = @import("type.zig");
|
||||||
const ComparisonResult = base.ComparisonResult;
|
const ComparisonResult = base.ComparisonResult;
|
||||||
const Range = base.Range;
|
const Range = base.Range;
|
||||||
|
@ -3,7 +3,7 @@ const assert = std.debug.assert;
|
|||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const foundation = @import("../foundation.zig");
|
const foundation = @import("../foundation.zig");
|
||||||
const text = @import("../text.zig");
|
const text = @import("../text.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const AttributedString = opaque {
|
pub const AttributedString = opaque {
|
||||||
pub fn create(
|
pub fn create(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const ComparisonResult = enum(c_int) {
|
pub const ComparisonResult = enum(c_int) {
|
||||||
less = -1,
|
less = -1,
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
pub usingnamespace @cImport({
|
pub const c = @cImport({
|
||||||
@cInclude("CoreFoundation/CoreFoundation.h");
|
@cInclude("CoreFoundation/CoreFoundation.h");
|
||||||
});
|
});
|
||||||
|
@ -2,7 +2,7 @@ const std = @import("std");
|
|||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const foundation = @import("../foundation.zig");
|
const foundation = @import("../foundation.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const CharacterSet = opaque {
|
pub const CharacterSet = opaque {
|
||||||
pub fn createWithCharactersInString(
|
pub fn createWithCharactersInString(
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const foundation = @import("../foundation.zig");
|
const foundation = @import("../foundation.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Data = opaque {
|
pub const Data = opaque {
|
||||||
pub fn createWithBytesNoCopy(data: []const u8) Allocator.Error!*Data {
|
pub fn createWithBytesNoCopy(data: []const u8) Allocator.Error!*Data {
|
||||||
|
@ -2,7 +2,7 @@ const std = @import("std");
|
|||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const foundation = @import("../foundation.zig");
|
const foundation = @import("../foundation.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Dictionary = opaque {
|
pub const Dictionary = opaque {
|
||||||
pub fn create(
|
pub fn create(
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const foundation = @import("../foundation.zig");
|
const foundation = @import("../foundation.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Number = opaque {
|
pub const Number = opaque {
|
||||||
pub fn create(
|
pub fn create(
|
||||||
|
@ -2,7 +2,7 @@ const std = @import("std");
|
|||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const foundation = @import("../foundation.zig");
|
const foundation = @import("../foundation.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const String = opaque {
|
pub const String = opaque {
|
||||||
pub fn createWithBytes(
|
pub fn createWithBytes(
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const foundation = @import("../foundation.zig");
|
const foundation = @import("../foundation.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const URL = opaque {
|
pub const URL = opaque {
|
||||||
pub fn createWithString(str: *foundation.String, base: ?*URL) Allocator.Error!*URL {
|
pub fn createWithString(str: *foundation.String, base: ?*URL) Allocator.Error!*URL {
|
||||||
|
@ -1,11 +1,23 @@
|
|||||||
pub const c = @import("graphics/c.zig");
|
const affine_transform = @import("graphics/affine_transform.zig");
|
||||||
pub usingnamespace @import("graphics/affine_transform.zig");
|
const bitmap_context = @import("graphics/bitmap_context.zig");
|
||||||
pub usingnamespace @import("graphics/bitmap_context.zig");
|
const color_space = @import("graphics/color_space.zig");
|
||||||
pub usingnamespace @import("graphics/color_space.zig");
|
const font = @import("graphics/font.zig");
|
||||||
pub usingnamespace @import("graphics/font.zig");
|
const geometry = @import("graphics/geometry.zig");
|
||||||
pub usingnamespace @import("graphics/geometry.zig");
|
const image = @import("graphics/image.zig");
|
||||||
pub usingnamespace @import("graphics/image.zig");
|
const path = @import("graphics/path.zig");
|
||||||
pub usingnamespace @import("graphics/path.zig");
|
|
||||||
|
pub const c = @import("graphics/c.zig").c;
|
||||||
|
pub const AffineTransform = affine_transform.AffineTransform;
|
||||||
|
pub const BitmapContext = bitmap_context.BitmapContext;
|
||||||
|
pub const ColorSpace = color_space.ColorSpace;
|
||||||
|
pub const Glyph = font.Glyph;
|
||||||
|
pub const Point = geometry.Point;
|
||||||
|
pub const Rect = geometry.Rect;
|
||||||
|
pub const Size = geometry.Size;
|
||||||
|
pub const ImageAlphaInfo = image.ImageAlphaInfo;
|
||||||
|
pub const BitmapInfo = image.BitmapInfo;
|
||||||
|
pub const Path = path.Path;
|
||||||
|
pub const MutablePath = path.MutablePath;
|
||||||
|
|
||||||
test {
|
test {
|
||||||
@import("std").testing.refAllDecls(@This());
|
@import("std").testing.refAllDecls(@This());
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const AffineTransform = extern struct {
|
pub const AffineTransform = extern struct {
|
||||||
a: c.CGFloat,
|
a: c.CGFloat,
|
||||||
|
@ -2,11 +2,11 @@ const std = @import("std");
|
|||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const graphics = @import("../graphics.zig");
|
const graphics = @import("../graphics.zig");
|
||||||
const context = @import("context.zig");
|
const Context = @import("context.zig").Context;
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const BitmapContext = opaque {
|
pub const BitmapContext = opaque {
|
||||||
pub usingnamespace context.Context(BitmapContext);
|
pub const context = Context(BitmapContext);
|
||||||
|
|
||||||
pub fn create(
|
pub fn create(
|
||||||
data: ?[]u8,
|
data: ?[]u8,
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
pub usingnamespace @cImport({
|
pub const c = @cImport({
|
||||||
@cInclude("CoreGraphics/CoreGraphics.h");
|
@cInclude("CoreGraphics/CoreGraphics.h");
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const ColorSpace = opaque {
|
pub const ColorSpace = opaque {
|
||||||
pub fn createDeviceGray() Allocator.Error!*ColorSpace {
|
pub fn createDeviceGray() Allocator.Error!*ColorSpace {
|
||||||
|
@ -2,12 +2,14 @@ const std = @import("std");
|
|||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const graphics = @import("../graphics.zig");
|
const graphics = @import("../graphics.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
/// Returns a struct that has all the shared context functions for the
|
/// Returns a struct that has all the shared context functions for the
|
||||||
/// given type.
|
/// given type.
|
||||||
pub fn Context(comptime T: type) type {
|
pub fn Context(comptime T: type) type {
|
||||||
return struct {
|
return struct {
|
||||||
|
value: *T,
|
||||||
|
|
||||||
pub fn release(self: *T) void {
|
pub fn release(self: *T) void {
|
||||||
c.CGContextRelease(@ptrCast(self));
|
c.CGContextRelease(@ptrCast(self));
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Glyph = c.CGGlyph;
|
pub const Glyph = c.CGGlyph;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Point = extern struct {
|
pub const Point = extern struct {
|
||||||
x: c.CGFloat,
|
x: c.CGFloat,
|
||||||
|
@ -3,7 +3,7 @@ const assert = std.debug.assert;
|
|||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const graphics = @import("../graphics.zig");
|
const graphics = @import("../graphics.zig");
|
||||||
const context = @import("context.zig");
|
const context = @import("context.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const ImageAlphaInfo = enum(c_uint) {
|
pub const ImageAlphaInfo = enum(c_uint) {
|
||||||
none = c.kCGImageAlphaNone,
|
none = c.kCGImageAlphaNone,
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
|
const log = @import("os/log.zig");
|
||||||
|
|
||||||
pub const c = @import("os/c.zig");
|
pub const c = @import("os/c.zig");
|
||||||
pub usingnamespace @import("os/log.zig");
|
pub const Log = log.Log;
|
||||||
|
pub const LogType = log.LogType;
|
||||||
|
|
||||||
test {
|
test {
|
||||||
@import("std").testing.refAllDecls(@This());
|
@import("std").testing.refAllDecls(@This());
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
pub usingnamespace @cImport({
|
pub const c = @cImport({
|
||||||
@cInclude("os/log.h");
|
@cInclude("os/log.h");
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Log = opaque {
|
pub const Log = opaque {
|
||||||
pub fn create(
|
pub fn create(
|
||||||
|
@ -1,14 +1,34 @@
|
|||||||
pub const c = @import("text/c.zig");
|
const font = @import("text/font.zig");
|
||||||
pub usingnamespace @import("text/font.zig");
|
const font_collection = @import("text/font_collection.zig");
|
||||||
pub usingnamespace @import("text/font_collection.zig");
|
const font_descriptor = @import("text/font_descriptor.zig");
|
||||||
pub usingnamespace @import("text/font_descriptor.zig");
|
const font_manager = @import("text/font_manager.zig");
|
||||||
pub usingnamespace @import("text/font_manager.zig");
|
const frame = @import("text/frame.zig");
|
||||||
pub usingnamespace @import("text/frame.zig");
|
const framesetter = @import("text/framesetter.zig");
|
||||||
pub usingnamespace @import("text/framesetter.zig");
|
const line = @import("text/line.zig");
|
||||||
pub usingnamespace @import("text/line.zig");
|
const paragraph_style = @import("text/paragraph_style.zig");
|
||||||
pub usingnamespace @import("text/paragraph_style.zig");
|
const run = @import("text/run.zig");
|
||||||
pub usingnamespace @import("text/run.zig");
|
const stylized_strings = @import("text/stylized_strings.zig");
|
||||||
pub usingnamespace @import("text/stylized_strings.zig");
|
|
||||||
|
pub const c = @import("text/c.zig").c;
|
||||||
|
pub const Font = font.Font;
|
||||||
|
pub const FontTableTag = font.FontTableTag;
|
||||||
|
pub const FontCollection = font_collection.FontCollection;
|
||||||
|
pub const FontDescriptor = font_descriptor.FontDescriptor;
|
||||||
|
pub const FontAttribute = font_descriptor.FontAttribute;
|
||||||
|
pub const FontTraitKey = font_descriptor.FontTraitKey;
|
||||||
|
pub const FontVariationAxisKey = font_descriptor.FontVariationAxisKey;
|
||||||
|
pub const FontSymbolicTraits = font_descriptor.FontSymbolicTraits;
|
||||||
|
pub const createFontDescriptorsFromURL = font_manager.createFontDescriptorsFromURL;
|
||||||
|
pub const createFontDescriptorsFromData = font_manager.createFontDescriptorsFromData;
|
||||||
|
pub const Frame = frame.Frame;
|
||||||
|
pub const Framesetter = framesetter.Framesetter;
|
||||||
|
pub const Line = line.Line;
|
||||||
|
pub const ParagraphStyle = paragraph_style.ParagraphStyle;
|
||||||
|
pub const ParagraphStyleSetting = paragraph_style.ParagraphStyleSetting;
|
||||||
|
pub const ParagraphStyleSpecifier = paragraph_style.ParagraphStyleSpecifier;
|
||||||
|
pub const WritingDirection = paragraph_style.WritingDirection;
|
||||||
|
pub const Run = run.Run;
|
||||||
|
pub const StringAttribute = stylized_strings.StringAttribute;
|
||||||
|
|
||||||
test {
|
test {
|
||||||
@import("std").testing.refAllDecls(@This());
|
@import("std").testing.refAllDecls(@This());
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
pub usingnamespace @cImport({
|
pub const c = @cImport({
|
||||||
@cInclude("CoreText/CoreText.h");
|
@cInclude("CoreText/CoreText.h");
|
||||||
});
|
});
|
||||||
|
@ -4,7 +4,7 @@ const Allocator = std.mem.Allocator;
|
|||||||
const foundation = @import("../foundation.zig");
|
const foundation = @import("../foundation.zig");
|
||||||
const graphics = @import("../graphics.zig");
|
const graphics = @import("../graphics.zig");
|
||||||
const text = @import("../text.zig");
|
const text = @import("../text.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Font = opaque {
|
pub const Font = opaque {
|
||||||
pub fn createWithFontDescriptor(desc: *const text.FontDescriptor, size: f32) Allocator.Error!*Font {
|
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 Allocator = std.mem.Allocator;
|
||||||
const foundation = @import("../foundation.zig");
|
const foundation = @import("../foundation.zig");
|
||||||
const text = @import("../text.zig");
|
const text = @import("../text.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const FontCollection = opaque {
|
pub const FontCollection = opaque {
|
||||||
pub fn createFromAvailableFonts() Allocator.Error!*FontCollection {
|
pub fn createFromAvailableFonts() Allocator.Error!*FontCollection {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const foundation = @import("../foundation.zig");
|
const foundation = @import("../foundation.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const FontDescriptor = opaque {
|
pub const FontDescriptor = opaque {
|
||||||
pub fn createWithNameAndSize(name: *foundation.String, size: f64) Allocator.Error!*FontDescriptor {
|
pub fn createWithNameAndSize(name: *foundation.String, size: f64) Allocator.Error!*FontDescriptor {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const foundation = @import("../foundation.zig");
|
const foundation = @import("../foundation.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub fn createFontDescriptorsFromURL(url: *foundation.URL) ?*foundation.Array {
|
pub fn createFontDescriptorsFromURL(url: *foundation.URL) ?*foundation.Array {
|
||||||
return @ptrFromInt(@intFromPtr(c.CTFontManagerCreateFontDescriptorsFromURL(
|
return @ptrFromInt(@intFromPtr(c.CTFontManagerCreateFontDescriptorsFromURL(
|
||||||
|
@ -4,7 +4,7 @@ const Allocator = std.mem.Allocator;
|
|||||||
const foundation = @import("../foundation.zig");
|
const foundation = @import("../foundation.zig");
|
||||||
const graphics = @import("../graphics.zig");
|
const graphics = @import("../graphics.zig");
|
||||||
const text = @import("../text.zig");
|
const text = @import("../text.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Frame = opaque {
|
pub const Frame = opaque {
|
||||||
pub fn release(self: *Frame) void {
|
pub fn release(self: *Frame) void {
|
||||||
|
@ -4,7 +4,7 @@ const Allocator = std.mem.Allocator;
|
|||||||
const foundation = @import("../foundation.zig");
|
const foundation = @import("../foundation.zig");
|
||||||
const graphics = @import("../graphics.zig");
|
const graphics = @import("../graphics.zig");
|
||||||
const text = @import("../text.zig");
|
const text = @import("../text.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Framesetter = opaque {
|
pub const Framesetter = opaque {
|
||||||
pub fn createWithAttributedString(str: *foundation.AttributedString) Allocator.Error!*Framesetter {
|
pub fn createWithAttributedString(str: *foundation.AttributedString) Allocator.Error!*Framesetter {
|
||||||
|
@ -4,7 +4,7 @@ const Allocator = std.mem.Allocator;
|
|||||||
const foundation = @import("../foundation.zig");
|
const foundation = @import("../foundation.zig");
|
||||||
const graphics = @import("../graphics.zig");
|
const graphics = @import("../graphics.zig");
|
||||||
const text = @import("../text.zig");
|
const text = @import("../text.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Line = opaque {
|
pub const Line = opaque {
|
||||||
pub fn createWithAttributedString(str: *foundation.AttributedString) Allocator.Error!*Line {
|
pub fn createWithAttributedString(str: *foundation.AttributedString) Allocator.Error!*Line {
|
||||||
|
@ -4,7 +4,7 @@ const Allocator = std.mem.Allocator;
|
|||||||
const foundation = @import("../foundation.zig");
|
const foundation = @import("../foundation.zig");
|
||||||
const graphics = @import("../graphics.zig");
|
const graphics = @import("../graphics.zig");
|
||||||
const text = @import("../text.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
|
// https://developer.apple.com/documentation/coretext/ctparagraphstyle?language=objc
|
||||||
pub const ParagraphStyle = opaque {
|
pub const ParagraphStyle = opaque {
|
||||||
|
@ -4,7 +4,7 @@ const Allocator = std.mem.Allocator;
|
|||||||
const foundation = @import("../foundation.zig");
|
const foundation = @import("../foundation.zig");
|
||||||
const graphics = @import("../graphics.zig");
|
const graphics = @import("../graphics.zig");
|
||||||
const text = @import("../text.zig");
|
const text = @import("../text.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Run = opaque {
|
pub const Run = opaque {
|
||||||
pub fn release(self: *Run) void {
|
pub fn release(self: *Run) void {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const foundation = @import("../foundation.zig");
|
const foundation = @import("../foundation.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const StringAttribute = enum {
|
pub const StringAttribute = enum {
|
||||||
font,
|
font,
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
pub const c = @import("video/c.zig");
|
const display_link = @import("video/display_link.zig");
|
||||||
pub usingnamespace @import("video/display_link.zig");
|
|
||||||
|
pub const c = @import("video/c.zig").c;
|
||||||
|
pub const DisplayLink = display_link.DisplayLink;
|
||||||
|
|
||||||
test {
|
test {
|
||||||
@import("std").testing.refAllDecls(@This());
|
@import("std").testing.refAllDecls(@This());
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
pub usingnamespace @cImport({
|
pub const c = @cImport({
|
||||||
@cInclude("CoreVideo/CoreVideo.h");
|
@cInclude("CoreVideo/CoreVideo.h");
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const DisplayLink = opaque {
|
pub const DisplayLink = opaque {
|
||||||
pub const Error = error{
|
pub const Error = error{
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
pub usingnamespace @cImport({
|
pub const c = @cImport({
|
||||||
@cInclude("oniguruma.h");
|
@cInclude("oniguruma.h");
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const Encoding = @import("types.zig").Encoding;
|
const Encoding = @import("types.zig").Encoding;
|
||||||
|
|
||||||
/// Maximum error message length.
|
/// Maximum error message length.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const Encoding = @import("types.zig").Encoding;
|
const Encoding = @import("types.zig").Encoding;
|
||||||
const errors = @import("errors.zig");
|
const errors = @import("errors.zig");
|
||||||
|
|
||||||
|
@ -1,10 +1,18 @@
|
|||||||
pub usingnamespace @import("init.zig");
|
const initpkg = @import("init.zig");
|
||||||
pub usingnamespace @import("errors.zig");
|
const regex = @import("regex.zig");
|
||||||
pub usingnamespace @import("regex.zig");
|
const region = @import("region.zig");
|
||||||
pub usingnamespace @import("region.zig");
|
const types = @import("types.zig");
|
||||||
pub usingnamespace @import("types.zig");
|
|
||||||
pub const c = @import("c.zig");
|
pub const c = @import("c.zig");
|
||||||
pub const testing = @import("testing.zig");
|
pub const testing = @import("testing.zig");
|
||||||
|
pub const errors = @import("errors.zig");
|
||||||
|
|
||||||
|
pub const init = initpkg.init;
|
||||||
|
pub const deinit = initpkg.deinit;
|
||||||
|
pub const Encoding = types.Encoding;
|
||||||
|
pub const Regex = regex.Regex;
|
||||||
|
pub const Region = region.Region;
|
||||||
|
pub const Syntax = types.Syntax;
|
||||||
|
|
||||||
test {
|
test {
|
||||||
@import("std").testing.refAllDecls(@This());
|
@import("std").testing.refAllDecls(@This());
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const types = @import("types.zig");
|
const types = @import("types.zig");
|
||||||
const errors = @import("errors.zig");
|
const errors = @import("errors.zig");
|
||||||
const testEnsureInit = @import("testing.zig").ensureInit;
|
const testEnsureInit = @import("testing.zig").ensureInit;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Region = extern struct {
|
pub const Region = extern struct {
|
||||||
allocated: c_int = 0,
|
allocated: c_int = 0,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Encoding = opaque {
|
pub const Encoding = opaque {
|
||||||
pub const ascii: *Encoding = @ptrCast(c.ONIG_ENCODING_ASCII());
|
pub const ascii: *Encoding = @ptrCast(c.ONIG_ENCODING_ASCII());
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const Buffer = @This();
|
const Buffer = @This();
|
||||||
|
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const errors = @import("errors.zig");
|
const errors = @import("errors.zig");
|
||||||
const glad = @import("glad.zig");
|
const glad = @import("glad.zig");
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const Framebuffer = @This();
|
const Framebuffer = @This();
|
||||||
|
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const errors = @import("errors.zig");
|
const errors = @import("errors.zig");
|
||||||
const glad = @import("glad.zig");
|
const glad = @import("glad.zig");
|
||||||
const Texture = @import("Texture.zig");
|
const Texture = @import("Texture.zig");
|
||||||
|
@ -4,7 +4,7 @@ const std = @import("std");
|
|||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const log = std.log.scoped(.opengl);
|
const log = std.log.scoped(.opengl);
|
||||||
|
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const Shader = @import("Shader.zig");
|
const Shader = @import("Shader.zig");
|
||||||
const errors = @import("errors.zig");
|
const errors = @import("errors.zig");
|
||||||
const glad = @import("glad.zig");
|
const glad = @import("glad.zig");
|
||||||
|
@ -4,7 +4,7 @@ const std = @import("std");
|
|||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const log = std.log.scoped(.opengl);
|
const log = std.log.scoped(.opengl);
|
||||||
|
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const errors = @import("errors.zig");
|
const errors = @import("errors.zig");
|
||||||
const glad = @import("glad.zig");
|
const glad = @import("glad.zig");
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const Texture = @This();
|
const Texture = @This();
|
||||||
|
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const errors = @import("errors.zig");
|
const errors = @import("errors.zig");
|
||||||
const glad = @import("glad.zig");
|
const glad = @import("glad.zig");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const VertexArray = @This();
|
const VertexArray = @This();
|
||||||
|
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const glad = @import("glad.zig");
|
const glad = @import("glad.zig");
|
||||||
const errors = @import("errors.zig");
|
const errors = @import("errors.zig");
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
pub usingnamespace @cImport({
|
pub const c = @cImport({
|
||||||
@cInclude("glad/gl.h");
|
@cInclude("glad/gl.h");
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const errors = @import("errors.zig");
|
const errors = @import("errors.zig");
|
||||||
const glad = @import("glad.zig");
|
const glad = @import("glad.zig");
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const glad = @import("glad.zig");
|
const glad = @import("glad.zig");
|
||||||
|
|
||||||
pub const Error = error{
|
pub const Error = error{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
const errors = @import("errors.zig");
|
const errors = @import("errors.zig");
|
||||||
const glad = @import("glad.zig");
|
const glad = @import("glad.zig");
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig").c;
|
||||||
|
|
||||||
pub const Context = c.GladGLContext;
|
pub const Context = c.GladGLContext;
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user