summary refs log tree commit diff
path: root/src/misc.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc.zig')
-rw-r--r--src/misc.zig17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/misc.zig b/src/misc.zig
index 678538b..359c914 100644
--- a/src/misc.zig
+++ b/src/misc.zig
@@ -25,22 +25,15 @@ usingnamespace @cImport({
 
 const Dir = std.fs.Dir;
 const TokenIterator = std.mem.TokenIterator;
-const Key = gf.Key;
-const Window = gf.Window;
-const al = @import("zeal");
 const allocPrint = std.fmt.allocPrint;
 const allocator = std.heap.c_allocator;
 const assert = std.debug.assert;
 const count = std.mem.count;
 const cwd = std.fs.cwd;
-const data_dir = @import("build_options").data_dir ++ [_]u8{ sep };
 const endsWith = std.mem.endsWith;
 const eql = std.mem.eql;
 const free = std.c.free;
-const gf = @import("gfz");
-const ini = @import("ini");
 const join = std.fs.path.joinZ;
-const hash = std.crypto.hash.Blake3.hash;
 const maxInt = std.math.maxInt;
 const parseFloat = std.fmt.parseFloat;
 const parseInt = std.fmt.parseInt;
@@ -50,10 +43,16 @@ const startsWith = std.mem.startsWith;
 const std = @import("std");
 const tokenize = std.mem.tokenize;
 
+const al = @import("zeal");
+const gf = @import("gfz");
+const ini = @import("ini");
+
+const data_dir = @import("build_options").data_dir ++ [_]u8{ sep };
+
 /// Return whether the given keyboard key is pressed.
 export fn keyPress(key: c_int) bool {
-    const window = (Window.getCurrent() catch unreachable).?;
-    return (window.getKey(@intToEnum(Key, key)) catch unreachable) == .press;
+    const window = (gf.Window.getCurrent() catch unreachable).?;
+    return (window.getKey(@intToEnum(gf.Key, key)) catch unreachable) == .press;
 }
 
 /// Read given file to heap, allocated by C allocator.