mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00

* update zig * pkg/fontconfig: clean up @as * pkg/freetype,harfbuzz: clean up @as * pkg/imgui: clean up @as * pkg/macos: clean up @as * pkg/pixman,utf8proc: clean up @as * clean up @as * lots more @as cleanup * undo flatpak changes * clean up @as
18 lines
453 B
Zig
18 lines
453 B
Zig
const std = @import("std");
|
|
const c = @import("c.zig");
|
|
const imgui = @import("main.zig");
|
|
const Allocator = std.mem.Allocator;
|
|
|
|
pub const DrawData = opaque {
|
|
pub fn get() Allocator.Error!*DrawData {
|
|
return @as(
|
|
?*DrawData,
|
|
@ptrCast(c.igGetDrawData()),
|
|
) orelse Allocator.Error.OutOfMemory;
|
|
}
|
|
|
|
pub inline fn cval(self: *DrawData) *c.ImGuiDrawData {
|
|
return @ptrCast(@alignCast(self));
|
|
}
|
|
};
|