mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
26 lines
536 B
Zig
26 lines
536 B
Zig
const std = @import("std");
|
|
const assert = std.debug.assert;
|
|
const c = @import("c.zig");
|
|
|
|
pub const LangSet = opaque {
|
|
pub fn create() *LangSet {
|
|
return @ptrCast(*LangSet, c.FcLangSetCreate());
|
|
}
|
|
|
|
pub fn destroy(self: *LangSet) void {
|
|
c.FcLangSetDestroy(self.cval());
|
|
}
|
|
|
|
pub inline fn cval(self: *LangSet) *c.struct__FcLangSet {
|
|
return @ptrCast(
|
|
*c.struct__FcLangSet,
|
|
self,
|
|
);
|
|
}
|
|
};
|
|
|
|
test "create" {
|
|
var fs = LangSet.create();
|
|
defer fs.destroy();
|
|
}
|