mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
fontconfig: more APIs
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
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");
|
||||||
|
const ObjectSet = @import("main.zig").ObjectSet;
|
||||||
const Result = @import("main.zig").Result;
|
const Result = @import("main.zig").Result;
|
||||||
const Value = @import("main.zig").Value;
|
const Value = @import("main.zig").Value;
|
||||||
const ValueBinding = @import("main.zig").ValueBinding;
|
const ValueBinding = @import("main.zig").ValueBinding;
|
||||||
@ -22,6 +23,14 @@ pub const Pattern = opaque {
|
|||||||
c.FcDefaultSubstitute(self.cval());
|
c.FcDefaultSubstitute(self.cval());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn delete(self: *Pattern, obj: [:0]const u8) bool {
|
||||||
|
return c.FcPatternDel(self.cval(), obj.ptr) == c.FcTrue;
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn filter(self: *Pattern, os: *const ObjectSet) *Pattern {
|
||||||
|
return @ptrCast(*Pattern, c.FcPatternFilter(self.cval(), os.cval()));
|
||||||
|
}
|
||||||
|
|
||||||
pub fn objectIterator(self: *Pattern) ObjectIterator {
|
pub fn objectIterator(self: *Pattern) ObjectIterator {
|
||||||
return .{ .pat = self.cval(), .iter = null };
|
return .{ .pat = self.cval(), .iter = null };
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user