cacao
cacao copied to clipboard
Definition of NSWorkspace, NSNotificationCenter, and NSRunningApplication
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).
- Introduces
Retainable
trait - Allows for a common way to buildretain
definitions and allows for theretain_nullable
connivence method, which will be needed more and more as more nullable instance properties are implemented - Expands
NSMutableDictionary
methods to be more complete. AddsIterator
support - Note that the untyped nature of Objective-C collections makes dictionaries particularly difficult. Several methods assumeNSString
keys - Adds
strum
macros for generatingNSString
constants from enums, like what is used forNotificationName
- I don't imagine there will be many other locations outside ofNSNotification
where this macro is used, but I think it's hugely helpful in this case. - Definitions for
NSWorkspace
,NSNotificationCenter
,NSRunningApplication
, andNSNotification
- These are all interconnected and rely on each other, hence the expanding scope of this PR. Addresses #24
I know there's a lot of stuff here, so take your time. I'm sure there's many things to complain about.