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

Is there a way to access macos events or raw Object ? #2674

Open
ta3pks opened this issue Feb 5, 2023 · 4 comments · May be fixed by #3758
Open

Is there a way to access macos events or raw Object ? #2674

ta3pks opened this issue Feb 5, 2023 · 4 comments · May be fixed by #3758

Comments

@ta3pks
Copy link

ta3pks commented Feb 5, 2023

I was trying to implement openWith support for my app and on macos this is done using the events by overwriting the methods under NsApplication (thats my understanding of it) here

Is there a way to tap into these events somehow ?

@kchibisov
Copy link
Member

This has nothing to do with glutin. I could guess that you're using winit, so I'll move issue there.

In general you don't have access to such things.

@kchibisov kchibisov transferred this issue from rust-windowing/glutin Feb 5, 2023
@madsmtm
Copy link
Member

madsmtm commented Feb 5, 2023

There is work in progress on the generic case in #2120, but no clear solution has emerged yet.

@ta3pks
Copy link
Author

ta3pks commented Feb 6, 2023

@kchibisov thanks and sorry i am just trying to make a pr to a project using glutin so didnt really know where to open issue
and @madsmtm thanks for info following that

@madsmtm
Copy link
Member

madsmtm commented Jun 24, 2024

After #3758, listening to NSApplicationDelegate events will be possible by using objc2::declare_class!, Objective-C, Swift, or similar. The WIP docs for winit::platform::macos should contain a rough example of how to do this once the PR is merged. Feel free to open an issue, probably preferably on the objc2 repo, if you're having trouble with doing so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants