ghostty/pkg/fontconfig/char_set.zig
Mitchell Hashimoto 03ab1bedd4 fontconfig: fc-match
2022-09-14 12:49:43 -07:00

26 lines
536 B
Zig

const std = @import("std");
const assert = std.debug.assert;
const c = @import("c.zig");
pub const CharSet = opaque {
pub fn create() *CharSet {
return @ptrCast(*CharSet, c.FcCharSetCreate());
}
pub fn destroy(self: *CharSet) void {
c.FcCharSetDestroy(self.cval());
}
pub inline fn cval(self: *CharSet) *c.struct__FcCharSet {
return @ptrCast(
*c.struct__FcCharSet,
self,
);
}
};
test "create" {
var fs = CharSet.create();
defer fs.destroy();
}