Skip to content

Commit

Permalink
generator: Add Event.isARepeat
Browse files Browse the repository at this point in the history
  • Loading branch information
foxnne committed Nov 20, 2024
1 parent e6f413c commit dfb9a49
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions generator.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1934,6 +1934,7 @@ fn generateAppKit(generator: anytype) !void {

[2][]const u8{ "NSEvent", "keyCode" },
[2][]const u8{ "NSEvent", "modifierFlags" },
[2][]const u8{ "NSEvent", "isARepeat" },

[2][]const u8{ "NSScreen", "screens" },
[2][]const u8{ "NSScreen", "mainScreen" },
Expand Down
9 changes: 9 additions & 0 deletions src/app_kit.zig
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ pub const Application = opaque {
pub fn run(self_: *@This()) void {
return objc.msgSend(self_, "run", void, .{});
}
pub fn stop(self_: *@This(), sender_: ?*objc.Id) void {
return objc.msgSend(self_, "stop:", void, .{sender_});
}
pub fn terminate(self_: *@This(), sender_: ?*objc.Id) void {
return objc.msgSend(self_, "terminate:", void, .{sender_});
}
pub fn setActivationPolicy(self_: *@This(), activationPolicy_: ApplicationActivationPolicy) bool {
return objc.msgSend(self_, "setActivationPolicy:", bool, .{activationPolicy_});
}
Expand Down Expand Up @@ -240,6 +246,9 @@ pub const Event = opaque {
pub fn modifierFlags(self_: *@This()) EventModifierFlags {
return objc.msgSend(self_, "modifierFlags", EventModifierFlags, .{});
}
pub fn isARepeat(self_: *@This()) bool {
return objc.msgSend(self_, "isARepeat", bool, .{});
}
pub fn keyCode(self_: *@This()) c_ushort {
return objc.msgSend(self_, "keyCode", c_ushort, .{});
}
Expand Down

0 comments on commit dfb9a49

Please sign in to comment.