ryanmcgrath / cacao

Rust bindings for AppKit (macOS) and UIKit (iOS/tvOS). Experimental, but working!
MIT License
1.79k stars 65 forks source link

Definition of NSWorkspace, NSNotificationCenter, and NSRunningApplication #101

Open agg23 opened 11 months ago

agg23 commented 11 months ago

Got a little carried away going down the rabbit hole of getting some notifications and NSWorkspace methods working. I believe this PR should cover the majority of usecases, though there are some uncommon methods that I did not implement (I left comments marking what is missing).

I know there's a lot of stuff here, so take your time. I'm sure there's many things to complain about.

ryanmcgrath commented 11 months ago

So I'm musing about juggling pull requests here - I definitely do want these in cacao, however I think the objc2 PR might muck this PR up. Given that we're starting to look into fixing more internal core stuff, I'd like to do the objc2 stuff first just so we're not backtracking later on - so apologies in advance if I put this into an un-merge-able state.

madsmtm commented 11 months ago

(Also: icrate has NS[Mutable]Dictionary iterators that doesn't require all the keys to be strings, so if you use that, you get iterators for free).

agg23 commented 11 months ago

That's perfectly fine. I think most of this becomes unnecessary with objc2 anyway.