core: simplify event iterator
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
8b8489b3e2
commit
09d39fb694
13 changed files with 46 additions and 74 deletions
|
|
@ -25,11 +25,8 @@ pub const Null = @This();
|
|||
|
||||
allocator: std.mem.Allocator,
|
||||
core: *Core,
|
||||
|
||||
events: Core.EventQueue,
|
||||
input_state: Core.InputState,
|
||||
modifiers: KeyMods,
|
||||
|
||||
title: [:0]u8,
|
||||
display_mode: DisplayMode,
|
||||
vsync_mode: VSyncMode,
|
||||
|
|
@ -42,7 +39,14 @@ size: Size,
|
|||
surface_descriptor: gpu.Surface.Descriptor,
|
||||
|
||||
// Called on the main thread
|
||||
pub fn init(_: *Null, _: InitOptions) !void {
|
||||
pub fn init(
|
||||
nul: *Null,
|
||||
core: *Core.Mod,
|
||||
options: InitOptions,
|
||||
) !void {
|
||||
_ = nul;
|
||||
_ = options;
|
||||
_ = core;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -55,11 +59,6 @@ pub fn update(_: *Null) !void {
|
|||
return;
|
||||
}
|
||||
|
||||
// May be called from any thread.
|
||||
pub inline fn pollEvents(n: *Null) Core.EventIterator {
|
||||
return .{ .queue = &n.events };
|
||||
}
|
||||
|
||||
// May be called from any thread.
|
||||
pub fn setTitle(_: *Null, _: [:0]const u8) void {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue