aboutsummaryrefslogtreecommitdiff
path: root/src/view.zig
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-03-24 21:13:56 +0100
committerIsaac Freund <ifreund@ifreund.xyz>2020-03-24 21:13:56 +0100
commitaaecef8c5c4609ef838c47271056d2b93695fb89 (patch)
treeb0d60eca370d379ecdc019ce63ddde674536dd3f /src/view.zig
parent46fe1baa96d8d0f80dc9d5441e2c610a873081d8 (diff)
downloadriver-aaecef8c5c4609ef838c47271056d2b93695fb89.tar.gz
river-aaecef8c5c4609ef838c47271056d2b93695fb89.tar.xz
Make function names camelCase
This conforms with the zig style guidelines: https://ziglang.org/documentation/master/#Style-Guide
Diffstat (limited to 'src/view.zig')
-rw-r--r--src/view.zig18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/view.zig b/src/view.zig
index 41348f5..950d198 100644
--- a/src/view.zig
+++ b/src/view.zig
@@ -27,13 +27,13 @@ pub const View = struct {
self.x = 0;
self.y = 0;
- self.listen_map.notify = handle_map;
+ self.listen_map.notify = handleMap;
c.wl_signal_add(&self.wlr_xdg_surface.events.map, &self.listen_map);
- self.listen_unmap.notify = handle_unmap;
+ self.listen_unmap.notify = handleUnmap;
c.wl_signal_add(&self.wlr_xdg_surface.events.unmap, &self.listen_unmap);
- self.listen_destroy.notify = handle_destroy;
+ self.listen_destroy.notify = handleDestroy;
c.wl_signal_add(&self.wlr_xdg_surface.events.destroy, &self.listen_destroy);
// const toplevel = xdg_surface.unnamed_160.toplevel;
@@ -41,19 +41,19 @@ pub const View = struct {
// c.wl_signal_add(&toplevel.events.request_resize, &view.request_resize);
}
- fn handle_map(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
+ fn handleMap(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
// Called when the surface is mapped, or ready to display on-screen.
const view = @fieldParentPtr(View, "listen_map", listener.?);
view.mapped = true;
view.focus(view.wlr_xdg_surface.surface);
}
- fn handle_unmap(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
+ fn handleUnmap(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
const view = @fieldParentPtr(View, "listen_unmap", listener.?);
view.mapped = false;
}
- fn handle_destroy(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
+ fn handleDestroy(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
const view = @fieldParentPtr(View, "listen_destroy", listener.?);
const server = view.server;
@@ -68,11 +68,11 @@ pub const View = struct {
server.views.destroyNode(target, server.allocator);
}
- // fn xdg_toplevel_request_move(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
+ // fn xdgToplevelRequestMove(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
// // ignore for now
// }
- // fn xdg_toplevel_request_resize(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
+ // fn xdgToplevelRequestResize(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
// // ignore for now
// }
@@ -122,7 +122,7 @@ pub const View = struct {
);
}
- fn is_at(self: *Self, lx: f64, ly: f64, surface: *?*c.wlr_surface, sx: *f64, sy: *f64) bool {
+ fn isAt(self: *Self, lx: f64, ly: f64, surface: *?*c.wlr_surface, sx: *f64, sy: *f64) bool {
// XDG toplevels may have nested surfaces, such as popup windows for context
// menus or tooltips. This function tests if any of those are underneath the
// coordinates lx and ly (in output Layout Coordinates). If so, it sets the