aboutsummaryrefslogtreecommitdiff
path: root/src/keyboard.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/keyboard.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/keyboard.zig')
-rw-r--r--src/keyboard.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/keyboard.zig b/src/keyboard.zig
index 2b31287..092f71d 100644
--- a/src/keyboard.zig
+++ b/src/keyboard.zig
@@ -44,14 +44,14 @@ pub const Keyboard = struct {
c.wlr_keyboard_set_repeat_info(self.wlr_keyboard, 25, 600);
// Setup listeners for keyboard events
- self.listen_modifiers.notify = handle_modifiers;
+ self.listen_modifiers.notify = handleModifiers;
c.wl_signal_add(&self.wlr_keyboard.events.modifiers, &self.listen_modifiers);
- self.listen_key.notify = handle_key;
+ self.listen_key.notify = handleKey;
c.wl_signal_add(&self.wlr_keyboard.events.key, &self.listen_key);
}
- fn handle_modifiers(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
+ fn handleModifiers(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
// This event is raised when a modifier key, such as shift or alt, is
// pressed. We simply communicate this to the client. */
const keyboard = @fieldParentPtr(Keyboard, "listen_modifiers", listener.?);
@@ -69,7 +69,7 @@ pub const Keyboard = struct {
);
}
- fn handle_key(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
+ fn handleKey(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
// This event is raised when a key is pressed or released.
const keyboard = @fieldParentPtr(Keyboard, "listen_key", listener.?);
const event = @ptrCast(