ghostty/pkg/imgui/impl_glfw.zig
Mitchell Hashimoto f29393bca6 Imgui (#20)
* vendor/cimgui

* Add a "dev mode" window which for now is just imgui demo
2022-10-16 16:20:08 -07:00

29 lines
832 B
Zig

const std = @import("std");
const c = @import("c.zig");
const imgui = @import("main.zig");
const Allocator = std.mem.Allocator;
pub const ImplGlfw = struct {
pub const GLFWWindow = opaque {};
pub fn initForOpenGL(win: *GLFWWindow, install_callbacks: bool) bool {
// https://github.com/ocornut/imgui/issues/5785
defer _ = glfwGetError(null);
return ImGui_ImplGlfw_InitForOpenGL(win, install_callbacks);
}
pub fn shutdown() void {
return ImGui_ImplGlfw_Shutdown();
}
pub fn newFrame() void {
return ImGui_ImplGlfw_NewFrame();
}
extern "c" fn glfwGetError(?*const anyopaque) c_int;
extern "c" fn ImGui_ImplGlfw_InitForOpenGL(*GLFWWindow, bool) bool;
extern "c" fn ImGui_ImplGlfw_Shutdown() void;
extern "c" fn ImGui_ImplGlfw_NewFrame() void;
};