style
This commit is contained in:
@@ -141,6 +141,7 @@ fn onWindowPos(handle: ?*c.GLFWwindow, x: c_int, y: c_int) callconv(.C) void {
|
|||||||
},
|
},
|
||||||
}) catch unreachable; // todo circular queue; warn
|
}) catch unreachable; // todo circular queue; warn
|
||||||
}
|
}
|
||||||
|
|
||||||
fn onWindowSize(handle: ?*c.GLFWwindow, x: c_int, y: c_int) callconv(.C) void {
|
fn onWindowSize(handle: ?*c.GLFWwindow, x: c_int, y: c_int) callconv(.C) void {
|
||||||
const bus = getBus(handle);
|
const bus = getBus(handle);
|
||||||
bus.events.append(bus.alloc, .{
|
bus.events.append(bus.alloc, .{
|
||||||
@@ -150,18 +151,21 @@ fn onWindowSize(handle: ?*c.GLFWwindow, x: c_int, y: c_int) callconv(.C) void {
|
|||||||
},
|
},
|
||||||
}) catch unreachable; // todo circular queue; warn
|
}) catch unreachable; // todo circular queue; warn
|
||||||
}
|
}
|
||||||
|
|
||||||
fn onWindowClose(handle: ?*c.GLFWwindow) callconv(.C) void {
|
fn onWindowClose(handle: ?*c.GLFWwindow) callconv(.C) void {
|
||||||
const bus = getBus(handle);
|
const bus = getBus(handle);
|
||||||
bus.events.append(bus.alloc, .{
|
bus.events.append(bus.alloc, .{
|
||||||
.windowClose = .{},
|
.windowClose = .{},
|
||||||
}) catch unreachable; // todo circular queue; warn
|
}) catch unreachable; // todo circular queue; warn
|
||||||
}
|
}
|
||||||
|
|
||||||
fn onWindowRefresh(handle: ?*c.GLFWwindow) callconv(.C) void {
|
fn onWindowRefresh(handle: ?*c.GLFWwindow) callconv(.C) void {
|
||||||
const bus = getBus(handle);
|
const bus = getBus(handle);
|
||||||
bus.events.append(bus.alloc, .{
|
bus.events.append(bus.alloc, .{
|
||||||
.windowRefresh = .{},
|
.windowRefresh = .{},
|
||||||
}) catch unreachable; // todo circular queue; warn
|
}) catch unreachable; // todo circular queue; warn
|
||||||
}
|
}
|
||||||
|
|
||||||
fn onWindowFocus(handle: ?*c.GLFWwindow, focused: c_int) callconv(.C) void {
|
fn onWindowFocus(handle: ?*c.GLFWwindow, focused: c_int) callconv(.C) void {
|
||||||
const bus = getBus(handle);
|
const bus = getBus(handle);
|
||||||
bus.events.append(bus.alloc, .{
|
bus.events.append(bus.alloc, .{
|
||||||
@@ -170,6 +174,7 @@ fn onWindowFocus(handle: ?*c.GLFWwindow, focused: c_int) callconv(.C) void {
|
|||||||
},
|
},
|
||||||
}) catch unreachable; // todo circular queue; warn
|
}) catch unreachable; // todo circular queue; warn
|
||||||
}
|
}
|
||||||
|
|
||||||
fn onWindowIconify(handle: ?*c.GLFWwindow, iconified: c_int) callconv(.C) void {
|
fn onWindowIconify(handle: ?*c.GLFWwindow, iconified: c_int) callconv(.C) void {
|
||||||
const bus = getBus(handle);
|
const bus = getBus(handle);
|
||||||
bus.events.append(bus.alloc, .{
|
bus.events.append(bus.alloc, .{
|
||||||
@@ -178,6 +183,7 @@ fn onWindowIconify(handle: ?*c.GLFWwindow, iconified: c_int) callconv(.C) void {
|
|||||||
},
|
},
|
||||||
}) catch unreachable; // todo circular queue; warn
|
}) catch unreachable; // todo circular queue; warn
|
||||||
}
|
}
|
||||||
|
|
||||||
fn onWindowMaximize(handle: ?*c.GLFWwindow, maximized: c_int) callconv(.C) void {
|
fn onWindowMaximize(handle: ?*c.GLFWwindow, maximized: c_int) callconv(.C) void {
|
||||||
const bus = getBus(handle);
|
const bus = getBus(handle);
|
||||||
bus.events.append(bus.alloc, .{
|
bus.events.append(bus.alloc, .{
|
||||||
@@ -186,6 +192,7 @@ fn onWindowMaximize(handle: ?*c.GLFWwindow, maximized: c_int) callconv(.C) void
|
|||||||
},
|
},
|
||||||
}) catch unreachable; // todo circular queue; warn
|
}) catch unreachable; // todo circular queue; warn
|
||||||
}
|
}
|
||||||
|
|
||||||
fn onFramebufferSize(handle: ?*c.GLFWwindow, x: c_int, y: c_int) callconv(.C) void {
|
fn onFramebufferSize(handle: ?*c.GLFWwindow, x: c_int, y: c_int) callconv(.C) void {
|
||||||
const bus = getBus(handle);
|
const bus = getBus(handle);
|
||||||
bus.events.append(bus.alloc, .{
|
bus.events.append(bus.alloc, .{
|
||||||
@@ -195,6 +202,7 @@ fn onFramebufferSize(handle: ?*c.GLFWwindow, x: c_int, y: c_int) callconv(.C) vo
|
|||||||
},
|
},
|
||||||
}) catch unreachable; // todo circular queue; warn
|
}) catch unreachable; // todo circular queue; warn
|
||||||
}
|
}
|
||||||
|
|
||||||
fn onWindowContentScale(handle: ?*c.GLFWwindow, x: f32, y: f32) callconv(.C) void {
|
fn onWindowContentScale(handle: ?*c.GLFWwindow, x: f32, y: f32) callconv(.C) void {
|
||||||
const bus = getBus(handle);
|
const bus = getBus(handle);
|
||||||
bus.events.append(bus.alloc, .{
|
bus.events.append(bus.alloc, .{
|
||||||
@@ -204,6 +212,7 @@ fn onWindowContentScale(handle: ?*c.GLFWwindow, x: f32, y: f32) callconv(.C) voi
|
|||||||
},
|
},
|
||||||
}) catch unreachable; // todo circular queue; warn
|
}) catch unreachable; // todo circular queue; warn
|
||||||
}
|
}
|
||||||
|
|
||||||
fn onMouseButton(handle: ?*c.GLFWwindow, button: c_int, action: c_int, mods: c_int) callconv(.C) void {
|
fn onMouseButton(handle: ?*c.GLFWwindow, button: c_int, action: c_int, mods: c_int) callconv(.C) void {
|
||||||
const bus = getBus(handle);
|
const bus = getBus(handle);
|
||||||
bus.events.append(bus.alloc, .{
|
bus.events.append(bus.alloc, .{
|
||||||
@@ -214,6 +223,7 @@ fn onMouseButton(handle: ?*c.GLFWwindow, button: c_int, action: c_int, mods: c_i
|
|||||||
},
|
},
|
||||||
}) catch unreachable; // todo circular queue; warn
|
}) catch unreachable; // todo circular queue; warn
|
||||||
}
|
}
|
||||||
|
|
||||||
fn onCursorPos(handle: ?*c.GLFWwindow, x: f64, y: f64) callconv(.C) void {
|
fn onCursorPos(handle: ?*c.GLFWwindow, x: f64, y: f64) callconv(.C) void {
|
||||||
const bus = getBus(handle);
|
const bus = getBus(handle);
|
||||||
bus.events.append(bus.alloc, .{
|
bus.events.append(bus.alloc, .{
|
||||||
@@ -223,6 +233,7 @@ fn onCursorPos(handle: ?*c.GLFWwindow, x: f64, y: f64) callconv(.C) void {
|
|||||||
},
|
},
|
||||||
}) catch unreachable; // todo circular queue; warn
|
}) catch unreachable; // todo circular queue; warn
|
||||||
}
|
}
|
||||||
|
|
||||||
fn onCursorEnter(handle: ?*c.GLFWwindow, entered: c_int) callconv(.C) void {
|
fn onCursorEnter(handle: ?*c.GLFWwindow, entered: c_int) callconv(.C) void {
|
||||||
const bus = getBus(handle);
|
const bus = getBus(handle);
|
||||||
bus.events.append(bus.alloc, .{
|
bus.events.append(bus.alloc, .{
|
||||||
@@ -231,6 +242,7 @@ fn onCursorEnter(handle: ?*c.GLFWwindow, entered: c_int) callconv(.C) void {
|
|||||||
},
|
},
|
||||||
}) catch unreachable; // todo circular queue; warn
|
}) catch unreachable; // todo circular queue; warn
|
||||||
}
|
}
|
||||||
|
|
||||||
fn onScroll(handle: ?*c.GLFWwindow, dx: f64, dy: f64) callconv(.C) void {
|
fn onScroll(handle: ?*c.GLFWwindow, dx: f64, dy: f64) callconv(.C) void {
|
||||||
const bus = getBus(handle);
|
const bus = getBus(handle);
|
||||||
bus.events.append(bus.alloc, .{
|
bus.events.append(bus.alloc, .{
|
||||||
@@ -240,6 +252,7 @@ fn onScroll(handle: ?*c.GLFWwindow, dx: f64, dy: f64) callconv(.C) void {
|
|||||||
},
|
},
|
||||||
}) catch unreachable; // todo circular queue; warn
|
}) catch unreachable; // todo circular queue; warn
|
||||||
}
|
}
|
||||||
|
|
||||||
fn onKey(handle: ?*c.GLFWwindow, key: c_int, scan: c_int, action: c_int, mods: c_int) callconv(.C) void {
|
fn onKey(handle: ?*c.GLFWwindow, key: c_int, scan: c_int, action: c_int, mods: c_int) callconv(.C) void {
|
||||||
const bus = getBus(handle);
|
const bus = getBus(handle);
|
||||||
bus.events.append(bus.alloc, .{
|
bus.events.append(bus.alloc, .{
|
||||||
@@ -251,6 +264,7 @@ fn onKey(handle: ?*c.GLFWwindow, key: c_int, scan: c_int, action: c_int, mods: c
|
|||||||
},
|
},
|
||||||
}) catch unreachable; // todo circular queue; warn
|
}) catch unreachable; // todo circular queue; warn
|
||||||
}
|
}
|
||||||
|
|
||||||
fn onCharMods(handle: ?*c.GLFWwindow, code: c_uint, mods: c_int) callconv(.C) void {
|
fn onCharMods(handle: ?*c.GLFWwindow, code: c_uint, mods: c_int) callconv(.C) void {
|
||||||
const bus = getBus(handle);
|
const bus = getBus(handle);
|
||||||
bus.events.append(bus.alloc, .{
|
bus.events.append(bus.alloc, .{
|
||||||
@@ -260,6 +274,7 @@ fn onCharMods(handle: ?*c.GLFWwindow, code: c_uint, mods: c_int) callconv(.C) vo
|
|||||||
},
|
},
|
||||||
}) catch unreachable; // todo circular queue; warn
|
}) catch unreachable; // todo circular queue; warn
|
||||||
}
|
}
|
||||||
|
|
||||||
fn onDrop(handle: ?*c.GLFWwindow, count: c_int, paths: [*c][*c]const u8) callconv(.C) void {
|
fn onDrop(handle: ?*c.GLFWwindow, count: c_int, paths: [*c][*c]const u8) callconv(.C) void {
|
||||||
const bus = getBus(handle);
|
const bus = getBus(handle);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user