remove old unused files

This commit is contained in:
Mitchell Hashimoto
2022-04-29 08:27:16 -07:00
parent c180f7d30e
commit bb24513c1a
5 changed files with 0 additions and 97 deletions

View File

@ -1,52 +0,0 @@
//! App is the primary GUI application for ghostty. This builds the window,
//! sets up the renderer, etc. The primary run loop is started by calling
//! the "run" function.
const App = @This();
const std = @import("std");
const Allocator = std.mem.Allocator;
const glfw = @import("glfw");
const gl = @import("opengl.zig");
const TextRenderer = @import("TextRenderer.zig");
const Grid = @import("Grid.zig");
const Window = @import("Window.zig");
const log = std.log;
alloc: Allocator,
window: glfw.Window,
text: TextRenderer,
grid: Grid,
/// Initialize the main app instance. This creates the main window, sets
/// up the renderer state, compiles the shaders, etc. This is the primary
/// "startup" logic.
pub fn init(alloc: Allocator) !App {
// Create the window
const window = try Window.create(alloc);
return App{
.window = window,
};
}
pub fn deinit(self: *App) void {
self.window.destroy();
self.* = undefined;
}
pub fn run(self: App) !void {
while (!self.window.shouldClose()) {
// Setup basic OpenGL settings
gl.clearColor(0.2, 0.3, 0.3, 1.0);
gl.clear(gl.c.GL_COLOR_BUFFER_BIT);
try self.grid.render();
//try self.text.render("sh $ /bin/bash -c \"echo hello\"", 25.0, 25.0, .{ 0.5, 0.8, 0.2 });
try self.window.swapBuffers();
try glfw.waitEvents();
}
}

View File

@ -1,39 +0,0 @@
const std = @import("std");
const fc = @cImport({
@cInclude("fontconfig/fontconfig.h");
});
// Set to true when FontConfig is initialized.
var initialized: bool = false;
pub fn list() !void {
if (!initialized) {
if (fc.FcInit() != fc.FcTrue) {
return error.InitializionFailed;
}
}
const pat = fc.FcPatternCreate();
defer fc.FcPatternDestroy(pat);
const key = fc.FC_FULLNAME;
const os = fc.FcObjectSetBuild(
key,
@as([*c]const u8, 0), // @as required Zig #1481
);
defer fc.FcObjectSetDestroy(os);
const fs = fc.FcFontList(null, pat, os);
defer fc.FcFontSetDestroy(fs);
var i: usize = 0;
while (i <= fs.*.nfont) : (i += 1) {
const fpat = fs.*.fonts[i];
var str: [*c]fc.FcChar8 = undefined;
if (fc.FcPatternGetString(fpat, key, 0, &str) == fc.FcResultMatch) {
std.log.info("FONT: {s}", .{
@ptrCast([*:0]u8, str),
});
}
}
}

View File

@ -1 +0,0 @@
pub const c = @import("stb/c.zig");

View File

@ -1,3 +0,0 @@
pub usingnamespace @cImport({
@cInclude("stb_image.h");
});

View File

@ -1,2 +0,0 @@
#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>