mach: implement key press/release callback
This commit is contained in:
parent
7a392b2780
commit
71b7473ee7
3 changed files with 53 additions and 0 deletions
|
|
@ -2,6 +2,8 @@ const std = @import("std");
|
|||
const Allocator = std.mem.Allocator;
|
||||
const glfw = @import("glfw");
|
||||
const gpu = @import("gpu");
|
||||
const App = @import("app");
|
||||
const enums = @import("enums.zig");
|
||||
|
||||
pub const VSyncMode = enum {
|
||||
/// Potential screen tearing.
|
||||
|
|
@ -68,6 +70,10 @@ timer: std.time.Timer,
|
|||
|
||||
pub const Core = struct {
|
||||
internal: GetCoreInternalType(),
|
||||
|
||||
pub fn setKeyCallback(core: *Core, comptime cb: fn (app: *App, engine: *Engine, key: enums.Key, action: enums.Action) void) void {
|
||||
core.internal.setKeyCallback(cb);
|
||||
}
|
||||
};
|
||||
|
||||
pub const GpuDriver = struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue