Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NSWindow and NSWindowDelegate methods #25

Merged
merged 2 commits into from
Nov 12, 2024
Merged

Conversation

foxnne
Copy link
Contributor

@foxnne foxnne commented Nov 10, 2024

For now this draft PR just adds the functions necessary to get the window title showing and updating. I plan on continuing to add additional functions as needed to improve windowing on macOS.

This PR currently adds additional methods to generator.zig to allow implementation in this companion PR

  • By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.

@@ -1911,14 +1911,27 @@ fn generateAppKit(generator: anytype) !void {
[2][]const u8{ "NSWindow", "isVisible" },
[2][]const u8{ "NSWindow", "setIsVisible" },
[2][]const u8{ "NSWindow", "makeKeyAndOrderFront" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@foxnne could you pull in the changes from this PR (https://github.com/hexops/mach-objc/pull/20/files#diff-9a77edc2d43d8c912cd81d488fc5820edf004be3ecc80db7ff68c5709f2fef85R1914) into yours as well?

I think those will help you - and I meant to merge it before we got conflicts here. My bad 😀

Copy link
Contributor Author

@foxnne foxnne Nov 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I'll get those pulled in as well. Is it okay if I continue adding to this PR until more significant progress has been made? With this stuff I wasn't sure how targeted you wanted the PR's. I guess I could leave this one at just adding in title control and start another for resizing etc. Or you could just merge the other and I can just restart over the top of that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, though it'd be great to start merging things to avoid more conflicts :) I like to merge things quickly when possible as long as it's an improvement over the current status quo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I added the missing NSWindow methods from the referenced PR, and also added the necessary code to get the NSWindowDelegate method windowWillResize:toSize callback working. Please let me know of any changes you'd like me to make, not sure if you want to merge this before I add additional methods.

@foxnne foxnne changed the title generator: Add additional functions for implementing window title updates on macOS Add NSWindow and NSWindowDelegate methods Nov 12, 2024
…te methods, and proof of concept `windowWillResize:ToSize` callback
@foxnne foxnne marked this pull request as ready for review November 12, 2024 18:43
@slimsag slimsag merged commit 05918e3 into hexops:main Nov 12, 2024
2 checks passed
@slimsag slimsag mentioned this pull request Nov 12, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants